aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog67
-rw-r--r--Makefile.in39
-rw-r--r--admin/ChangeLog5
-rw-r--r--admin/notes/bzr3
-rw-r--r--admin/notes/elpa25
-rw-r--r--admin/notes/hydra23
-rw-r--r--admin/nt/README-ftp-server18
-rw-r--r--admin/unidata/Makefile.in2
-rw-r--r--autogen/Makefile.in8
-rwxr-xr-xautogen/configure218
-rw-r--r--configure.ac93
-rw-r--r--doc/emacs/ChangeLog15
-rw-r--r--doc/emacs/Makefile.in2
-rw-r--r--doc/emacs/emacs.texi2
-rw-r--r--doc/emacs/maintaining.texi14
-rw-r--r--doc/emacs/xresources.texi20
-rw-r--r--doc/lispintro/ChangeLog15
-rw-r--r--doc/lispintro/Makefile.in2
-rw-r--r--doc/lispintro/emacs-lisp-intro.texi16
-rw-r--r--doc/lispref/ChangeLog10
-rw-r--r--doc/lispref/Makefile.in2
-rw-r--r--doc/lispref/macros.texi4
-rw-r--r--doc/man/ChangeLog4
-rw-r--r--doc/man/emacs.14
-rw-r--r--doc/misc/ChangeLog22
-rw-r--r--doc/misc/Makefile.in248
-rw-r--r--doc/misc/efaq.texi5
-rw-r--r--doc/misc/emacs-gnutls.texi2
-rw-r--r--doc/misc/tramp.texi42
-rw-r--r--etc/ChangeLog6
-rw-r--r--etc/NEWS41
-rw-r--r--etc/PROBLEMS6
-rw-r--r--etc/refcards/Makefile46
-rw-r--r--etc/spook.linesbin12802 -> 12777 bytes
-rw-r--r--info/dir2
-rw-r--r--leim/ChangeLog11
-rw-r--r--leim/Makefile.in5
-rw-r--r--leim/quail/latin-alt.el8
-rw-r--r--leim/quail/latin-post.el8
-rw-r--r--leim/quail/latin-pre.el4
-rw-r--r--lib-src/ChangeLog5
-rw-r--r--lib-src/Makefile.in5
-rw-r--r--lisp/ChangeLog542
-rw-r--r--lisp/ChangeLog.122
-rw-r--r--lisp/Makefile.in8
-rw-r--r--lisp/abbrev.el19
-rw-r--r--lisp/arc-mode.el23
-rw-r--r--lisp/autorevert.el49
-rw-r--r--lisp/avoid.el36
-rw-r--r--lisp/calculator.el48
-rw-r--r--lisp/calendar/cal-china.el28
-rw-r--r--lisp/cedet/ChangeLog5
-rw-r--r--lisp/cedet/semantic/fw.el3
-rw-r--r--lisp/comint.el5
-rw-r--r--lisp/cus-edit.el41
-rw-r--r--lisp/descr-text.el21
-rw-r--r--lisp/dframe.el42
-rw-r--r--lisp/dired-x.el35
-rw-r--r--lisp/dired.el2
-rw-r--r--lisp/emacs-lisp/advice.el2
-rw-r--r--lisp/emacs-lisp/byte-opt.el12
-rw-r--r--lisp/emacs-lisp/bytecomp.el20
-rw-r--r--lisp/emacs-lisp/cconv.el23
-rw-r--r--lisp/emacs-lisp/cl-macs.el13
-rw-r--r--lisp/emacs-lisp/crm.el62
-rw-r--r--lisp/emacs-lisp/eldoc.el7
-rw-r--r--lisp/emacs-lisp/gv.el4
-rw-r--r--lisp/emacs-lisp/lisp.el73
-rw-r--r--lisp/emacs-lisp/package.el16
-rw-r--r--lisp/epa.el71
-rw-r--r--lisp/epg.el56
-rw-r--r--lisp/files.el109
-rw-r--r--lisp/finder.el4
-rw-r--r--lisp/frame.el7
-rw-r--r--lisp/generic-x.el24
-rw-r--r--lisp/gnus/ChangeLog4
-rw-r--r--lisp/gnus/mm-decode.el22
-rw-r--r--lisp/icomplete.el24
-rw-r--r--lisp/info.el11
-rw-r--r--lisp/international/characters.el2
-rw-r--r--lisp/international/mule-cmds.el68
-rw-r--r--lisp/isearch.el30
-rw-r--r--lisp/ldefs-boot.el1338
-rw-r--r--lisp/minibuffer.el225
-rw-r--r--lisp/net/ange-ftp.el17
-rw-r--r--lisp/net/browse-url.el20
-rw-r--r--lisp/net/dbus.el4
-rw-r--r--lisp/net/eudc.el10
-rw-r--r--lisp/net/eudcb-ldap.el2
-rw-r--r--lisp/net/eww.el12
-rw-r--r--lisp/net/imap.el24
-rw-r--r--lisp/net/tramp-adb.el10
-rw-r--r--lisp/net/tramp-cache.el10
-rw-r--r--lisp/net/tramp-cmds.el18
-rw-r--r--lisp/net/tramp-compat.el78
-rw-r--r--lisp/net/tramp-gvfs.el106
-rw-r--r--lisp/net/tramp-gw.el2
-rw-r--r--lisp/net/tramp-sh.el198
-rw-r--r--lisp/net/tramp-smb.el24
-rw-r--r--lisp/net/tramp.el261
-rw-r--r--lisp/nxml/nxml-util.el2
-rw-r--r--lisp/printing.el58
-rw-r--r--lisp/progmodes/ada-xref.el140
-rw-r--r--lisp/progmodes/antlr-mode.el4
-rw-r--r--lisp/progmodes/bat-mode.el1
-rw-r--r--lisp/progmodes/cc-awk.el1
-rw-r--r--lisp/progmodes/cc-bytecomp.el4
-rw-r--r--lisp/progmodes/cc-engine.el72
-rw-r--r--lisp/progmodes/cc-langs.el5
-rw-r--r--lisp/progmodes/cc-mode.el197
-rw-r--r--lisp/progmodes/cperl-mode.el18
-rw-r--r--lisp/progmodes/python.el141
-rw-r--r--lisp/progmodes/ruby-mode.el54
-rw-r--r--lisp/progmodes/sh-script.el25
-rw-r--r--lisp/replace.el9
-rw-r--r--lisp/saveplace.el9
-rw-r--r--lisp/simple.el130
-rw-r--r--lisp/speedbar.el6
-rw-r--r--lisp/subr.el34
-rw-r--r--lisp/textmodes/bibtex.el2
-rw-r--r--lisp/textmodes/css-mode.el172
-rw-r--r--lisp/vc/ediff-diff.el4
-rw-r--r--lisp/vc/ediff-init.el4
-rw-r--r--lisp/vc/ediff-merg.el4
-rw-r--r--lisp/vc/ediff-mult.el4
-rw-r--r--lisp/vc/ediff-util.el6
-rw-r--r--lisp/vc/ediff-wind.el10
-rw-r--r--lisp/vc/ediff.el2
-rw-r--r--lisp/vc/emerge.el6
-rw-r--r--lisp/vc/pcvs.el6
-rw-r--r--lisp/vc/smerge-mode.el21
-rw-r--r--lisp/vc/vc-annotate.el30
-rw-r--r--lisp/vc/vc-arch.el4
-rw-r--r--lisp/vc/vc-bzr.el46
-rw-r--r--lisp/vc/vc-cvs.el10
-rw-r--r--lisp/vc/vc-dispatcher.el45
-rw-r--r--lisp/vc/vc-git.el37
-rw-r--r--lisp/vc/vc-hg.el29
-rw-r--r--lisp/vc/vc-mtn.el4
-rw-r--r--lisp/vc/vc-rcs.el14
-rw-r--r--lisp/vc/vc-sccs.el10
-rw-r--r--lisp/vc/vc-svn.el31
-rw-r--r--lisp/vc/vc.el99
-rw-r--r--lwlib/ChangeLog6
-rw-r--r--lwlib/Makefile.in5
-rwxr-xr-xmake-dist2
-rw-r--r--nextstep/ChangeLog10
-rw-r--r--nextstep/Makefile.in7
-rw-r--r--nt/ChangeLog6
-rw-r--r--nt/INSTALL1080
-rw-r--r--nt/INSTALL.MSYS673
-rw-r--r--nt/INSTALL.OLD752
-rw-r--r--nt/README12
-rw-r--r--nt/README.W3216
-rwxr-xr-xnt/configure.bat4
-rw-r--r--oldXMenu/ChangeLog6
-rw-r--r--oldXMenu/Makefile.in6
-rw-r--r--src/ChangeLog459
-rw-r--r--src/Makefile.in16
-rw-r--r--src/alloc.c6
-rw-r--r--src/buffer.c40
-rw-r--r--src/buffer.h1
-rw-r--r--src/callint.c4
-rw-r--r--src/cmds.c20
-rw-r--r--src/coding.h2
-rw-r--r--src/composite.h6
-rw-r--r--src/dispextern.h106
-rw-r--r--src/dispnew.c100
-rw-r--r--src/editfns.c26
-rw-r--r--src/emacsgtkfixed.c5
-rw-r--r--src/eval.c28
-rw-r--r--src/fileio.c2
-rw-r--r--src/font.c8
-rw-r--r--src/font.h11
-rw-r--r--src/fontset.c26
-rw-r--r--src/fontset.h3
-rw-r--r--src/frame.c27
-rw-r--r--src/frame.h56
-rw-r--r--src/gfilenotify.c2
-rw-r--r--src/gtkutil.c51
-rw-r--r--src/gtkutil.h2
-rw-r--r--src/image.c5
-rw-r--r--src/indent.c38
-rw-r--r--src/intervals.c12
-rw-r--r--src/keyboard.c180
-rw-r--r--src/keyboard.h4
-rw-r--r--src/lisp.h26
-rw-r--r--src/minibuf.c7
-rw-r--r--src/msdos.c21
-rw-r--r--src/nsfns.m9
-rw-r--r--src/nsfont.m9
-rw-r--r--src/nsterm.m95
-rw-r--r--src/print.c9
-rw-r--r--src/process.c63
-rw-r--r--src/regex.c31
-rw-r--r--src/search.c86
-rw-r--r--src/sysdep.c4
-rw-r--r--src/sysselect.h11
-rw-r--r--src/term.c19
-rw-r--r--src/termhooks.h28
-rw-r--r--src/w32.c8
-rw-r--r--src/w32.h1
-rw-r--r--src/w32console.c8
-rw-r--r--src/w32fns.c8
-rw-r--r--src/w32proc.c12
-rw-r--r--src/w32term.c96
-rw-r--r--src/w32term.h1
-rw-r--r--src/w32xfns.c6
-rw-r--r--src/window.c63
-rw-r--r--src/window.h33
-rw-r--r--src/xdisp.c445
-rw-r--r--src/xfaces.c39
-rw-r--r--src/xfns.c20
-rw-r--r--src/xgselect.c4
-rw-r--r--src/xgselect.h4
-rw-r--r--src/xmenu.c2
-rw-r--r--src/xterm.c304
-rw-r--r--src/xterm.h36
-rw-r--r--test/ChangeLog11
-rw-r--r--test/automated/Makefile.in4
-rw-r--r--test/automated/eieio-test-methodinvoke.el4
-rw-r--r--test/automated/eieio-tests.el16
-rw-r--r--test/indent/ruby.rb5
223 files changed, 6370 insertions, 5528 deletions
diff --git a/ChangeLog b/ChangeLog
index e8504062dc3..4fc4e065e92 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,70 @@
12013-09-09 Glenn Morris <rgm@gnu.org>
2
3 * configure.ac (LDFLAGS_NOCOMBRELOC): New variable.
4 (LDFLAGS): Move nocombreloc option from here...
5 (LD_SWITCH_SYSTEM_TEMACS): ... to here.
6
72013-09-08 Glenn Morris <rgm@gnu.org>
8
9 * configure.ac (--without-compress-install):
10 Rename from --without-compress-info. (Bug#9789)
11 (GZIP_INFO): Remove.
12 (GZIP_PROG): Allow --without-compress-install to disable it.
13 * Makefile.in (GZIP_INFO): Remove all references.
14
15 * info/dir: Tweak emacs-gnutls entry.
16
172013-09-07 Paul Eggert <eggert@cs.ucla.edu>
18
19 Port --without-x --enable-gcc-warnings to Fedora 19.
20 * configure.ac (WERROR_CFLAGS): Omit redundant use of
21 -Wmissing-field-initializers, -Wswitch, -Wtype-limits,
22 -Wunused-parameter. If there is no window system, also omit
23 -Wsuggest-attribute=const and -Wsuggest-attribute=noreturn; this
24 is needed for Fedora 19.
25
262013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
27
28 Make --without-x compatible with --enable-gcc-warnings.
29 * configure.ac: If both --without-x and --enable-gcc-warnings are
30 specified, use -Wno-unused-variable, -Wno-unused-but-set-variable
31 and -Wno-unused-but-set-parameter.
32
332013-09-04 Paul Eggert <eggert@cs.ucla.edu>
34
35 Makefile improvements.
36 * Makefile.in (lib): Depend on am--refresh, to avoid a race.
37 (src): Remove duplicate dependency on FRC.
38 Invoke just one submake, not two. Avoid the need for 'pwd'.
39
402013-09-02 Jan Djärv <jan.h.d@swipnet.se>
41
42 * configure.ac: Add ns_check_file.
43
442013-08-31 Glenn Morris <rgm@gnu.org>
45
46 * configure.ac (--with-sound): Rename ossaudio to bsd-ossaudio,
47 and voxware to oss.
48
492013-08-31 Ulrich Müller <ulm@gentoo.org>
50
51 * configure.ac: Allow for --with-sound=voxware that will enable
52 sound but otherwise disable ALSA. This will use the OSS device,
53 typically /dev/dsp, for sound output. (Bug#15067)
54
552013-08-31 Glenn Morris <rgm@gnu.org>
56
57 * make-dist: Update for nt/INSTALL* changes.
58
592013-08-28 Paul Eggert <eggert@cs.ucla.edu>
60
61 * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
62 for portability to hosts where /bin/sh has problems.
63
642013-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
65
66 * configure.ac (DOCMISC_W32): New var to replace DOCMISC_*_W32.
67
12013-08-27 Paul Eggert <eggert@cs.ucla.edu> 682013-08-27 Paul Eggert <eggert@cs.ucla.edu>
2 69
3 Simplify EMACS_TIME-related code. 70 Simplify EMACS_TIME-related code.
diff --git a/Makefile.in b/Makefile.in
index d5cd6bd8d20..c6254fd6098 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -56,7 +56,7 @@
56# make docs 56# make docs
57# Make Emacs documentation files from their sources; requires makeinfo. 57# Make Emacs documentation files from their sources; requires makeinfo.
58 58
59SHELL = /bin/sh 59SHELL = @SHELL@
60 60
61# This may not work with certain non-GNU make's. It only matters when 61# This may not work with certain non-GNU make's. It only matters when
62# inheriting a CDPATH not starting with the current directory. 62# inheriting a CDPATH not starting with the current directory.
@@ -259,8 +259,6 @@ LN_S_FILEONLY = @LN_S_FILEONLY@
259 259
260# We use gzip to compress installed .el files. 260# We use gzip to compress installed .el files.
261GZIP_PROG = @GZIP_PROG@ 261GZIP_PROG = @GZIP_PROG@
262# If non-nil, gzip the installed Info and man pages.
263GZIP_INFO = @GZIP_INFO@
264 262
265# ============================= Targets ============================== 263# ============================= Targets ==============================
266 264
@@ -352,9 +350,13 @@ epaths-force-w32: FRC
352 -e "/^.*#/s|@SRC@|$${w32srcdir}|g") && \ 350 -e "/^.*#/s|@SRC@|$${w32srcdir}|g") && \
353 ${srcdir}/build-aux/move-if-change epaths.h.$$$$ src/epaths.h 351 ${srcdir}/build-aux/move-if-change epaths.h.$$$$ src/epaths.h
354 352
353# If lib/Makefile would build files in '.', then build them before
354# building 'lib', to avoid races with parallel makes.
355lib: am--refresh
356
355lib-src src: $(NTDIR) lib 357lib-src src: $(NTDIR) lib
356 358
357src: lib-src FRC 359src: lib-src
358 360
359# We need to build `emacs' in `src' to compile the *.elc files in `lisp' 361# We need to build `emacs' in `src' to compile the *.elc files in `lisp'
360# and `leim'. 362# and `leim'.
@@ -376,18 +378,15 @@ lib lib-src lisp leim nt: Makefile FRC
376# all preloaded elisp files, and only then dump the actual src/emacs, which 378# all preloaded elisp files, and only then dump the actual src/emacs, which
377# is not wrong, but is overkill in 99.99% of the cases. 379# is not wrong, but is overkill in 99.99% of the cases.
378src: Makefile FRC 380src: Makefile FRC
379 boot=bootstrap-emacs$(EXEEXT); \ 381 dirstate='.bzr/checkout/dirstate'; \
380 if [ ! -x "src/$$boot" ]; then \ 382 vcswitness='$$(srcdir)/../'$$dirstate; \
381 cd $@; $(MAKE) all $(MFLAGS) \ 383 [ -r "$(srcdir)/$$dirstate" ] || vcswitness=''; \
382 CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \ 384 cd $@ || exit; \
383 LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="$$boot"; \ 385 boot=bootstrap-emacs$(EXEEXT); \
384 fi; 386 [ ! -x "$$boot" ] || boot=''; \
385 if [ -r .bzr/checkout/dirstate ]; then \ 387 $(MAKE) all $(MFLAGS) \
386 vcswitness="`pwd`/.bzr/checkout/dirstate"; \ 388 CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \
387 fi; \ 389 LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="$$boot" \
388 cd $@; $(MAKE) all $(MFLAGS) \
389 CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \
390 LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="" \
391 VCSWITNESS="$$vcswitness" 390 VCSWITNESS="$$vcswitness"
392 391
393blessmail: Makefile src FRC 392blessmail: Makefile src FRC
@@ -661,7 +660,7 @@ install-info: info
661 for f in `ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \ 660 for f in `ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \
662 (cd $${thisdir}; \ 661 (cd $${thisdir}; \
663 ${INSTALL_DATA} ${srcdir}/info/$$f $(DESTDIR)${infodir}/$$f); \ 662 ${INSTALL_DATA} ${srcdir}/info/$$f $(DESTDIR)${infodir}/$$f); \
664 ( [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ] ) || continue ; \ 663 [ -n "${GZIP_PROG}" ] || continue ; \
665 rm -f $(DESTDIR)${infodir}/$$f.gz; \ 664 rm -f $(DESTDIR)${infodir}/$$f.gz; \
666 ${GZIP_PROG} -9n $(DESTDIR)${infodir}/$$f; \ 665 ${GZIP_PROG} -9n $(DESTDIR)${infodir}/$$f; \
667 done; \ 666 done; \
@@ -683,7 +682,7 @@ install-man:
683 dest=`echo "$${page}" | sed -e 's/\.1$$//' -e '$(TRANSFORM)'`.1; \ 682 dest=`echo "$${page}" | sed -e 's/\.1$$//' -e '$(TRANSFORM)'`.1; \
684 (cd $${thisdir}; \ 683 (cd $${thisdir}; \
685 ${INSTALL_DATA} ${mansrcdir}/$${page} $(DESTDIR)${man1dir}/$${dest}); \ 684 ${INSTALL_DATA} ${mansrcdir}/$${page} $(DESTDIR)${man1dir}/$${dest}); \
686 ( [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ] ) || continue ; \ 685 [ -n "${GZIP_PROG}" ] || continue ; \
687 rm -f $(DESTDIR)${man1dir}/$${dest}.gz; \ 686 rm -f $(DESTDIR)${man1dir}/$${dest}.gz; \
688 ${GZIP_PROG} -9n $(DESTDIR)${man1dir}/$${dest} || true; \ 687 ${GZIP_PROG} -9n $(DESTDIR)${man1dir}/$${dest} || true; \
689 done 688 done
@@ -753,12 +752,12 @@ uninstall: uninstall-$(NTDIR) uninstall-doc
753 for elt in ${INFO_NONMISC} $${info_misc}; do \ 752 for elt in ${INFO_NONMISC} $${info_misc}; do \
754 (cd $${thisdir}; \ 753 (cd $${thisdir}; \
755 $(INSTALL_INFO) --remove --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$elt); \ 754 $(INSTALL_INFO) --remove --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$elt); \
756 if [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ]; then \ 755 if [ -n "${GZIP_PROG}" ]; then \
757 ext=.gz; else ext=; fi; \ 756 ext=.gz; else ext=; fi; \
758 rm -f $$elt$$ext $$elt-[1-9]$$ext $$elt-[1-9][0-9]$$ext; \ 757 rm -f $$elt$$ext $$elt-[1-9]$$ext $$elt-[1-9][0-9]$$ext; \
759 done; \ 758 done; \
760 fi) 759 fi)
761 (if [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ]; then \ 760 (if [ -n "${GZIP_PROG}" ]; then \
762 ext=.gz; else ext=; fi; \ 761 ext=.gz; else ext=; fi; \
763 if cd ${mansrcdir}; then \ 762 if cd ${mansrcdir}; then \
764 for page in *.1; do \ 763 for page in *.1; do \
diff --git a/admin/ChangeLog b/admin/ChangeLog
index 245c809ec81..29118deba7f 100644
--- a/admin/ChangeLog
+++ b/admin/ChangeLog
@@ -1,3 +1,8 @@
12013-08-28 Paul Eggert <eggert@cs.ucla.edu>
2
3 * unidata/Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
4 for portability to hosts where /bin/sh has problems.
5
12013-08-27 Glenn Morris <rgm@gnu.org> 62013-08-27 Glenn Morris <rgm@gnu.org>
2 7
3 * admin.el (manual-misc-manuals): Use INFO_COMMON rather than 8 * admin.el (manual-misc-manuals): Use INFO_COMMON rather than
diff --git a/admin/notes/bzr b/admin/notes/bzr
index 8f7d0d94fa8..d3886abfd69 100644
--- a/admin/notes/bzr
+++ b/admin/notes/bzr
@@ -347,6 +347,9 @@ Runs on commit. Projects can enable it themselves by using `bzr
347config' to set post_commit_to option for a branch. See `bzr help email' 347config' to set post_commit_to option for a branch. See `bzr help email'
348(if you have the plugin installed) for other options. 348(if you have the plugin installed) for other options.
349 349
350The From: address will be that of your Savannah account, rather than
351your `bzr whoami' information.
352
350Note: if you have the bzr-email plugin installed locally, then when 353Note: if you have the bzr-email plugin installed locally, then when
351you commit to the Emacs repository it will also try to send a commit 354you commit to the Emacs repository it will also try to send a commit
352email from your local machine. If your machine is not configured to 355email from your local machine. If your machine is not configured to
diff --git a/admin/notes/elpa b/admin/notes/elpa
index db14456fe32..469a0ca8bd1 100644
--- a/admin/notes/elpa
+++ b/admin/notes/elpa
@@ -1,24 +1,21 @@
1NOTES ON THE EMACS PACKAGE ARCHIVE 1NOTES ON THE EMACS PACKAGE ARCHIVE
2 2
3The GNU Emacs package archive, at elpa.gnu.org, is managed using a Bzr 3The GNU Emacs package archive, at elpa.gnu.org, is managed using a Git
4branch named "elpa", hosted on Savannah. To check it out: 4repository named "elpa", hosted on Savannah. To check it out:
5 5
6 bzr branch bzr+ssh://USER@bzr.savannah.gnu.org/emacs/elpa elpa 6 git clone git://bzr.sv.gnu.org/emacs/elpa
7 cd elpa 7 cd elpa
8 echo "public_branch = bzr+ssh://USER@bzr.savannah.gnu.org/emacs/elpa" >> .bzr/branch/branch.conf 8 git remote set-url --push origin git+ssh://bzr.sv.gnu.org/srv/git/emacs/elpa
9 bzr bind bzr+ssh://USERNAME@bzr.savannah.gnu.org/emacs/elpa
10 [create task branch for edits, etc.] 9 [create task branch for edits, etc.]
11 10
12Changes to this branch propagate to elpa.gnu.org in a semi-manual way. 11Changes to this branch propagate to elpa.gnu.org via a "deployment" script run
13There exists a copy of the elpa branch on that machine. Someone with 12daily. This script (which is kept in elpa/admin/update-archive.sh) generates
14access logs in, pulls the latest changes from Savannah, and runs a 13the content visible at http://elpa.gnu.org/packages.
15"deployment" script. This script (which is itself kept in the Bzr
16branch) generates the content visible at http://elpa.gnu.org/packages.
17 14
18The reason we set things up this way, instead of using the package 15A new package is released as soon as the "version number" of that package is
19upload commands in package-x.el, is to let Emacs hackers conveniently 16changed. So you can use `elpa' to work on a package without fear of releasing
20edit the contents of the "elpa" branch. (In particular, multi-file 17those changes prematurely. And once the code is ready, just bump the
21packages are stored on the branch in source form, not as tarfiles.) 18version number to make a new release of the package.
22 19
23It is easy to use the elpa branch to deploy a "local" copy of the 20It is easy to use the elpa branch to deploy a "local" copy of the
24package archive. For details, see the README file in the elpa branch. 21package archive. For details, see the README file in the elpa branch.
diff --git a/admin/notes/hydra b/admin/notes/hydra
index 068bc70ee9c..71e35d092c8 100644
--- a/admin/notes/hydra
+++ b/admin/notes/hydra
@@ -5,15 +5,14 @@ See the end of the file for license conditions.
5 5
6NOTES FOR EMACS CONTINUOUS BUILD ON HYDRA 6NOTES FOR EMACS CONTINUOUS BUILD ON HYDRA
7 7
8A continuous build for Emacs trunk can be found at 8A continuous build for Emacs can be found at
9http://hydra.nixos.org/jobset/gnu/emacs-trunk 9http://hydra.nixos.org/jobset/gnu/emacs-trunk
10http://hydra.nixos.org/jobset/gnu/emacs-24
10 11
11* It builds (and runs ERT tests) on these platforms: 12* It builds Emacs on various platforms.
12i686-cygwin 13Sometimes jobs fail due to hydra problems rather than Emacs problems.
13i686-freebsd 14Eg it seems like the cygwin build will never work again.
14i686-linux 15http://lists.gnu.org/archive/html/hydra-users/2013-08/msg00000.html
15x86_64-darwin
16x86_64-linux
17 16
18* Mail notifications 17* Mail notifications
19In addition to the web interface, Hydra can send notifications by 18In addition to the web interface, Hydra can send notifications by
@@ -27,15 +26,15 @@ http://lists.gnu.org/mailman/listinfo/emacs-buildstatus
27* The Emacs jobset consists of the following jobs: 26* The Emacs jobset consists of the following jobs:
28 27
29** The `tarball' job 28** The `tarball' job
30which gets the source tree as input, and is just a `make dist' after 29which gets a checkout from bzr, and does a bootstrap followed
31some autoconf/-make or bootstrap script. 30by running make-dist to create a tarball. If this job fails, all the
31others will too (because they use the tarball as input).
32 32
33** The `build' job 33** The `build' job
34which gets the result of the tarball job as input, together with 34which starts from the tarball and does a normal build
35system identifier, this job basically does a normal make and make install.
36 35
37** The 'coverage' job 36** The 'coverage' job
38is now running `make check'. 37does a gcov build and then runs `make check'. Fails if any test fails.
39 38
40* Nix expressions 39* Nix expressions
41The recipe for GNU Emacs are available via Git: 40The recipe for GNU Emacs are available via Git:
diff --git a/admin/nt/README-ftp-server b/admin/nt/README-ftp-server
index 3a21733747d..304251f3ce4 100644
--- a/admin/nt/README-ftp-server
+++ b/admin/nt/README-ftp-server
@@ -16,12 +16,6 @@ See the end of the file for license conditions.
16 accustomed to compiling programs themselves. Corresponding source 16 accustomed to compiling programs themselves. Corresponding source
17 can be found in the parent directory in emacs-24.3.tar.gz. 17 can be found in the parent directory in emacs-24.3.tar.gz.
18 18
19 If you have access to the World Wide Web, I would recommend pointing
20 your favorite web browser to the following document (if you haven't
21 already):
22
23 http://www.gnu.org/software/emacs/windows/ntemacs.html
24
25* IMPORTANT LEGAL REMINDER 19* IMPORTANT LEGAL REMINDER
26 20
27 If you want to redistribute any of the precompiled distributions of 21 If you want to redistribute any of the precompiled distributions of
@@ -230,16 +224,10 @@ See the end of the file for license conditions.
230 224
231* Further information 225* Further information
232 226
233 If you have access to the World Wide Web, I would recommend pointing 227 The Emacs on MS Windows FAQ is distributed with Emacs (info
234 your favorite web browser to following the document (if you haven't 228 manual "efaq-w32"), and at
235 already):
236
237 http://www.gnu.org/software/emacs/windows/ntemacs.html
238 229
239 This document serves as an FAQ and a source for further information 230 http://www.gnu.org/software/emacs/manual/efaq-w32.html
240 about the Windows port and related software packages. Note that as
241 most of the information in that FAQ is for earlier versions, so some
242 information may not be relevant to Emacs-24.3.
243 231
244 In addition to the FAQ, there is a mailing list for discussing issues 232 In addition to the FAQ, there is a mailing list for discussing issues
245 related to the Windows port of Emacs. For information about the 233 related to the Windows port of Emacs. For information about the
diff --git a/admin/unidata/Makefile.in b/admin/unidata/Makefile.in
index c759079a49a..df225cc8cbf 100644
--- a/admin/unidata/Makefile.in
+++ b/admin/unidata/Makefile.in
@@ -21,7 +21,7 @@
21# 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
22# 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/>.
23 23
24SHELL = /bin/sh 24SHELL = @SHELL@
25 25
26srcdir = @srcdir@ 26srcdir = @srcdir@
27abs_builddir = @abs_builddir@ 27abs_builddir = @abs_builddir@
diff --git a/autogen/Makefile.in b/autogen/Makefile.in
index 4ea9aeb3561..19904e8631e 100644
--- a/autogen/Makefile.in
+++ b/autogen/Makefile.in
@@ -423,11 +423,7 @@ DEFS = @DEFS@
423DEPDIR = @DEPDIR@ 423DEPDIR = @DEPDIR@
424DEPFLAGS = @DEPFLAGS@ 424DEPFLAGS = @DEPFLAGS@
425DESLIB = @DESLIB@ 425DESLIB = @DESLIB@
426DOCMISC_DVI_W32 = @DOCMISC_DVI_W32@ 426DOCMISC_W32 = @DOCMISC_W32@
427DOCMISC_HTML_W32 = @DOCMISC_HTML_W32@
428DOCMISC_INFO_W32 = @DOCMISC_INFO_W32@
429DOCMISC_PDF_W32 = @DOCMISC_PDF_W32@
430DOCMISC_PS_W32 = @DOCMISC_PS_W32@
431ECHO_C = @ECHO_C@ 427ECHO_C = @ECHO_C@
432ECHO_N = @ECHO_N@ 428ECHO_N = @ECHO_N@
433ECHO_T = @ECHO_T@ 429ECHO_T = @ECHO_T@
@@ -681,7 +677,6 @@ GSETTINGS_LIBS = @GSETTINGS_LIBS@
681GTK_CFLAGS = @GTK_CFLAGS@ 677GTK_CFLAGS = @GTK_CFLAGS@
682GTK_LIBS = @GTK_LIBS@ 678GTK_LIBS = @GTK_LIBS@
683GTK_OBJ = @GTK_OBJ@ 679GTK_OBJ = @GTK_OBJ@
684GZIP_INFO = @GZIP_INFO@
685GZIP_PROG = @GZIP_PROG@ 680GZIP_PROG = @GZIP_PROG@
686HAVE_ALPHASORT = @HAVE_ALPHASORT@ 681HAVE_ALPHASORT = @HAVE_ALPHASORT@
687HAVE_ATOLL = @HAVE_ATOLL@ 682HAVE_ATOLL = @HAVE_ATOLL@
@@ -1224,6 +1219,7 @@ ns_appbindir = @ns_appbindir@
1224ns_appdir = @ns_appdir@ 1219ns_appdir = @ns_appdir@
1225ns_appresdir = @ns_appresdir@ 1220ns_appresdir = @ns_appresdir@
1226ns_appsrc = @ns_appsrc@ 1221ns_appsrc = @ns_appsrc@
1222ns_check_file = @ns_check_file@
1227ns_self_contained = @ns_self_contained@ 1223ns_self_contained = @ns_self_contained@
1228oldincludedir = @oldincludedir@ 1224oldincludedir = @oldincludedir@
1229pdfdir = @pdfdir@ 1225pdfdir = @pdfdir@
diff --git a/autogen/configure b/autogen/configure
index 28c57222a1d..a0f302b4ac0 100755
--- a/autogen/configure
+++ b/autogen/configure
@@ -604,6 +604,7 @@ am__EXEEXT_TRUE
604LTLIBOBJS 604LTLIBOBJS
605LIBOBJS 605LIBOBJS
606SUBDIR_MAKEFILES_IN 606SUBDIR_MAKEFILES_IN
607ns_check_file
607WINDOW_SYSTEM_OBJ 608WINDOW_SYSTEM_OBJ
608EMACS_HEAPSIZE 609EMACS_HEAPSIZE
609TEMACS_POST_LINK 610TEMACS_POST_LINK
@@ -1397,11 +1398,7 @@ UNEXEC_OBJ
1397C_SWITCH_MACHINE 1398C_SWITCH_MACHINE
1398LD_SWITCH_SYSTEM 1399LD_SWITCH_SYSTEM
1399CANNOT_DUMP 1400CANNOT_DUMP
1400DOCMISC_PS_W32 1401DOCMISC_W32
1401DOCMISC_PDF_W32
1402DOCMISC_INFO_W32
1403DOCMISC_HTML_W32
1404DOCMISC_DVI_W32
1405INFO_OPTS 1402INFO_OPTS
1406INFO_EXT 1403INFO_EXT
1407HAVE_MAKEINFO 1404HAVE_MAKEINFO
@@ -1445,7 +1442,6 @@ build_vendor
1445build_cpu 1442build_cpu
1446build 1443build
1447PROFILING_CFLAGS 1444PROFILING_CFLAGS
1448GZIP_INFO
1449cache_file 1445cache_file
1450am__untar 1446am__untar
1451am__tar 1447am__tar
@@ -1548,7 +1544,7 @@ with_gnutls
1548with_zlib 1544with_zlib
1549with_file_notification 1545with_file_notification
1550with_makeinfo 1546with_makeinfo
1551with_compress_info 1547with_compress_install
1552with_pkg_config_prog 1548with_pkg_config_prog
1553with_gameuser 1549with_gameuser
1554with_gnustep_conf 1550with_gnustep_conf
@@ -2246,8 +2242,8 @@ Optional Packages:
2246 --with-mail-unlink unlink, rather than empty, mail spool after reading 2242 --with-mail-unlink unlink, rather than empty, mail spool after reading
2247 --with-mailhost=HOSTNAME 2243 --with-mailhost=HOSTNAME
2248 string giving default POP mail host 2244 string giving default POP mail host
2249 --with-sound=VALUE compile with sound support (VALUE one of: yes, 2245 --with-sound=VALUE compile with sound support (VALUE one of: yes, alsa,
2250 ossaudio, alsa, no; default yes). Only for 2246 oss, bsd-ossaudio, no; default yes). Only for
2251 GNU/Linux, FreeBSD, NetBSD, MinGW. 2247 GNU/Linux, FreeBSD, NetBSD, MinGW.
2252 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2, 2248 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2,
2253 gtk3, lucid or athena, motif, no) 2249 gtk3, lucid or athena, motif, no)
@@ -2281,7 +2277,9 @@ Optional Packages:
2281 use a file notification library (LIB one of: yes, 2277 use a file notification library (LIB one of: yes,
2282 gfile, inotify, w32, no) 2278 gfile, inotify, w32, no)
2283 --without-makeinfo don't require makeinfo for building manuals 2279 --without-makeinfo don't require makeinfo for building manuals
2284 --without-compress-info don't compress the installed Info pages 2280 --without-compress-install
2281 don't compress some files (.el, .info, etc.) when
2282 installing. Equivalent to: make GZIP_PROG= install
2285 --with-pkg-config-prog=FILENAME 2283 --with-pkg-config-prog=FILENAME
2286 file name of pkg-config for finding GTK and librsvg 2284 file name of pkg-config for finding GTK and librsvg
2287 --with-gameuser=USER user for shared game score files 2285 --with-gameuser=USER user for shared game score files
@@ -4155,9 +4153,9 @@ fi
4155# Check whether --with-sound was given. 4153# Check whether --with-sound was given.
4156if test "${with_sound+set}" = set; then : 4154if test "${with_sound+set}" = set; then :
4157 withval=$with_sound; case "${withval}" in 4155 withval=$with_sound; case "${withval}" in
4158 yes|no|ossaudio|alsa) val=$withval ;; 4156 yes|no|alsa|oss|bsd-ossaudio) val=$withval ;;
4159 *) as_fn_error "\`--with-sound=$withval' is invalid; 4157 *) as_fn_error "\`--with-sound=$withval' is invalid;
4160this option's value should be \`yes', \`no', \`ossaudio', or \`alsa'." "$LINENO" 5 4158this option's value should be \`yes', \`no', \`alsa', \`oss', or \`bsd-ossaudio'." "$LINENO" 5
4161 ;; 4159 ;;
4162 esac 4160 esac
4163 with_sound=$val 4161 with_sound=$val
@@ -4432,17 +4430,11 @@ fi
4432## This is an option because I do not know if all info/man support 4430## This is an option because I do not know if all info/man support
4433## compressed files, nor how to test if they do so. 4431## compressed files, nor how to test if they do so.
4434 4432
4435# Check whether --with-compress-info was given. 4433# Check whether --with-compress-install was given.
4436if test "${with_compress_info+set}" = set; then : 4434if test "${with_compress_install+set}" = set; then :
4437 withval=$with_compress_info; 4435 withval=$with_compress_install;
4438else 4436else
4439 with_compress_info=$with_features 4437 with_compress_install=$with_features
4440fi
4441
4442if test $with_compress_info = yes; then
4443 GZIP_INFO=yes
4444else
4445 GZIP_INFO=
4446fi 4438fi
4447 4439
4448 4440
@@ -7659,6 +7651,13 @@ fi
7659 # The following line should be removable at some point. 7651 # The following line should be removable at some point.
7660 nw="$nw -Wsuggest-attribute=pure" 7652 nw="$nw -Wsuggest-attribute=pure"
7661 7653
7654 # This part is merely for shortening the command line,
7655 # since -Wno-FOO needs to be added below regardless.
7656 nw="$nw -Wmissing-field-initializers"
7657 nw="$nw -Wswitch"
7658 nw="$nw -Wtype-limits"
7659 nw="$nw -Wunused-parameter"
7660
7662 # clang is unduly picky about some things. 7661 # clang is unduly picky about some things.
7663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5 7662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
7664$as_echo_n "checking whether the compiler is clang... " >&6; } 7663$as_echo_n "checking whether the compiler is clang... " >&6; }
@@ -8614,6 +8613,9 @@ fi
8614 8613
8615 8614
8616 8615
8616test $with_compress_install != yes && test -n "$GZIP_PROG" && \
8617 GZIP_PROG=" # $GZIP_PROG # (disabled by configure --without-compress-install)"
8618
8617if test $opsys = gnu-linux; then 8619if test $opsys = gnu-linux; then
8618 # Extract the first word of "paxctl", so it can be a program name with args. 8620 # Extract the first word of "paxctl", so it can be a program name with args.
8619set dummy paxctl; ac_word=$2 8621set dummy paxctl; ac_word=$2
@@ -8761,25 +8763,13 @@ INFO_OPTS=--no-split
8761 8763
8762 8764
8763if test $opsys = mingw32; then 8765if test $opsys = mingw32; then
8764 DOCMISC_DVI_W32=efaq-w32.dvi 8766 DOCMISC_W32=efaq-w32
8765 DOCMISC_HTML_W32=efaq-w32.html
8766 DOCMISC_INFO_W32=efaq-w32.info
8767 DOCMISC_PDF_W32=efaq-w32.pdf
8768 DOCMISC_PS_W32=efaq-w32.ps
8769else 8767else
8770 DOCMISC_DVI_W32= 8768 DOCMISC_W32=
8771 DOCMISC_HTML_W32=
8772 DOCMISC_INFO_W32=
8773 DOCMISC_PDF_W32=
8774 DOCMISC_PS_W32=
8775fi 8769fi
8776 8770
8777 8771
8778 8772
8779
8780
8781
8782
8783if test x$GCC = xyes; then 8773if test x$GCC = xyes; then
8784 test "x$GCC_LINK_TEST_OPTIONS" != x && \ 8774 test "x$GCC_LINK_TEST_OPTIONS" != x && \
8785 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS" 8775 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
@@ -8789,13 +8779,15 @@ else
8789fi 8779fi
8790 8780
8791 8781
8792late_LDFLAGS=$LDFLAGS 8782late_LDFLAGS="$LDFLAGS"
8793if test x$GCC = xyes; then 8783if test x$GCC = xyes; then
8794 LDFLAGS="$LDFLAGS -Wl,-znocombreloc" 8784 LDFLAGS_NOCOMBRELOC="-Wl,-znocombreloc"
8795else 8785else
8796 LDFLAGS="$LDFLAGS -znocombreloc" 8786 LDFLAGS_NOCOMBRELOC="-znocombreloc"
8797fi 8787fi
8798 8788
8789LDFLAGS="$LDFLAGS $LDFLAGS_NOCOMBRELOC"
8790
8799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5 8791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
8800$as_echo_n "checking for -znocombreloc... " >&6; } 8792$as_echo_n "checking for -znocombreloc... " >&6; }
8801cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -8813,13 +8805,14 @@ if ac_fn_c_try_link "$LINENO"; then :
8813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8814$as_echo "yes" >&6; } 8806$as_echo "yes" >&6; }
8815else 8807else
8816 LDFLAGS=$late_LDFLAGS 8808 LDFLAGS_NOCOMBRELOC=
8817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8818$as_echo "no" >&6; } 8810$as_echo "no" >&6; }
8819fi 8811fi
8820rm -f core conftest.err conftest.$ac_objext \ 8812rm -f core conftest.err conftest.$ac_objext \
8821 conftest$ac_exeext conftest.$ac_ext 8813 conftest$ac_exeext conftest.$ac_ext
8822 8814
8815LDFLAGS="$late_LDFLAGS"
8823 8816
8824test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no 8817test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
8825case "$opsys" in 8818case "$opsys" in
@@ -9097,7 +9090,10 @@ fi
9097 9090
9098done 9091done
9099 9092
9100 if test "${with_sound}" = "ossaudio" || test "${with_sound}" = "yes"; then 9093 test "${with_sound}" = "oss" && test "${have_sound_header}" != "yes" && \
9094 as_fn_error "OSS sound support requested but not found." "$LINENO" 5
9095
9096 if test "${with_sound}" = "bsd-ossaudio" || test "${with_sound}" = "yes"; then
9101 # Emulation library used on NetBSD. 9097 # Emulation library used on NetBSD.
9102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5 9098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
9103$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; } 9099$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
@@ -9141,8 +9137,8 @@ else
9141 LIBSOUND= 9137 LIBSOUND=
9142fi 9138fi
9143 9139
9144 test "${with_sound}" = "ossaudio" && test -z "$LIBSOUND" && \ 9140 test "${with_sound}" = "bsd-ossaudio" && test -z "$LIBSOUND" && \
9145 as_fn_error "ossaudio sound support requested but not found." "$LINENO" 5 9141 as_fn_error "bsd-ossaudio sound support requested but not found." "$LINENO" 5
9146 fi 9142 fi
9147 9143
9148 9144
@@ -10352,6 +10348,137 @@ fi
10352## $window_system is now set to the window system we will 10348## $window_system is now set to the window system we will
10353## ultimately use. 10349## ultimately use.
10354 10350
10351if test "$window_system" = none && test "$gl_gcc_warnings" = yes; then
10352 # Too many warnings for now.
10353 nw=
10354 nw="$nw -Wsuggest-attribute=const"
10355 nw="$nw -Wsuggest-attribute=noreturn"
10356
10357 gl_warn_set=
10358 set x $WARN_CFLAGS; shift
10359 for gl_warn_item
10360 do
10361 case " $nw " in
10362 *" $gl_warn_item "*)
10363 ;;
10364 *)
10365 gl_warn_set="$gl_warn_set $gl_warn_item"
10366 ;;
10367 esac
10368 done
10369 WARN_CFLAGS=$gl_warn_set
10370
10371
10372
10373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-variable" >&5
10374$as_echo_n "checking whether C compiler handles -Wno-unused-variable... " >&6; }
10375if test "${gl_cv_warn_c__Wno_unused_variable+set}" = set; then :
10376 $as_echo_n "(cached) " >&6
10377else
10378
10379 gl_save_compiler_FLAGS="$CFLAGS"
10380 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-variable"
10381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10382/* end confdefs.h. */
10383
10384int
10385main ()
10386{
10387
10388 ;
10389 return 0;
10390}
10391_ACEOF
10392if ac_fn_c_try_compile "$LINENO"; then :
10393 gl_cv_warn_c__Wno_unused_variable=yes
10394else
10395 gl_cv_warn_c__Wno_unused_variable=no
10396fi
10397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10398 CFLAGS="$gl_save_compiler_FLAGS"
10399
10400fi
10401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_variable" >&5
10402$as_echo "$gl_cv_warn_c__Wno_unused_variable" >&6; }
10403if test "x$gl_cv_warn_c__Wno_unused_variable" = x""yes; then :
10404 as_fn_append WARN_CFLAGS " -Wno-unused-variable"
10405fi
10406
10407
10408
10409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-but-set-variable" >&5
10410$as_echo_n "checking whether C compiler handles -Wno-unused-but-set-variable... " >&6; }
10411if test "${gl_cv_warn_c__Wno_unused_but_set_variable+set}" = set; then :
10412 $as_echo_n "(cached) " >&6
10413else
10414
10415 gl_save_compiler_FLAGS="$CFLAGS"
10416 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-but-set-variable"
10417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10418/* end confdefs.h. */
10419
10420int
10421main ()
10422{
10423
10424 ;
10425 return 0;
10426}
10427_ACEOF
10428if ac_fn_c_try_compile "$LINENO"; then :
10429 gl_cv_warn_c__Wno_unused_but_set_variable=yes
10430else
10431 gl_cv_warn_c__Wno_unused_but_set_variable=no
10432fi
10433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10434 CFLAGS="$gl_save_compiler_FLAGS"
10435
10436fi
10437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_but_set_variable" >&5
10438$as_echo "$gl_cv_warn_c__Wno_unused_but_set_variable" >&6; }
10439if test "x$gl_cv_warn_c__Wno_unused_but_set_variable" = x""yes; then :
10440 as_fn_append WARN_CFLAGS " -Wno-unused-but-set-variable"
10441fi
10442
10443
10444
10445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-but-set-parameter" >&5
10446$as_echo_n "checking whether C compiler handles -Wno-unused-but-set-parameter... " >&6; }
10447if test "${gl_cv_warn_c__Wno_unused_but_set_parameter+set}" = set; then :
10448 $as_echo_n "(cached) " >&6
10449else
10450
10451 gl_save_compiler_FLAGS="$CFLAGS"
10452 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-but-set-parameter"
10453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10454/* end confdefs.h. */
10455
10456int
10457main ()
10458{
10459
10460 ;
10461 return 0;
10462}
10463_ACEOF
10464if ac_fn_c_try_compile "$LINENO"; then :
10465 gl_cv_warn_c__Wno_unused_but_set_parameter=yes
10466else
10467 gl_cv_warn_c__Wno_unused_but_set_parameter=no
10468fi
10469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10470 CFLAGS="$gl_save_compiler_FLAGS"
10471
10472fi
10473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_but_set_parameter" >&5
10474$as_echo "$gl_cv_warn_c__Wno_unused_but_set_parameter" >&6; }
10475if test "x$gl_cv_warn_c__Wno_unused_but_set_parameter" = x""yes; then :
10476 as_fn_append WARN_CFLAGS " -Wno-unused-but-set-parameter"
10477fi
10478
10479
10480fi
10481
10355term_header= 10482term_header=
10356HAVE_X_WINDOWS=no 10483HAVE_X_WINDOWS=no
10357HAVE_X11=no 10484HAVE_X11=no
@@ -28925,6 +29052,8 @@ if test x$ac_enable_profiling != x ; then
28925 esac 29052 esac
28926fi 29053fi
28927 29054
29055LD_SWITCH_SYSTEM_TEMACS="$LDFLAGS_NOCOMBRELOC $LD_SWITCH_SYSTEM_TEMACS"
29056
28928 29057
28929 29058
28930## MinGW-specific post-link processing of temacs. 29059## MinGW-specific post-link processing of temacs.
@@ -29066,10 +29195,13 @@ if test "$HAVE_NS" = "yes"; then
29066 if test "$NS_IMPL_GNUSTEP" = yes; then 29195 if test "$NS_IMPL_GNUSTEP" = yes; then
29067 ac_config_files="$ac_config_files nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:nextstep/templates/Info-gnustep.plist.in nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in" 29196 ac_config_files="$ac_config_files nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:nextstep/templates/Info-gnustep.plist.in nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in"
29068 29197
29198 ns_check_file=Resources/Info-gnustep.plist
29069 else 29199 else
29070 ac_config_files="$ac_config_files nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:nextstep/templates/InfoPlist.strings.in" 29200 ac_config_files="$ac_config_files nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:nextstep/templates/InfoPlist.strings.in"
29071 29201
29202 ns_check_file=Contents/Info.plist
29072 fi 29203 fi
29204
29073fi 29205fi
29074 29206
29075SUBDIR_MAKEFILES="lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile nextstep/Makefile nt/Makefile" 29207SUBDIR_MAKEFILES="lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile nextstep/Makefile nt/Makefile"
diff --git a/configure.ac b/configure.ac
index 3c0ac24587f..55e8a69b542 100644
--- a/configure.ac
+++ b/configure.ac
@@ -167,12 +167,12 @@ AC_ARG_WITH([mailhost],[AS_HELP_STRING([--with-mailhost=HOSTNAME],
167 AC_DEFINE_UNQUOTED(MAILHOST, ["$withval"], [String giving fallback POP mail host.])) 167 AC_DEFINE_UNQUOTED(MAILHOST, ["$withval"], [String giving fallback POP mail host.]))
168 168
169AC_ARG_WITH([sound],[AS_HELP_STRING([--with-sound=VALUE], 169AC_ARG_WITH([sound],[AS_HELP_STRING([--with-sound=VALUE],
170 [compile with sound support (VALUE one of: yes, ossaudio, alsa, no; 170 [compile with sound support (VALUE one of: yes, alsa, oss, bsd-ossaudio, no;
171default yes). Only for GNU/Linux, FreeBSD, NetBSD, MinGW.])], 171default yes). Only for GNU/Linux, FreeBSD, NetBSD, MinGW.])],
172 [ case "${withval}" in 172 [ case "${withval}" in
173 yes|no|ossaudio|alsa) val=$withval ;; 173 yes|no|alsa|oss|bsd-ossaudio) val=$withval ;;
174 *) AC_MSG_ERROR([`--with-sound=$withval' is invalid; 174 *) AC_MSG_ERROR([`--with-sound=$withval' is invalid;
175this option's value should be `yes', `no', `ossaudio', or `alsa'.]) 175this option's value should be `yes', `no', `alsa', `oss', or `bsd-ossaudio'.])
176 ;; 176 ;;
177 esac 177 esac
178 with_sound=$val 178 with_sound=$val
@@ -268,13 +268,9 @@ AC_SUBST(cache_file)
268 268
269## This is an option because I do not know if all info/man support 269## This is an option because I do not know if all info/man support
270## compressed files, nor how to test if they do so. 270## compressed files, nor how to test if they do so.
271OPTION_DEFAULT_ON([compress-info],[don't compress the installed Info pages]) 271OPTION_DEFAULT_ON([compress-install],
272if test $with_compress_info = yes; then 272 [don't compress some files (.el, .info, etc.) when installing. Equivalent to:
273 GZIP_INFO=yes 273make GZIP_PROG= install])
274else
275 GZIP_INFO=
276fi
277AC_SUBST(GZIP_INFO)
278 274
279AC_ARG_WITH([pkg-config-prog],dnl 275AC_ARG_WITH([pkg-config-prog],dnl
280[AS_HELP_STRING([--with-pkg-config-prog=FILENAME], 276[AS_HELP_STRING([--with-pkg-config-prog=FILENAME],
@@ -828,6 +824,13 @@ else
828 # The following line should be removable at some point. 824 # The following line should be removable at some point.
829 nw="$nw -Wsuggest-attribute=pure" 825 nw="$nw -Wsuggest-attribute=pure"
830 826
827 # This part is merely for shortening the command line,
828 # since -Wno-FOO needs to be added below regardless.
829 nw="$nw -Wmissing-field-initializers"
830 nw="$nw -Wswitch"
831 nw="$nw -Wtype-limits"
832 nw="$nw -Wunused-parameter"
833
831 # clang is unduly picky about some things. 834 # clang is unduly picky about some things.
832 AC_CACHE_CHECK([whether the compiler is clang], [emacs_cv_clang], 835 AC_CACHE_CHECK([whether the compiler is clang], [emacs_cv_clang],
833 [AC_COMPILE_IFELSE( 836 [AC_COMPILE_IFELSE(
@@ -945,6 +948,9 @@ AC_PATH_PROG(INSTALL_INFO, install-info, :,
945dnl Don't use GZIP, which is used by gzip for additional parameters. 948dnl Don't use GZIP, which is used by gzip for additional parameters.
946AC_PATH_PROG(GZIP_PROG, gzip) 949AC_PATH_PROG(GZIP_PROG, gzip)
947 950
951test $with_compress_install != yes && test -n "$GZIP_PROG" && \
952 GZIP_PROG=" # $GZIP_PROG # (disabled by configure --without-compress-install)"
953
948if test $opsys = gnu-linux; then 954if test $opsys = gnu-linux; then
949 AC_PATH_PROG(PAXCTL, paxctl,, 955 AC_PATH_PROG(PAXCTL, paxctl,,
950 [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin]) 956 [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin])
@@ -1000,23 +1006,11 @@ AC_SUBST(INFO_EXT)
1000AC_SUBST(INFO_OPTS) 1006AC_SUBST(INFO_OPTS)
1001 1007
1002if test $opsys = mingw32; then 1008if test $opsys = mingw32; then
1003 DOCMISC_DVI_W32=efaq-w32.dvi 1009 DOCMISC_W32=efaq-w32
1004 DOCMISC_HTML_W32=efaq-w32.html
1005 DOCMISC_INFO_W32=efaq-w32
1006 DOCMISC_PDF_W32=efaq-w32.pdf
1007 DOCMISC_PS_W32=efaq-w32.ps
1008else 1010else
1009 DOCMISC_DVI_W32= 1011 DOCMISC_W32=
1010 DOCMISC_HTML_W32= 1012fi
1011 DOCMISC_INFO_W32= 1013AC_SUBST(DOCMISC_W32)
1012 DOCMISC_PDF_W32=
1013 DOCMISC_PS_W32=
1014fi
1015AC_SUBST(DOCMISC_DVI_W32)
1016AC_SUBST(DOCMISC_HTML_W32)
1017AC_SUBST(DOCMISC_INFO_W32)
1018AC_SUBST(DOCMISC_PDF_W32)
1019AC_SUBST(DOCMISC_PS_W32)
1020 1014
1021dnl Add our options to ac_link now, after it is set up. 1015dnl Add our options to ac_link now, after it is set up.
1022 1016
@@ -1034,19 +1028,30 @@ dnl (Don't use `-z nocombreloc' as -z takes no arg on Irix.)
1034dnl Treat GCC specially since it just gives a non-fatal `unrecognized option' 1028dnl Treat GCC specially since it just gives a non-fatal `unrecognized option'
1035dnl if not built to support GNU ld. 1029dnl if not built to support GNU ld.
1036 1030
1037late_LDFLAGS=$LDFLAGS 1031dnl For a long time, -znocombreloc was added to LDFLAGS rather than
1032dnl LD_SWITCH_SYSTEM_TEMACS. That is:
1033dnl * inappropriate, as LDFLAGS is a user option but this is essential.
1034dnl Eg "make LDFLAGS=... all" could run into problems,
1035dnl http://bugs.debian.org/684788
1036dnl * unnecessary, since temacs is the only thing that actually needs it.
1037dnl Indeed this is where it was originally, prior to:
1038dnl http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-03/msg00170.html
1039late_LDFLAGS="$LDFLAGS"
1038if test x$GCC = xyes; then 1040if test x$GCC = xyes; then
1039 LDFLAGS="$LDFLAGS -Wl,-znocombreloc" 1041 LDFLAGS_NOCOMBRELOC="-Wl,-znocombreloc"
1040else 1042else
1041 LDFLAGS="$LDFLAGS -znocombreloc" 1043 LDFLAGS_NOCOMBRELOC="-znocombreloc"
1042fi 1044fi
1043 1045
1046LDFLAGS="$LDFLAGS $LDFLAGS_NOCOMBRELOC"
1047
1044AC_MSG_CHECKING([for -znocombreloc]) 1048AC_MSG_CHECKING([for -znocombreloc])
1045AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], 1049AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
1046 [AC_MSG_RESULT(yes)], 1050 [AC_MSG_RESULT(yes)],
1047 LDFLAGS=$late_LDFLAGS 1051 LDFLAGS_NOCOMBRELOC=
1048 [AC_MSG_RESULT(no)]) 1052 [AC_MSG_RESULT(no)])
1049 1053
1054LDFLAGS="$late_LDFLAGS"
1050 1055
1051dnl The function dump-emacs will not be defined and temacs will do 1056dnl The function dump-emacs will not be defined and temacs will do
1052dnl (load "loadup") automatically unless told otherwise. 1057dnl (load "loadup") automatically unless told otherwise.
@@ -1321,12 +1326,15 @@ if test "${with_sound}" != "no"; then
1321 #include <windows.h> 1326 #include <windows.h>
1322 #endif 1327 #endif
1323 ]) 1328 ])
1324 if test "${with_sound}" = "ossaudio" || test "${with_sound}" = "yes"; then 1329 test "${with_sound}" = "oss" && test "${have_sound_header}" != "yes" && \
1330 AC_MSG_ERROR([OSS sound support requested but not found.])
1331
1332 if test "${with_sound}" = "bsd-ossaudio" || test "${with_sound}" = "yes"; then
1325 # Emulation library used on NetBSD. 1333 # Emulation library used on NetBSD.
1326 AC_CHECK_LIB(ossaudio, _oss_ioctl, LIBSOUND=-lossaudio, LIBSOUND=) 1334 AC_CHECK_LIB(ossaudio, _oss_ioctl, LIBSOUND=-lossaudio, LIBSOUND=)
1327 test "${with_sound}" = "ossaudio" && test -z "$LIBSOUND" && \ 1335 test "${with_sound}" = "bsd-ossaudio" && test -z "$LIBSOUND" && \
1328 AC_MSG_ERROR([ossaudio sound support requested but not found.]) 1336 AC_MSG_ERROR([bsd-ossaudio sound support requested but not found.])
1329 dnl FIXME? If we did find ossaudio, should we set with_sound=ossaudio? 1337 dnl FIXME? If we did find ossaudio, should we set with_sound=bsd-ossaudio?
1330 dnl Traditionally, we go on to check for alsa too. Does that make sense? 1338 dnl Traditionally, we go on to check for alsa too. Does that make sense?
1331 fi 1339 fi
1332 AC_SUBST(LIBSOUND) 1340 AC_SUBST(LIBSOUND)
@@ -1786,6 +1794,18 @@ fi
1786## $window_system is now set to the window system we will 1794## $window_system is now set to the window system we will
1787## ultimately use. 1795## ultimately use.
1788 1796
1797if test "$window_system" = none && test "$gl_gcc_warnings" = yes; then
1798 # Too many warnings for now.
1799 nw=
1800 nw="$nw -Wsuggest-attribute=const"
1801 nw="$nw -Wsuggest-attribute=noreturn"
1802 gl_MANYWARN_COMPLEMENT([WARN_CFLAGS], [$WARN_CFLAGS], [$nw])
1803
1804 gl_WARN_ADD([-Wno-unused-variable])
1805 gl_WARN_ADD([-Wno-unused-but-set-variable])
1806 gl_WARN_ADD([-Wno-unused-but-set-parameter])
1807fi
1808
1789term_header= 1809term_header=
1790HAVE_X_WINDOWS=no 1810HAVE_X_WINDOWS=no
1791HAVE_X11=no 1811HAVE_X11=no
@@ -4770,6 +4790,8 @@ if test x$ac_enable_profiling != x ; then
4770 esac 4790 esac
4771fi 4791fi
4772 4792
4793LD_SWITCH_SYSTEM_TEMACS="$LDFLAGS_NOCOMBRELOC $LD_SWITCH_SYSTEM_TEMACS"
4794
4773AC_SUBST(LD_SWITCH_SYSTEM_TEMACS) 4795AC_SUBST(LD_SWITCH_SYSTEM_TEMACS)
4774 4796
4775## MinGW-specific post-link processing of temacs. 4797## MinGW-specific post-link processing of temacs.
@@ -4949,10 +4971,13 @@ if test "$HAVE_NS" = "yes"; then
4949 if test "$NS_IMPL_GNUSTEP" = yes; then 4971 if test "$NS_IMPL_GNUSTEP" = yes; then
4950 AC_CONFIG_FILES([nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:nextstep/templates/Info-gnustep.plist.in \ 4972 AC_CONFIG_FILES([nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:nextstep/templates/Info-gnustep.plist.in \
4951 nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in]) 4973 nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in])
4974 ns_check_file=Resources/Info-gnustep.plist
4952 else 4975 else
4953 AC_CONFIG_FILES([nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in \ 4976 AC_CONFIG_FILES([nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in \
4954 nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:nextstep/templates/InfoPlist.strings.in]) 4977 nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:nextstep/templates/InfoPlist.strings.in])
4978 ns_check_file=Contents/Info.plist
4955 fi 4979 fi
4980 AC_SUBST(ns_check_file)
4956fi 4981fi
4957 4982
4958dnl Obviously there is duplication here wrt $SUBDIR_MAKEFILES. 4983dnl Obviously there is duplication here wrt $SUBDIR_MAKEFILES.
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index f94db60f25f..7ff13a70718 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,18 @@
12013-09-04 Xue Fuqiao <xfq.free@gmail.com>
2
3 * maintaining.texi (VC Ignore): Mention `vc-ignore' with prefix argument.
4
52013-08-31 Ulrich Müller <ulm@gentoo.org>
6
7 * xresources.texi (Motif Resources):
8 Rename from LessTif Resources. Update xrefs. (Bug#15145)
9 * emacs.texi: Update menu.
10
112013-08-28 Paul Eggert <eggert@cs.ucla.edu>
12
13 * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
14 for portability to hosts where /bin/sh has problems.
15
12013-08-17 Xue Fuqiao <xfq.free@gmail.com> 162013-08-17 Xue Fuqiao <xfq.free@gmail.com>
2 17
3 * text.texi (Enriched Justification): Minor fixes. 18 * text.texi (Enriched Justification): Minor fixes.
diff --git a/doc/emacs/Makefile.in b/doc/emacs/Makefile.in
index 7aeead4e2f6..bf9f8152ad4 100644
--- a/doc/emacs/Makefile.in
+++ b/doc/emacs/Makefile.in
@@ -17,7 +17,7 @@
17# You should have received a copy of the GNU General Public License 17# You should have received a copy of the GNU General Public License
18# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. 18# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
19 19
20SHELL = /bin/sh 20SHELL = @SHELL@
21 21
22# NB If you add any more configure variables, 22# NB If you add any more configure variables,
23# update the sed rules in the dist target below. 23# update the sed rules in the dist target below.
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index 8a518b82abb..985466810f2 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -1189,7 +1189,7 @@ X Options and Resources
1189* Resources:: Using X resources with Emacs (in general). 1189* Resources:: Using X resources with Emacs (in general).
1190* Table of Resources:: Table of specific X resources that affect Emacs. 1190* Table of Resources:: Table of specific X resources that affect Emacs.
1191* Lucid Resources:: X resources for Lucid menus. 1191* Lucid Resources:: X resources for Lucid menus.
1192* LessTif Resources:: X resources for LessTif and Motif menus. 1192* Motif Resources:: X resources for Motif and LessTif menus.
1193* GTK resources:: Resources for GTK widgets. 1193* GTK resources:: Resources for GTK widgets.
1194 1194
1195GTK resources 1195GTK resources
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
index 553375442d5..4a61db5509b 100644
--- a/doc/emacs/maintaining.texi
+++ b/doc/emacs/maintaining.texi
@@ -1043,12 +1043,14 @@ Ignore a file under current version control system. (@code{vc-ignore}).
1043 1043
1044@kindex C-x v G 1044@kindex C-x v G
1045@findex vc-ignore 1045@findex vc-ignore
1046 Many source trees contain some files that do not need to be versioned, 1046 Many source trees contain some files that do not need to be
1047such as editor backups, object or bytecode files, and built programs. 1047versioned, such as editor backups, object or bytecode files, and built
1048You can simply not add them, but then they’ll always crop up as 1048programs. You can simply not add them, but then they’ll always crop
1049unknown files. You can also tell the version control system to ignore 1049up as unknown files. You can also tell the version control system to
1050these files by adding them to the ignore file at the top of the tree. 1050ignore these files by adding them to the ignore file at the top of the
1051@kbd{C-x v G} (@code{vc-ignore}) can help you do this. 1051tree. @kbd{C-x v G} (@code{vc-ignore}) can help you do this. When
1052called with a prefix argument, you can remove a file from the ignored
1053file list.
1052 1054
1053@node VC Directory Mode 1055@node VC Directory Mode
1054@subsection VC Directory Mode 1056@subsection VC Directory Mode
diff --git a/doc/emacs/xresources.texi b/doc/emacs/xresources.texi
index 3723c8e5e1d..b2ebf634ba0 100644
--- a/doc/emacs/xresources.texi
+++ b/doc/emacs/xresources.texi
@@ -27,7 +27,7 @@ system registry (@pxref{MS-Windows Registry}).
27* Resources:: Using X resources with Emacs (in general). 27* Resources:: Using X resources with Emacs (in general).
28* Table of Resources:: Table of specific X resources that affect Emacs. 28* Table of Resources:: Table of specific X resources that affect Emacs.
29* Lucid Resources:: X resources for Lucid menus. 29* Lucid Resources:: X resources for Lucid menus.
30* LessTif Resources:: X resources for LessTif and Motif menus. 30* Motif Resources:: X resources for Motif and LessTif menus.
31* GTK resources:: Resources for GTK widgets. 31* GTK resources:: Resources for GTK widgets.
32@end menu 32@end menu
33 33
@@ -260,7 +260,7 @@ compiled with GTK+ support.
260@ifnottex 260@ifnottex
261@item @code{selectionFont} (class @code{SelectionFont}) 261@item @code{selectionFont} (class @code{SelectionFont})
262Font name for pop-up menu items, in non-toolkit versions of Emacs. (For 262Font name for pop-up menu items, in non-toolkit versions of Emacs. (For
263toolkit versions, see @ref{Lucid Resources}, also see @ref{LessTif 263toolkit versions, see @ref{Lucid Resources}, also see @ref{Motif
264Resources}.) 264Resources}.)
265 265
266@item @code{selectionTimeout} (class @code{SelectionTimeout}) 266@item @code{selectionTimeout} (class @code{SelectionTimeout})
@@ -370,15 +370,15 @@ elements. Default is 1.
370Margin of the menu bar, in characters. Default is 1. 370Margin of the menu bar, in characters. Default is 1.
371@end table 371@end table
372 372
373@node LessTif Resources 373@node Motif Resources
374@appendixsec LessTif Menu X Resources 374@appendixsec Motif Menu X Resources
375@cindex Menu X Resources (LessTif widgets) 375@cindex Menu X Resources (Motif widgets)
376@cindex LessTif Widget X Resources 376@cindex Motif Widget X Resources
377 377
378 If Emacs is compiled with the X toolkit support using LessTif or 378 If Emacs is compiled with the X toolkit support using Motif or
379Motif widgets, you can use X resources to customize the appearance of 379LessTif widgets, you can use X resources to customize the appearance
380the menu bar, pop-up menus, and dialog boxes. However, the resources 380of the menu bar, pop-up menus, and dialog boxes. However, the
381are organized differently from Lucid widgets. 381resources are organized differently from Lucid widgets.
382 382
383 The resource names for the menu bar are in the @samp{pane.menubar} 383 The resource names for the menu bar are in the @samp{pane.menubar}
384class, and they must be specified in this form: 384class, and they must be specified in this form:
diff --git a/doc/lispintro/ChangeLog b/doc/lispintro/ChangeLog
index db02a257a3a..ec082eecb52 100644
--- a/doc/lispintro/ChangeLog
+++ b/doc/lispintro/ChangeLog
@@ -1,3 +1,18 @@
12013-09-01 Glenn Morris <rgm@gnu.org>
2
3 * emacs-lisp-intro.texi (beginning-of-buffer complete):
4 Put back a version of the removed paragraph about raw prefix arg.
5
62013-09-01 Dani Moncayo <dmoncayo@gmail.com>
7
8 * emacs-lisp-intro.texi (beginning-of-buffer complete):
9 Update function details. (Bug#15085)
10
112013-08-28 Paul Eggert <eggert@cs.ucla.edu>
12
13 * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
14 for portability to hosts where /bin/sh has problems.
15
12013-08-12 Glenn Morris <rgm@gnu.org> 162013-08-12 Glenn Morris <rgm@gnu.org>
2 17
3 * emacs-lisp-intro.texi (Complete copy-region-as-kill): Fix typo. 18 * emacs-lisp-intro.texi (Complete copy-region-as-kill): Fix typo.
diff --git a/doc/lispintro/Makefile.in b/doc/lispintro/Makefile.in
index ad1b978f255..363e12215b3 100644
--- a/doc/lispintro/Makefile.in
+++ b/doc/lispintro/Makefile.in
@@ -17,7 +17,7 @@
17# You should have received a copy of the GNU General Public License 17# You should have received a copy of the GNU General Public License
18# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. 18# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
19 19
20SHELL = /bin/sh 20SHELL = @SHELL@
21 21
22# NB If you add any more configure variables, 22# NB If you add any more configure variables,
23# update the sed rules in the dist target below. 23# update the sed rules in the dist target below.
diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi
index 18ea8e87e19..84c9d905487 100644
--- a/doc/lispintro/emacs-lisp-intro.texi
+++ b/doc/lispintro/emacs-lisp-intro.texi
@@ -6323,7 +6323,7 @@ and avoids clobbering the mark."
6323 (/ (+ 10 (* size (prefix-numeric-value arg))) 6323 (/ (+ 10 (* size (prefix-numeric-value arg)))
6324 10))) 6324 10)))
6325 (point-min)))) 6325 (point-min))))
6326 (if arg (forward-line 1))) 6326 (if (and arg (not (consp arg))) (forward-line 1)))
6327@end group 6327@end group
6328@end smallexample 6328@end smallexample
6329 6329
@@ -6390,7 +6390,7 @@ to move point to the beginning of the next line if the command is
6390invoked with an argument: 6390invoked with an argument:
6391 6391
6392@smallexample 6392@smallexample
6393(if arg (forward-line 1))) 6393(if (and arg (not (consp arg))) (forward-line 1))
6394@end smallexample 6394@end smallexample
6395 6395
6396@noindent 6396@noindent
@@ -6399,14 +6399,10 @@ appropriate tenths position in the buffer. This is a flourish that
6399means that the cursor is always located @emph{at least} the requested 6399means that the cursor is always located @emph{at least} the requested
6400tenths of the way through the buffer, which is a nicety that is, 6400tenths of the way through the buffer, which is a nicety that is,
6401perhaps, not necessary, but which, if it did not occur, would be sure 6401perhaps, not necessary, but which, if it did not occur, would be sure
6402to draw complaints. 6402to draw complaints. (The @code{(not (consp arg))} portion is so that
6403 6403if you specify the command with a @kbd{C-u}, but without a number,
6404On the other hand, it also means that if you specify the command with 6404that is to say, if the `raw prefix argument' is simply a cons cell,
6405a @kbd{C-u}, but without a number, that is to say, if the `raw prefix 6405the command does not put you at the beginning of the second line.)
6406argument' is simply a cons cell, then the command puts you at the
6407beginning of the second line @dots{} I don't know whether this is
6408intended or whether no one has dealt with the code to avoid this
6409happening.
6410 6406
6411@node Second Buffer Related Review 6407@node Second Buffer Related Review
6412@section Review 6408@section Review
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index d27f58c0efa..145d595b1d2 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,13 @@
12013-09-08 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * macros.texi (Defining Macros): Prefer "function" to "lambda
4 expression" (bug#15296).
5
62013-08-28 Paul Eggert <eggert@cs.ucla.edu>
7
8 * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
9 for portability to hosts where /bin/sh has problems.
10
12013-08-26 Stefan Monnier <monnier@iro.umontreal.ca> 112013-08-26 Stefan Monnier <monnier@iro.umontreal.ca>
2 12
3 * variables.texi (File Local Variables): Don't recommend quoting! Ever! 13 * variables.texi (File Local Variables): Don't recommend quoting! Ever!
diff --git a/doc/lispref/Makefile.in b/doc/lispref/Makefile.in
index c7aa5ac1a28..164646ac433 100644
--- a/doc/lispref/Makefile.in
+++ b/doc/lispref/Makefile.in
@@ -17,7 +17,7 @@
17# You should have received a copy of the GNU General Public License 17# You should have received a copy of the GNU General Public License
18# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. 18# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
19 19
20SHELL = /bin/sh 20SHELL = @SHELL@
21 21
22# NB If you add any more configure variables, 22# NB If you add any more configure variables,
23# update the sed rules in the dist target below. 23# update the sed rules in the dist target below.
diff --git a/doc/lispref/macros.texi b/doc/lispref/macros.texi
index 5520bbbd1df..a2526f383aa 100644
--- a/doc/lispref/macros.texi
+++ b/doc/lispref/macros.texi
@@ -191,8 +191,8 @@ During Compile}).
191@section Defining Macros 191@section Defining Macros
192 192
193 A Lisp macro object is a list whose @sc{car} is @code{macro}, and 193 A Lisp macro object is a list whose @sc{car} is @code{macro}, and
194whose @sc{cdr} is a lambda expression. Expansion of the macro works 194whose @sc{cdr} is a function. Expansion of the macro works
195by applying the lambda expression (with @code{apply}) to the list of 195by applying the function (with @code{apply}) to the list of
196@emph{unevaluated} arguments from the macro call. 196@emph{unevaluated} arguments from the macro call.
197 197
198 It is possible to use an anonymous Lisp macro just like an anonymous 198 It is possible to use an anonymous Lisp macro just like an anonymous
diff --git a/doc/man/ChangeLog b/doc/man/ChangeLog
index 8b550dc4417..0235b5f7b9b 100644
--- a/doc/man/ChangeLog
+++ b/doc/man/ChangeLog
@@ -1,3 +1,7 @@
12013-08-31 Ulrich Müller <ulm@gentoo.org>
2
3 * emacs.1: Update manual links.
4
12013-04-20 Petr Hracek <phracek@redhat.com> (tiny change) 52013-04-20 Petr Hracek <phracek@redhat.com> (tiny change)
2 6
3 * emacs.1: Add some more command-line options. (Bug#14165) 7 * emacs.1: Add some more command-line options. (Bug#14165)
diff --git a/doc/man/emacs.1 b/doc/man/emacs.1
index 9149be2c523..a306edc3ca9 100644
--- a/doc/man/emacs.1
+++ b/doc/man/emacs.1
@@ -445,7 +445,7 @@ Gives frames menu bars if
445.IR on ; 445.IR on ;
446don't have menu bars if 446don't have menu bars if
447.IR off . 447.IR off .
448See the Emacs manual, sections "Lucid Resources" and "LessTif 448See the Emacs manual, sections "Lucid Resources" and "Motif
449Resources", for how to control the appearance of the menu bar 449Resources", for how to control the appearance of the menu bar
450if you have one. 450if you have one.
451.TP 451.TP
@@ -492,7 +492,7 @@ The scroll bar width in pixels, equivalent to the frame parameter
492Font name for pop-up menu items, in non-toolkit versions of 492Font name for pop-up menu items, in non-toolkit versions of
493.IR Emacs . 493.IR Emacs .
494(For toolkit versions, see the Emacs manual, sections 494(For toolkit versions, see the Emacs manual, sections
495"Lucid Resources" and "LessTif Resources".) 495"Lucid Resources" and "Motif Resources".)
496.TP 496.TP
497.BR selectionTimeout " (class " SelectionTimeout ) 497.BR selectionTimeout " (class " SelectionTimeout )
498Number of milliseconds to wait for a selection reply. 498Number of milliseconds to wait for a selection reply.
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index ca620a15b4f..e3ad5688f22 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,5 +1,27 @@
12013-09-08 Glenn Morris <rgm@gnu.org>
2
3 * emacs-gnutls.texi: Tweak direntry.
4
52013-09-06 Michael Albinus <michael.albinus@gmx.de>
6
7 * tramp.texi (Alternative Syntax): Remove chapter.
8
92013-08-28 Paul Eggert <eggert@cs.ucla.edu>
10
11 * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
12 for portability to hosts where /bin/sh has problems.
13
142013-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
15
16 Try to reduce redundancy in doc/misc/Makefile.in.
17 * Makefile.in (DOCMISC_W32): New var to replace DOCMISC_*_W32.
18 (TARGETS): New intermediate variable.
19 (DVI_TARGETS, HTML_TARGETS, PDF_TARGETS, PS_TARGETS): Use it.
20
12013-08-27 Glenn Morris <rgm@gnu.org> 212013-08-27 Glenn Morris <rgm@gnu.org>
2 22
23 * efaq.texi (Emacs for MS-Windows): Update location of MS FAQ.
24
3 * efaq.texi: Rename from faq.texi, to match its output files. 25 * efaq.texi: Rename from faq.texi, to match its output files.
4 * Makefile.in: Update for faq.texi name change. 26 * Makefile.in: Update for faq.texi name change.
5 27
diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in
index 0ae1edf7069..30fc4953172 100644
--- a/doc/misc/Makefile.in
+++ b/doc/misc/Makefile.in
@@ -17,7 +17,7 @@
17# You should have received a copy of the GNU General Public License 17# You should have received a copy of the GNU General Public License
18# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. 18# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
19 19
20SHELL = /bin/sh 20SHELL = @SHELL@
21 21
22# Where to find the source code. $(srcdir) will be the man-aux 22# Where to find the source code. $(srcdir) will be the man-aux
23# subdirectory of the source tree. This is 23# subdirectory of the source tree. This is
@@ -60,11 +60,7 @@ MAKEINFO = @MAKEINFO@
60MAKEINFO_OPTS = --force -I$(emacsdir) 60MAKEINFO_OPTS = --force -I$(emacsdir)
61 61
62## On MS Windows, efaq-w32; otherwise blank. 62## On MS Windows, efaq-w32; otherwise blank.
63DOCMISC_DVI_W32 = @DOCMISC_DVI_W32@ 63DOCMISC_W32 = @DOCMISC_W32@
64DOCMISC_HTML_W32 = @DOCMISC_HTML_W32@
65DOCMISC_INFO_W32 = @DOCMISC_INFO_W32@
66DOCMISC_PDF_W32 = @DOCMISC_PDF_W32@
67DOCMISC_PS_W32 = @DOCMISC_PS_W32@
68 64
69## Info files to build and install on all platforms. 65## Info files to build and install on all platforms.
70INFO_COMMON = ada-mode auth autotype bovine calc ccmode cl \ 66INFO_COMMON = ada-mode auth autotype bovine calc ccmode cl \
@@ -84,237 +80,15 @@ INFO_INSTALL = $(INFO_COMMON) $(DOCMISC_INFO_W32)
84## because the info files are pre-built in release tarfiles. 80## because the info files are pre-built in release tarfiles.
85INFO_TARGETS = $(INFO_COMMON) efaq-w32 81INFO_TARGETS = $(INFO_COMMON) efaq-w32
86 82
87DVI_TARGETS = $(DOCMISC_DVI_W32) \ 83# There are some naming differences between the info targets and the other
88 ada-mode.dvi \ 84# targets, so let's resolve them here.
89 auth.dvi \ 85TARGETS_1 = $(INFO_INSTALL:ccmode=cc-mode)
90 autotype.dvi \ 86TARGETS = $(TARGETS_1:info.info=info)
91 bovine.dvi \ 87
92 calc.dvi \ 88DVI_TARGETS = $(TARGETS:=.dvi)
93 cc-mode.dvi \ 89HTML_TARGETS = $(TARGETS:=.html)
94 cl.dvi \ 90PDF_TARGETS = $(TARGETS:=.pdf)
95 dbus.dvi \ 91PS_TARGETS = $(TARGETS:=.ps)
96 dired-x.dvi \
97 ebrowse.dvi \
98 ede.dvi \
99 ediff.dvi \
100 edt.dvi \
101 efaq.dvi \
102 eieio.dvi \
103 emacs-mime.dvi \
104 epa.dvi \
105 erc.dvi \
106 ert.dvi \
107 eshell.dvi \
108 eudc.dvi \
109 flymake.dvi \
110 forms.dvi \
111 gnus.dvi \
112 emacs-gnutls.dvi \
113 htmlfontify.dvi \
114 idlwave.dvi \
115 ido.dvi \
116 info.dvi \
117 mairix-el.dvi \
118 message.dvi \
119 mh-e.dvi \
120 newsticker.dvi \
121 nxml-mode.dvi \
122 org.dvi \
123 pcl-cvs.dvi \
124 pgg.dvi \
125 rcirc.dvi \
126 reftex.dvi \
127 remember.dvi \
128 sasl.dvi \
129 sc.dvi \
130 semantic.dvi \
131 ses.dvi \
132 sieve.dvi \
133 smtpmail.dvi \
134 speedbar.dvi \
135 srecode.dvi \
136 todo-mode.dvi \
137 tramp.dvi \
138 url.dvi \
139 vip.dvi \
140 viper.dvi \
141 widget.dvi \
142 wisent.dvi \
143 woman.dvi
144
145HTML_TARGETS = $(DOCMISC_HTML_W32) \
146 ada-mode.html \
147 auth.html \
148 autotype.html \
149 bovine.html \
150 calc.html \
151 cc-mode.html \
152 cl.html \
153 dbus.html \
154 dired-x.html \
155 ebrowse.html \
156 ede.html \
157 ediff.html \
158 edt.html \
159 efaq.html \
160 eieio.html \
161 emacs-mime.html \
162 epa.html \
163 erc.html \
164 ert.html \
165 eshell.html \
166 eudc.html \
167 flymake.html \
168 forms.html \
169 gnus.html \
170 emacs-gnutls.html \
171 htmlfontify.html \
172 idlwave.html \
173 ido.html \
174 info.html \
175 mairix-el.html \
176 message.html \
177 mh-e.html \
178 newsticker.html \
179 nxml-mode.html \
180 org.html \
181 pcl-cvs.html \
182 pgg.html \
183 rcirc.html \
184 reftex.html \
185 remember.html \
186 sasl.html \
187 sc.html \
188 semantic.html \
189 ses.html \
190 sieve.html \
191 smtpmail.html \
192 speedbar.html \
193 srecode.html \
194 todo-mode.html \
195 tramp.html \
196 url.html \
197 vip.html \
198 viper.html \
199 widget.html \
200 wisent.html \
201 woman.html
202
203PDF_TARGETS = $(DOCMISC_PDF_W32) \
204 ada-mode.pdf \
205 auth.pdf \
206 autotype.pdf \
207 bovine.pdf \
208 calc.pdf \
209 cc-mode.pdf \
210 cl.pdf \
211 dbus.pdf \
212 dired-x.pdf \
213 ebrowse.pdf \
214 ede.pdf \
215 ediff.pdf \
216 edt.pdf \
217 efaq.pdf \
218 eieio.pdf \
219 emacs-mime.pdf \
220 epa.pdf \
221 erc.pdf \
222 ert.pdf \
223 eshell.pdf \
224 eudc.pdf \
225 flymake.pdf \
226 forms.pdf \
227 gnus.pdf \
228 htmlfontify.pdf \
229 emacs-gnutls.pdf \
230 idlwave.pdf \
231 ido.pdf \
232 info.pdf \
233 mairix-el.pdf \
234 message.pdf \
235 mh-e.pdf \
236 newsticker.pdf \
237 nxml-mode.pdf \
238 org.pdf \
239 pcl-cvs.pdf \
240 pgg.pdf \
241 rcirc.pdf \
242 reftex.pdf \
243 remember.pdf \
244 sasl.pdf \
245 sc.pdf \
246 semantic.pdf \
247 ses.pdf \
248 sieve.pdf \
249 smtpmail.pdf \
250 speedbar.pdf \
251 srecode.pdf \
252 todo-mode.pdf \
253 tramp.pdf \
254 url.pdf \
255 vip.pdf \
256 viper.pdf \
257 widget.pdf \
258 wisent.pdf \
259 woman.pdf
260
261PS_TARGETS = $(DOCMISC_PS_W32) \
262 ada-mode.ps \
263 auth.ps \
264 autotype.ps \
265 bovine.ps \
266 calc.ps \
267 cc-mode.ps \
268 cl.ps \
269 dbus.ps \
270 dired-x.ps \
271 ebrowse.ps \
272 ede.ps \
273 ediff.ps \
274 edt.ps \
275 efaq.ps \
276 eieio.ps \
277 emacs-mime.ps \
278 epa.ps \
279 erc.ps \
280 ert.ps \
281 eshell.ps \
282 eudc.ps \
283 flymake.ps \
284 forms.ps \
285 gnus.ps \
286 htmlfontify.ps \
287 emacs-gnutls.ps \
288 idlwave.ps \
289 ido.ps \
290 info.ps \
291 mairix-el.ps \
292 message.ps \
293 mh-e.ps \
294 newsticker.ps \
295 nxml-mode.ps \
296 org.ps \
297 pcl-cvs.ps \
298 pgg.ps \
299 rcirc.ps \
300 reftex.ps \
301 remember.ps \
302 sasl.ps \
303 sc.ps \
304 semantic.ps \
305 ses.ps \
306 sieve.ps \
307 smtpmail.ps \
308 speedbar.ps \
309 srecode.ps \
310 todo-mode.ps \
311 tramp.ps \
312 url.ps \
313 vip.ps \
314 viper.ps \
315 widget.ps \
316 wisent.ps \
317 woman.ps
318 92
319TEXI2DVI = texi2dvi 93TEXI2DVI = texi2dvi
320TEXI2PDF = texi2pdf 94TEXI2PDF = texi2pdf
diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi
index 1354f68cc9f..54e067d65bd 100644
--- a/doc/misc/efaq.texi
+++ b/doc/misc/efaq.texi
@@ -3452,8 +3452,9 @@ lack certain features, such as the Emacs Lisp extension language.
3452@cindex Emacs for MS-Windows 3452@cindex Emacs for MS-Windows
3453@cindex Microsoft Windows, Emacs for 3453@cindex Microsoft Windows, Emacs for
3454 3454
3455There is a @uref{http://www.gnu.org/software/emacs/windows/ntemacs.html, 3455There is a separate FAQ for Emacs on MS-Windows,
3456separate FAQ} for Emacs on MS-Windows. For MS-DOS, @pxref{Emacs for MS-DOS}. 3456@pxref{Top,,,efaq-w32,FAQ for Emacs on MS Windows}.
3457For MS-DOS, @pxref{Emacs for MS-DOS}.
3457 3458
3458 3459
3459@node Emacs for GNUstep 3460@node Emacs for GNUstep
diff --git a/doc/misc/emacs-gnutls.texi b/doc/misc/emacs-gnutls.texi
index 740dfee41ed..b1c4c13c5ff 100644
--- a/doc/misc/emacs-gnutls.texi
+++ b/doc/misc/emacs-gnutls.texi
@@ -25,7 +25,7 @@ modify this GNU manual.''
25 25
26@dircategory Emacs network features 26@dircategory Emacs network features
27@direntry 27@direntry
28* GnuTLS: (emacs-gnutls). The Emacs GnuTLS integration. 28* Emacs GnuTLS: (emacs-gnutls). The Emacs GnuTLS integration.
29@end direntry 29@end direntry
30 30
31@titlepage 31@titlepage
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 03c6da3b73f..aa4cea58f04 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -225,7 +225,6 @@ Configuring @value{tramp} for use
225Using @value{tramp} 225Using @value{tramp}
226 226
227* Filename Syntax:: @value{tramp} filename conventions. 227* Filename Syntax:: @value{tramp} filename conventions.
228* Alternative Syntax:: URL-like filename syntax.
229* Filename completion:: Filename completion. 228* Filename completion:: Filename completion.
230* Ad-hoc multi-hops:: Declaring multiple hops in the file name. 229* Ad-hoc multi-hops:: Declaring multiple hops in the file name.
231* Remote processes:: Integration with other @value{emacsname} packages. 230* Remote processes:: Integration with other @value{emacsname} packages.
@@ -2356,7 +2355,6 @@ minute you have already forgotten that you hit that key!
2356 2355
2357@menu 2356@menu
2358* Filename Syntax:: @value{tramp} filename conventions. 2357* Filename Syntax:: @value{tramp} filename conventions.
2359* Alternative Syntax:: URL-like filename syntax.
2360* Filename completion:: Filename completion. 2358* Filename completion:: Filename completion.
2361* Ad-hoc multi-hops:: Declaring multiple hops in the file name. 2359* Ad-hoc multi-hops:: Declaring multiple hops in the file name.
2362* Remote processes:: Integration with other @value{emacsname} packages. 2360* Remote processes:: Integration with other @value{emacsname} packages.
@@ -2453,46 +2451,6 @@ by adding @file{#<port>} to the host name, like in @file{@trampfn{ssh,
2453daniel, melancholia#42, .emacs}}. 2451daniel, melancholia#42, .emacs}}.
2454 2452
2455 2453
2456@node Alternative Syntax
2457@section URL-like filename syntax
2458@cindex filename syntax
2459@cindex filename examples
2460
2461Additionally to the syntax described in the previous chapter, it is
2462possible to use a URL-like syntax for @value{tramp}. This can be
2463switched on by customizing the variable @code{tramp-syntax}. Please
2464note that this feature is experimental for the time being.
2465
2466The variable @code{tramp-syntax} must be set before requiring @value{tramp}:
2467
2468@lisp
2469(setq tramp-syntax 'url)
2470(require 'tramp)
2471@end lisp
2472
2473Then, a @value{tramp} filename would look like this:
2474@file{/@var{method}://@var{user}@@@var{machine}:@var{port}/@var{path/to.file}}.
2475@file{/@var{method}://} is mandatory, all other parts are optional.
2476@file{:@var{port}} is useful for methods only who support this.
2477
2478The last example from the previous section would look like this:
2479@file{/ssh://daniel@@melancholia/.emacs}.
2480
2481For the time being, @code{tramp-syntax} can have the following values:
2482
2483@itemize @w{}
2484@ifset emacs
2485@item @code{ftp}---That is the default syntax
2486@item @code{url}---URL-like syntax
2487@end ifset
2488@ifset xemacs
2489@item @code{sep}---That is the default syntax
2490@item @code{url}---URL-like syntax
2491@item @code{ftp}---EFS-like syntax
2492@end ifset
2493@end itemize
2494
2495
2496@node Filename completion 2454@node Filename completion
2497@section Filename completion 2455@section Filename completion
2498@cindex filename completion 2456@cindex filename completion
diff --git a/etc/ChangeLog b/etc/ChangeLog
index c1cb67a6a67..bd5534d9446 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,9 @@
12013-09-09 Glenn Morris <rgm@gnu.org>
2
3 * refcards/Makefile (PS_ENGLISH, PS_CZECH, PS_FRENCH, PS_GERMAN)
4 (PS_POLISH, PS_PORTUGUESE, PS_RUSSIAN, PS_SLOVAKIAN, PS_TARGETS):
5 Use substitution refs.
6
12013-08-15 Glenn Morris <rgm@gnu.org> 72013-08-15 Glenn Morris <rgm@gnu.org>
2 8
3 * refcards/calccard.pdf, refcards/cs-dired-ref.pdf: 9 * refcards/calccard.pdf, refcards/cs-dired-ref.pdf:
diff --git a/etc/NEWS b/etc/NEWS
index 8bf72ddfedd..78f99dbc621 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -34,6 +34,10 @@ build time. To prevent this, use the configure option
34`--with-file-notification-no'. See below for file-notify features. 34`--with-file-notification-no'. See below for file-notify features.
35FIXME? This feature is not available for the Nextstep port. (?) 35FIXME? This feature is not available for the Nextstep port. (?)
36 36
37** The configure option `without-compress-info' has been generalized,
38and renamed to `without-compress-install'. It now prevents compression
39of _any_ files during installation.
40
37** The configure option --with-crt-dir has been removed. 41** The configure option --with-crt-dir has been removed.
38It is no longer needed, as the crt*.o files are no longer linked 42It is no longer needed, as the crt*.o files are no longer linked
39specially. 43specially.
@@ -262,8 +266,9 @@ whole tree revisions.
262*** In VC directory mode, `L' lists the change log for the current VC 266*** In VC directory mode, `L' lists the change log for the current VC
263controlled tree in a window. 267controlled tree in a window.
264 268
265*** `C-x v G' (globally) and `G' (in VC directory mode) ignores a 269*** `C-x v G' (globally) and `G' (in VC directory mode) ignores a file
266file under current version control system. 270under current version control system. When called with a prefix
271argument, you can remove a file from the ignored file list.
267 272
268** cl-lib 273** cl-lib
269 274
@@ -331,6 +336,10 @@ This is useful to avoid a query when you have no key for that name.
331*** key bindings to navigate through and select the completions. 336*** key bindings to navigate through and select the completions.
332*** The icomplete-separator is customizable, and its default has changed. 337*** The icomplete-separator is customizable, and its default has changed.
333*** Removed icomplete-show-key-bindings. 338*** Removed icomplete-show-key-bindings.
339*** Icomplete-mode by defaults applies to all forms of minibuffer completion.
340(setq icomplete-with-completion-tables '(internal-complete-buffer))
341will revert to the old behavior.
342
334 343
335** Ido 344** Ido
336*** Ido has a manual now. 345*** Ido has a manual now.
@@ -460,6 +469,8 @@ todo-mode.el has been made obsolete and renamed otodo-mode.el.
460 469
461** Tramp 470** Tramp
462 471
472*** The experimental url syntax for remote file names is withdrawn.
473
463+++ 474+++
464*** New connection method "adb", which allows to access Android 475*** New connection method "adb", which allows to access Android
465devices by the Android Debug Bridge. The variable `tramp-adb-program' 476devices by the Android Debug Bridge. The variable `tramp-adb-program'
@@ -603,9 +614,20 @@ file using `set-file-extended-attributes'.
603** `visited-file-modtime' now returns -1 for nonexistent files. 614** `visited-file-modtime' now returns -1 for nonexistent files.
604Formerly it returned a list (-1 LOW USEC PSEC), but this was ambiguous 615Formerly it returned a list (-1 LOW USEC PSEC), but this was ambiguous
605in the presence of files with negative time stamps. 616in the presence of files with negative time stamps.
617
618** The cars of the elements in `interpreter-mode-alist' are now treated
619as regexps rather than literal strings. For the time being, any
620element whose car does not start with "\\" is still treated as a
621literal string, so this change should not cause any incompatibilities
622if you have code that just adds elements to the list, only if you are
623actually using interpreter-mode-alist for something.
624
606 625
607* Lisp Changes in Emacs 24.4 626* Lisp Changes in Emacs 24.4
608 627
628** The second argument of `eval' can now be a lexical-environment.
629
630** `with-demoted-errors' takes an additional argument `format'.
609+++ 631+++
610** New function `define-error'. 632** New function `define-error'.
611 633
@@ -753,6 +775,11 @@ used in place of the 9th element of `file-attributes'.
753`preserve-extended-attributes' as it now handles both SELinux context 775`preserve-extended-attributes' as it now handles both SELinux context
754and ACL entries. 776and ACL entries.
755 777
778** The `common-substring' argument of display-completion-list is obsolete.
779Either use `completion-all-completions' which already returns highlighted
780strings (including for partial or substring completion) or call
781`completion-hilit-commonality' to add the highlight.
782
756** Changes to the Emacs Lisp Coding Conventions in Emacs 24.4 783** Changes to the Emacs Lisp Coding Conventions in Emacs 24.4
757 784
758*** The package descriptor and name of global variables, constants, 785*** The package descriptor and name of global variables, constants,
@@ -762,12 +789,10 @@ meant to be used by other packages.
762 789
763* Changes in Emacs 24.4 on Non-Free Operating Systems 790* Changes in Emacs 24.4 on Non-Free Operating Systems
764 791
765** Emacs for MS-Windows can now be built by running the configure script 792** The procedure for building Emacs on MS-Windows has changed.
766using the MSYS environment and MinGW development tools. 793It is now built by running the same configure script as on all other
767This is from now on the preferred method of building Emacs on 794platforms. This requires the MSYS environment and MinGW development
768MS-Windows. The Windows-specific configure.bat and makefile.w32-in 795tools. See the updated instructions in nt/INSTALL for details.
769files are deprecated. See the file nt/INSTALL.MSYS for detailed
770instructions.
771 796
772Using the Posix configure script and Makefile's also means a change in 797Using the Posix configure script and Makefile's also means a change in
773the directory structure of the Emacs installation on Windows. It is 798the directory structure of the Emacs installation on Windows. It is
diff --git a/etc/PROBLEMS b/etc/PROBLEMS
index 7556c23daee..f241655dedd 100644
--- a/etc/PROBLEMS
+++ b/etc/PROBLEMS
@@ -3016,9 +3016,9 @@ You can enter M-f6 by typing ESC f6.
3016*** MS-Windows 95/98/ME: subprocesses do not terminate properly. 3016*** MS-Windows 95/98/ME: subprocesses do not terminate properly.
3017 3017
3018This is a limitation of the Operating System, and can cause problems 3018This is a limitation of the Operating System, and can cause problems
3019when shutting down Windows. Ensure that all subprocesses are exited 3019when shutting down Windows. Ensure that all subprocesses are exited
3020cleanly before exiting Emacs. For more details, see the FAQ at 3020cleanly before exiting Emacs. For more details, see the Emacs on MS
3021http://www.gnu.org/software/emacs/windows/. 3021Windows FAQ (info manual "efaq-w32").
3022 3022
3023*** MS-Windows 95/98/ME: crashes when Emacs invokes non-existent programs. 3023*** MS-Windows 95/98/ME: crashes when Emacs invokes non-existent programs.
3024 3024
diff --git a/etc/refcards/Makefile b/etc/refcards/Makefile
index 36abf67d594..0931540e4d8 100644
--- a/etc/refcards/Makefile
+++ b/etc/refcards/Makefile
@@ -58,42 +58,16 @@ PDF_SLOVAKIAN = \
58PDF_TARGETS = $(PDF_ENGLISH) $(PDF_CZECH) $(PDF_FRENCH) $(PDF_GERMAN) \ 58PDF_TARGETS = $(PDF_ENGLISH) $(PDF_CZECH) $(PDF_FRENCH) $(PDF_GERMAN) \
59 $(PDF_POLISH) $(PDF_PORTUGUESE) $(PDF_RUSSIAN) $(PDF_SLOVAKIAN) 59 $(PDF_POLISH) $(PDF_PORTUGUESE) $(PDF_RUSSIAN) $(PDF_SLOVAKIAN)
60 60
61PS_ENGLISH = \ 61PS_ENGLISH = $(PDF_ENGLISH:.pdf=.ps)
62 calccard.ps \ 62PS_CZECH = $(PDF_CZECH:.pdf=.ps)
63 dired-ref.ps \ 63PS_FRENCH = $(PDF_FRENCH:.pdf=.ps)
64 gnus-booklet.ps \ 64PS_GERMAN = $(PDF_GERMAN:.pdf=.ps)
65 gnus-refcard.ps \ 65PS_POLISH = $(PDF_POLISH:.pdf=.ps)
66 orgcard.ps \ 66PS_PORTUGUESE = $(PDF_PORTUGUESE:.pdf=.ps)
67 refcard.ps \ 67PS_RUSSIAN = $(PDF_RUSSIAN:.pdf=.ps)
68 survival.ps \ 68PS_SLOVAKIAN = $(PDF_SLOVAKIAN:.pdf=.ps)
69 vipcard.ps \ 69
70 viperCard.ps 70PS_TARGETS = $(PDF_TARGETS:.pdf=.ps)
71
72PS_CZECH = \
73 cs-dired-ref.ps \
74 cs-refcard.ps \
75 cs-survival.ps
76
77PS_FRENCH = \
78 fr-dired-ref.ps \
79 fr-refcard.ps \
80 fr-survival.ps \
81
82PS_GERMAN = de-refcard.ps
83
84PS_POLISH = pl-refcard.ps
85
86PS_PORTUGUESE = pt-br-refcard.ps
87
88PS_RUSSIAN = ru-refcard.ps
89
90PS_SLOVAKIAN = \
91 sk-dired-ref.ps \
92 sk-refcard.ps \
93 sk-survival.ps
94
95PS_TARGETS = $(PS_ENGLISH) $(PS_CZECH) $(PS_FRENCH) $(PS_GERMAN) \
96 $(PS_POLISH) $(PS_PORTUGUESE) $(PS_RUSSIAN) $(PS_SLOVAKIAN)
97 71
98 72
99## For emacsver.tex. 73## For emacsver.tex.
diff --git a/etc/spook.lines b/etc/spook.lines
index 2a1a0ac1cb9..3a6d503cdf5 100644
--- a/etc/spook.lines
+++ b/etc/spook.lines
Binary files differ
diff --git a/info/dir b/info/dir
index b6ec2845c3d..f6ccbda30ff 100644
--- a/info/dir
+++ b/info/dir
@@ -41,7 +41,7 @@ Emacs editing modes
41Emacs network features 41Emacs network features
42* EUDC: (eudc). Emacs client for directory servers (LDAP, PH). 42* EUDC: (eudc). Emacs client for directory servers (LDAP, PH).
43* Gnus: (gnus). The newsreader Gnus. 43* Gnus: (gnus). The newsreader Gnus.
44* GnuTLS: (emacs-gnutls). The Emacs GnuTLS integration. 44* Emacs GnuTLS: (emacs-gnutls). The Emacs GnuTLS integration.
45* Mairix: (mairix-el). Emacs interface to the Mairix mail indexer. 45* Mairix: (mairix-el). Emacs interface to the Mairix mail indexer.
46* MH-E: (mh-e). Emacs interface to the MH mail system. 46* MH-E: (mh-e). Emacs interface to the MH mail system.
47* Message: (message). Mail and news composition mode that 47* Message: (message). Mail and news composition mode that
diff --git a/leim/ChangeLog b/leim/ChangeLog
index abe0e195ff9..11186603df8 100644
--- a/leim/ChangeLog
+++ b/leim/ChangeLog
@@ -1,3 +1,14 @@
12013-09-05 Jean Haidouk <haidouk@yandex.com> (tiny change)
2
3 * quail/latin-alt.el ("french-alt-postfix", "latin-alt-postfix"):
4 * quail/latin-pre.el ("french-prefix"):
5 * quail/latin-post.el ("french-postfix"): Add `œ' and `Œ'.
6
72013-08-28 Paul Eggert <eggert@cs.ucla.edu>
8
9 * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
10 for portability to hosts where /bin/sh has problems.
11
12013-06-21 Juanma Barranquero <lekktu@gmail.com> 122013-06-21 Juanma Barranquero <lekktu@gmail.com>
2 13
3 * quail/croatian.el ("croatian-prefix"): 14 * quail/croatian.el ("croatian-prefix"):
diff --git a/leim/Makefile.in b/leim/Makefile.in
index b04eb6c2e77..7c3f3ca47e1 100644
--- a/leim/Makefile.in
+++ b/leim/Makefile.in
@@ -21,10 +21,7 @@
21# 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
22# 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/>.
23 23
24 24SHELL = @SHELL@
25# Avoid trouble on systems where the `SHELL' variable might be
26# inherited from the environment.
27SHELL = /bin/sh
28 25
29# Here are the things that we expect ../configure to edit. 26# Here are the things that we expect ../configure to edit.
30srcdir=@srcdir@ 27srcdir=@srcdir@
diff --git a/leim/quail/latin-alt.el b/leim/quail/latin-alt.el
index fdfc89f4eca..6841947524f 100644
--- a/leim/quail/latin-alt.el
+++ b/leim/quail/latin-alt.el
@@ -938,7 +938,7 @@ Par exemple: a` -> à e' -> é.
938En doublant la frappe des diacritiques, ils s'isoleront de la lettre. 938En doublant la frappe des diacritiques, ils s'isoleront de la lettre.
939Par exemple: e'' -> e' 939Par exemple: e'' -> e'
940 940
941<e dans l'o> n'est pas disponible." 941Œ est produit par O/."
942 nil t nil nil nil nil nil nil nil nil t) 942 nil t nil nil nil nil nil nil nil nil t)
943 943
944(quail-define-rules 944(quail-define-rules
@@ -959,7 +959,9 @@ Par exemple: e'' -> e'
959 ("i^" ?î) 959 ("i^" ?î)
960 ("i\"" ?ï) 960 ("i\"" ?ï)
961 ("O^" ?Ô) 961 ("O^" ?Ô)
962 ("O/" ?Œ)
962 ("o^" ?ô) 963 ("o^" ?ô)
964 ("o/" ?œ)
963 ("U`" ?Ù) 965 ("U`" ?Ù)
964 ("U^" ?Û) 966 ("U^" ?Û)
965 ("U\"" ?Ü) 967 ("U\"" ?Ü)
@@ -988,7 +990,9 @@ Par exemple: e'' -> e'
988 ("i^^" ["i^"]) 990 ("i^^" ["i^"])
989 ("i\"\"" ["i\""]) 991 ("i\"\"" ["i\""])
990 ("O^^" ["O^"]) 992 ("O^^" ["O^"])
993 ("O//" ["O/"])
991 ("o^^" ["o^"]) 994 ("o^^" ["o^"])
995 ("o//" ["o/"])
992 ("U``" ["U`"]) 996 ("U``" ["U`"])
993 ("U^^" ["U^"]) 997 ("U^^" ["U^"])
994 ("U\"\"" ["U\""]) 998 ("U\"\"" ["U\""])
@@ -1423,6 +1427,7 @@ Doubling the postfix separates the letter and postfix: e.g. a'' -> a'
1423 ("O'" ?Ó) 1427 ("O'" ?Ó)
1424 ("O-" ?Ō) 1428 ("O-" ?Ō)
1425 ("O/" ?Ø) 1429 ("O/" ?Ø)
1430 ("O/" ?Œ)
1426 ("O:" ?Ő) 1431 ("O:" ?Ő)
1427 ("O\"" ?Ö) 1432 ("O\"" ?Ö)
1428 ("O^" ?Ô) 1433 ("O^" ?Ô)
@@ -1515,6 +1520,7 @@ Doubling the postfix separates the letter and postfix: e.g. a'' -> a'
1515 ("o'" ?ó) 1520 ("o'" ?ó)
1516 ("o-" ?ō) 1521 ("o-" ?ō)
1517 ("o/" ?ø) 1522 ("o/" ?ø)
1523 ("o/" ?œ)
1518 ("o:" ?ő) 1524 ("o:" ?ő)
1519 ("o\"" ?ö) 1525 ("o\"" ?ö)
1520 ("o^" ?ô) 1526 ("o^" ?ô)
diff --git a/leim/quail/latin-post.el b/leim/quail/latin-post.el
index 67cd0648951..7fa3d88e8c6 100644
--- a/leim/quail/latin-post.el
+++ b/leim/quail/latin-post.el
@@ -1013,7 +1013,7 @@ Par exemple: a` -> à e' -> é.
1013En doublant la frappe des diacritiques, ils s'isoleront de la lettre. 1013En doublant la frappe des diacritiques, ils s'isoleront de la lettre.
1014Par exemple: e'' -> e' 1014Par exemple: e'' -> e'
1015 1015
1016<e dans l'o> n'est pas disponible." 1016Œ est produit par O/."
1017 nil t nil nil nil nil nil nil nil nil t) 1017 nil t nil nil nil nil nil nil nil nil t)
1018 1018
1019(quail-define-rules 1019(quail-define-rules
@@ -1034,7 +1034,9 @@ Par exemple: e'' -> e'
1034 ("i^" ?î) 1034 ("i^" ?î)
1035 ("i\"" ?ï) 1035 ("i\"" ?ï)
1036 ("O^" ?Ô) 1036 ("O^" ?Ô)
1037 ("O/" ?Œ)
1037 ("o^" ?ô) 1038 ("o^" ?ô)
1039 ("o/" ?œ)
1038 ("U`" ?Ù) 1040 ("U`" ?Ù)
1039 ("U^" ?Û) 1041 ("U^" ?Û)
1040 ("U\"" ?Ü) 1042 ("U\"" ?Ü)
@@ -1063,7 +1065,9 @@ Par exemple: e'' -> e'
1063 ("i^^" ["i^"]) 1065 ("i^^" ["i^"])
1064 ("i\"\"" ["i\""]) 1066 ("i\"\"" ["i\""])
1065 ("O^^" ["O^"]) 1067 ("O^^" ["O^"])
1068 ("O//" ["O/"])
1066 ("o^^" ["o^"]) 1069 ("o^^" ["o^"])
1070 ("o//" ["o/"])
1067 ("U``" ["U`"]) 1071 ("U``" ["U`"])
1068 ("U^^" ["U^"]) 1072 ("U^^" ["U^"])
1069 ("U\"\"" ["U\""]) 1073 ("U\"\"" ["U\""])
@@ -2099,7 +2103,7 @@ of characters from a single Latin-N charset.
2099 dot | . | z. -> ż 2103 dot | . | z. -> ż
2100 stroke | / | d/ -> đ 2104 stroke | / | d/ -> đ
2101 nordic | / | d/ -> ð t/ -> þ a/ -> å e/ -> æ o/ -> ø 2105 nordic | / | d/ -> ð t/ -> þ a/ -> å e/ -> æ o/ -> ø
2102 others | / | s/ -> ß ?/ -> ¿ !/ -> ¡ // -> ° 2106 others | / | s/ -> ß ?/ -> ¿ !/ -> ¡ // -> ° o/ -> œ
2103 | various | << -> « >> -> » o_ -> º a_ -> ª 2107 | various | << -> « >> -> » o_ -> º a_ -> ª
2104 2108
2105Doubling the postfix separates the letter and postfix: e.g. a'' -> a' 2109Doubling the postfix separates the letter and postfix: e.g. a'' -> a'
diff --git a/leim/quail/latin-pre.el b/leim/quail/latin-pre.el
index 4b4179ebf82..c6085f34290 100644
--- a/leim/quail/latin-pre.el
+++ b/leim/quail/latin-pre.el
@@ -264,6 +264,7 @@ Key translation rules are:
264 diaeresis | \" | \"i -> ï 264 diaeresis | \" | \"i -> ï
265 cedilla | ~ or , | ~c -> ç ,c -> ç 265 cedilla | ~ or , | ~c -> ç ,c -> ç
266 symbol | ~ | ~> -> » ~< -> « 266 symbol | ~ | ~> -> » ~< -> «
267 misc | / | /o -> œ
267" nil t nil nil nil nil nil nil nil nil t) 268" nil t nil nil nil nil nil nil nil nil t)
268 269
269(quail-define-rules 270(quail-define-rules
@@ -295,6 +296,9 @@ Key translation rules are:
295 ("\"e" ?ë) 296 ("\"e" ?ë)
296 ("\"i" ?ï) 297 ("\"i" ?ï)
297 ("\" " ?\") 298 ("\" " ?\")
299 ("/o" ?œ)
300 ("/O" ?Œ)
301 ("/ " ?/)
298 ("~<" ?\«) 302 ("~<" ?\«)
299 ("~>" ?\») 303 ("~>" ?\»)
300 ("~C" ?Ç) 304 ("~C" ?Ç)
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 53d66ba1e37..d2e9dd18177 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,8 @@
12013-08-28 Paul Eggert <eggert@cs.ucla.edu>
2
3 * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
4 for portability to hosts where /bin/sh has problems.
5
12013-08-10 Eli Zaretskii <eliz@gnu.org> 62013-08-10 Eli Zaretskii <eliz@gnu.org>
2 7
3 * update-game-score.exe.manifest: New file. 8 * update-game-score.exe.manifest: New file.
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
index fe1900a2a40..994eb2bb266 100644
--- a/lib-src/Makefile.in
+++ b/lib-src/Makefile.in
@@ -18,10 +18,7 @@
18# You should have received a copy of the GNU General Public License 18# 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/>. 19# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
20 20
21 21SHELL = @SHELL@
22# Avoid trouble on systems where the `SHELL' variable might be
23# inherited from the environment.
24SHELL = /bin/sh
25 22
26# Following ../lisp/Makefile.in. 23# Following ../lisp/Makefile.in.
27EMACS = ../src/emacs 24EMACS = ../src/emacs
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b8ffbc48471..32ea5e72efd 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,537 @@
12013-09-10 Glenn Morris <rgm@gnu.org>
2
3 * files.el (interpreter-mode-alist): Convert to regexps.
4 (set-auto-mode): Adapt for this. (Bug#15306)
5 * progmodes/cperl-mode.el (cperl-clobber-mode-lists):
6 Comment out unused variable.
7 * progmodes/cc-mode.el (interpreter-mode-alist):
8 * progmodes/python.el (interpreter-mode-alist):
9 * progmodes/ruby-mode.el (interpreter-mode-alist): Convert to regexps.
10 * progmodes/sh-script.el (sh-set-shell):
11 No longer use interpreter-mode-alist to get list of shells.
12
13 * progmodes/cc-mode.el (awk-mode): Remove duplicate autoload.
14
152013-09-10 Stefan Monnier <monnier@iro.umontreal.ca>
16
17 * simple.el: Use set-temporary-overlay-map for universal-argument.
18 (universal-argument-map): Don't use default-bindings.
19 Bind switch-frame explicitly. Replace universal-argument-minus with
20 a conditional binding.
21 (universal-argument-num-events, saved-overriding-map): Remove.
22 (restore-overriding-map): Remove.
23 (universal-argument--mode): Rename from save&set-overriding-map,
24 and rewrite.
25 (universal-argument, universal-argument-more, negative-argument)
26 (digit-argument): Adjust accordingly.
27 (universal-argument-minus): Remove.
28 (universal-argument-other-key): Remove.
29
30 * subr.el (with-demoted-errors): Add `format' argument.
31
322013-09-10 Michael Albinus <michael.albinus@gmx.de>
33
34 * net/tramp.el (tramp-cleanup): Remove. Functionality added to
35 `tramp-cleanup-connection'.
36
37 * net/tramp-cmds.el (tramp-cleanup-connection): Add optional
38 parameters KEEP-DEBUG and KEEP-PASSWORD.
39
40 * net/tramp.el (tramp-file-name-handler):
41 * net/tramp-adb.el (tramp-adb-maybe-open-connection):
42 * net/tramp-sh.el (tramp-open-connection-setup-interactive-shell)
43 (tramp-maybe-open-connection):
44 * net/tramp-smb.el (tramp-smb-maybe-open-connection):
45 Use `tramp-cleanup-connection'.
46
47 * net/tramp-sh.el (tramp-maybe-open-connection):
48 Catch 'uname-changed inside the progress reporter.
49
502013-09-10 Glenn Morris <rgm@gnu.org>
51
52 * simple.el (read-minibuffer): Unbreak it. (Bug#15318)
53
54 * dired-x.el (dired-mark-sexp): Unbreak for systems where ls
55 returns "alternate access method" in mode (eg "-rw-r--r--.").
56
572013-09-08 Glenn Morris <rgm@gnu.org>
58
59 * saveplace.el (load-save-place-alist-from-file):
60 Demote errors. (Bug#15305)
61
622013-09-08 Michael Albinus <michael.albinus@gmx.de>
63
64 Improve compatibility with older Emacsen, and XEmacs.
65
66 * net/tramp.el (tramp-find-method, tramp-find-user): Call `propertize'
67 only if it is bound. It isn't for XEmacs.
68 (with-tramp-progress-reporter): Do not let-bind `result'.
69 This yields to scoping errors in XEmacs.
70 (tramp-handle-make-auto-save-file-name): New function, moved from
71 tramp-sh.el.
72
73 * net/tramp-adb.el (tramp-adb-file-name-handler-alist): Add handler
74 for `make-auto-save-file-name'.
75 (tramp-adb--gnu-switches-to-ash):
76 Use `tramp-compat-replace-regexp-in-string'.
77
78 * net/tramp-cache.el (tramp-cache-print): Call
79 `substring-no-properties' only if it is bound. It isn't for XEmacs.
80
81 * net/tramp-cmds.el (tramp-bug): Call `propertize' only if it is
82 bound. It isn't for XEmacs.
83
84 * net/tramp-compat.el (tramp-compat-copy-file):
85 Catch `wrong-number-of-arguments' error.
86 (tramp-compat-replace-regexp-in-string): New defun.
87
88 * net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add handler
89 for `make-auto-save-file-name'.
90 (tramp-gvfs-handle-copy-file): Use `tramp-compat-funcall' for
91 `copy-file'.
92 (tramp-gvfs-file-gvfs-monitor-file-process-filter)
93 (tramp-gvfs-file-name): Use `tramp-compat-replace-regexp-in-string'.
94 (tramp-synce-list-devices): Use `push' instead of `pushnew'.
95
96 * net/tramp-gw.el (tramp-gw-open-network-stream):
97 Use `tramp-compat-replace-regexp-in-string'.
98
99 * net/tramp-sh.el (tramp-sh-file-name-handler-alist):
100 Call `tramp-handle-make-auto-save-file-name'.
101 (tramp-sh-handle-make-auto-save-file-name): Move to tramp.el.
102 (tramp-sh-file-gvfs-monitor-dir-process-filter)
103 (tramp-sh-file-inotifywait-process-filter):
104 Use `tramp-compat-replace-regexp-in-string'.
105 (tramp-compute-multi-hops): Use `push' instead of `pushnew'.
106
107 * net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add handler
108 for `make-auto-save-file-name'.
109 (tramp-smb-handle-copy-directory):
110 Call `tramp-compat-replace-regexp-in-string'.
111 (tramp-smb-get-file-entries): Use `push' instead of `pushnew'.
112 (tramp-smb-handle-copy-file): Improve error message.
113 (tramp-smb-handle-rename-file): Rename directly only in case
114 `newname' does not exist yet. This is a restriction of smbclient.
115 (tramp-smb-maybe-open-connection): Rerun the function only when
116 `auth-sources' is non-nil.
117
1182013-09-08 Kenichi Handa <handa@gnu.org>
119
120 * international/characters.el: Set category "^" (Combining) for
121 more characters.
122
1232013-09-07 Alan Mackenzie <acm@muc.de>
124
125 Correctly fontify Java class constructors.
126 * progmodes/cc-langs.el (c-type-decl-suffix-key): Now matches ")"
127 in Java Mode.
128 (c-recognize-typeless-decls): Set the Java value to t.
129 * progmodes/cc-engine.el (c-forward-decl-or-cast-1):
130 While handling a "(", add a check for, effectively, Java, and handle a
131 "typeless" declaration there.
132
1332013-09-07 Roland Winkler <winkler@gnu.org>
134
135 * textmodes/bibtex.el (bibtex-biblatex-entry-alist): Add optional
136 field subtitle for entry type book.
137
1382013-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
139
140 * minibuffer.el: Make minibuffer-complete call completion-in-region
141 rather than other way around.
142 (completion--some, completion-pcm--find-all-completions):
143 Don't delay signals when debugging.
144 (minibuffer-completion-contents): Beware fields within the
145 minibuffer contents.
146 (completion-all-sorted-completions): Use defvar-local.
147 (completion--do-completion, completion--cache-all-sorted-completions)
148 (completion-all-sorted-completions, minibuffer-force-complete):
149 Add args `beg' and `end'.
150 (completion--in-region-1): New fun, extracted from minibuffer-complete.
151 (minibuffer-complete): Use completion-in-region.
152 (completion-complete-and-exit): New fun, extracted from
153 minibuffer-complete-and-exit.
154 (minibuffer-complete-and-exit): Use it.
155 (completion--complete-and-exit): Rename from
156 minibuffer--complete-and-exit.
157 (completion-in-region--single-word): New function, extracted from
158 minibuffer-complete-word.
159 (minibuffer-complete-word): Use it.
160 (display-completion-list): Make `common-substring' argument obsolete.
161 (completion--in-region): Call completion--in-region-1 instead of
162 minibuffer-complete.
163 (completion-help-at-point): Pass boundaries to
164 minibuffer-completion-help as args rather than via an overlay.
165 (completion-pcm--string->pattern): Use `any-delim'.
166 (completion-pcm--optimize-pattern): New function.
167 (completion-pcm--pattern->regex): Handle `any-delim'.
168 * icomplete.el (icomplete-forward-completions)
169 (icomplete-backward-completions, icomplete-completions):
170 Adjust calls to completion-all-sorted-completions and
171 completion--cache-all-sorted-completions.
172 (icomplete-with-completion-tables): Default to t.
173 * emacs-lisp/crm.el (crm--current-element): Rename from
174 crm--select-current-element. Don't put an overlay but return the
175 boundaries instead.
176 (crm--completion-command): Take two new args to bind to the boundaries.
177 (crm-completion-help): Adjust accordingly.
178 (crm-complete): Use completion-in-region.
179 (crm-complete-word): Use completion-in-region--single-word.
180 (crm-complete-and-exit): Use completion-complete-and-exit.
181
1822013-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
183
184 * dired-x.el (dired-mark-sexp): Bind the vars lexically rather
185 than dynamically.
186
1872013-09-06 Juri Linkov <juri@jurta.org>
188
189 * info.el (Info-display-images-node): When image file doesn't exist
190 display text version of the image if it's provided in the Info file.
191 Otherwise, display the location of missing image from SRC attribute.
192 Add help-echo text property from ALT attribute. (Bug#15279)
193
1942013-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
195
196 * abbrev.el (edit-abbrevs-mode-map): Rename from edit-abbrevs-map.
197 (edit-abbrevs-mode): Use define-derived-mode.
198
199 * epa.el (epa--encode-coding-string, epa--decode-coding-string)
200 (epa--select-safe-coding-system, epa--derived-mode-p): Make it obvious
201 that it's defined.
202 (epa-key-list-mode, epa-key-mode, epa-info-mode):
203 Use define-derived-mode.
204
205 * epg.el (epg-start-encrypt): Minor CSE simplification.
206
2072013-09-06 William Xu <william.xwl@gmail.com>
208
209 * arc-mode.el: Add support for 7za (bug#15264).
210 (archive-7z-program): New var.
211 (archive-zip-extract, archive-zip-expunge, archive-zip-update)
212 (archive-zip-update-case, archive-7z-extract, archive-7z-expunge)
213 (archive-7z-update, archive-zip-extract, archive-7z-summarize): Use it.
214
2152013-09-06 Michael Albinus <michael.albinus@gmx.de>
216
217 Remove URL syntax.
218
219 * net/tramp.el (tramp-syntax, tramp-prefix-format)
220 (tramp-postfix-method-format, tramp-prefix-ipv6-format)
221 (tramp-postfix-ipv6-format, tramp-prefix-port-format)
222 (tramp-postfix-host-format, tramp-file-name-regexp)
223 (tramp-completion-file-name-regexp)
224 (tramp-completion-dissect-file-name)
225 (tramp-handle-substitute-in-file-name): Remove 'url case.
226 (tramp-file-name-regexp-url)
227 (tramp-completion-file-name-regexp-url): Remove constants.
228
2292013-09-06 Glenn Morris <rgm@gnu.org>
230
231 * replace.el (replace-string): Doc fix re start/end. (Bug#15275)
232
2332013-09-05 Dmitry Gutov <dgutov@yandex.ru>
234
235 * progmodes/ruby-mode.el (ruby-font-lock-keywords): Move "Perl-ish
236 keywords" below "here-doc beginnings" (Bug#15270).
237
2382013-09-05 Stefan Monnier <monnier@iro.umontreal.ca>
239
240 * subr.el (pop): Use `car-safe'.
241 * emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Remove hack
242 to detect unused `pop' return value.
243
244 * progmodes/python.el (python-nav-beginning-of-block): Remove unused
245 var `block-regexp'.
246 (python-nav--forward-sexp): Remove unused var `re-search-fn'.
247 (python-fill-string): Remove unused var `marker'.
248 (python-skeleton-add-menu-items): Remove unused var `items'.
249
250 * international/mule-cmds.el: Require CL.
251 (find-coding-systems-for-charsets): Avoid add-to-list.
252 (sanitize-coding-system-list): New function, extracted from
253 select-safe-coding-system-interactively.
254 (select-safe-coding-system-interactively): Use it.
255 (read-input-method-name): Accept symbols for `default'.
256
257 * emacs-lisp/advice.el (defadvice): Add indent rule.
258
2592013-09-05 Daniel Hackney <dan@haxney.org>
260
261 * dired-x.el:
262 * net/ange-ftp.el:
263 * net/browse-url.el:
264 * net/dbus.el:
265 * net/eudc.el:
266 * net/eudcb-ldap.el:
267 * net/eww.el:
268 * net/imap.el:
269 * printing.el:
270 * vc/ediff-diff.el:
271 * vc/ediff-init.el:
272 * vc/ediff-merg.el:
273 * vc/ediff-mult.el:
274 * vc/ediff-util.el:
275 * vc/ediff-wind.el:
276 * vc/ediff.el:
277 * vc/emerge.el:
278 * vc/pcvs.el:
279 * vc/vc-annotate.el: Prefix unused arguments with `_' to silence
280 byte compiler. Remove some unused let-bound variables.
281
2822013-09-05 Stefan Monnier <monnier@iro.umontreal.ca>
283
284 * emacs-lisp/cconv.el: Use `car-safe' rather than `car' to access
285 a "ref-cell", since it gets better optimized (bug#14883).
286
2872013-09-05 Glenn Morris <rgm@gnu.org>
288
289 * progmodes/cc-awk.el (c-forward-sws): Declare.
290
2912013-09-04 Glenn Morris <rgm@gnu.org>
292
293 * generic-x.el [rul-generic-mode]: Require cc-mode.
294 (c++-mode-syntax-table): Declare.
295 (rul-generic-mode-syntax-table): Init in the defvar.
296
2972013-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
298
299 * vc/vc-dispatcher.el (vc-run-delayed): New macro.
300 (vc-do-command, vc-set-async-update):
301 * vc/vc-mtn.el (vc-mtn-dir-status):
302 * vc/vc-hg.el (vc-hg-dir-status, vc-hg-dir-status-files)
303 (vc-hg-pull, vc-hg-merge-branch):
304 * vc/vc-git.el (vc-git-dir-status-goto-stage, vc-git-pull)
305 (vc-git-merge-branch):
306 * vc/vc-cvs.el (vc-cvs-print-log, vc-cvs-dir-status)
307 (vc-cvs-dir-status-files):
308 * vc/vc-bzr.el (vc-bzr-pull, vc-bzr-merge-branch, vc-bzr-dir-status)
309 (vc-bzr-dir-status-files):
310 * vc/vc-arch.el (vc-arch-dir-status): Use vc-run-delayed.
311 * vc/vc-annotate.el: Use lexical-binding.
312 (vc-annotate-display-select, vc-annotate): Use vc-run-delayed.
313 (vc-sentinel-movepoint): Declare.
314 (vc-annotate): Don't use `goto-line'.
315 * vc/vc.el (vc-diff-internal): Prefer a closure to `(lambda...).
316 (vc-diff-internal, vc-log-internal-common): Use vc-run-delayed.
317 (vc-sentinel-movepoint): Declare.
318 * vc/vc-svn.el: Use lexical-binding.
319 (vc-svn-dir-status, vc-svn-dir-status-files): Use vc-run-delayed.
320 * vc/vc-sccs.el:
321 * vc/vc-rcs.el: Use lexical-binding.
322
323 * autorevert.el (auto-revert-notify-handler): Explicitly ignore
324 `deleted'. Don't drop errors silently.
325
326 * emacs-lisp/gv.el (gv-get): Warn about CL-compiled places.
327
3282013-09-04 Xue Fuqiao <xfq.free@gmail.com>
329
330 * vc/vc.el (vc-ignore): Rewrite.
331 (vc-default-ignore): New function.
332 (vc-default-ignore-completion-table): Use find-ignore-file.
333
334 * vc/vc-bzr.el (vc-bzr-ignore, vc-bzr-ignore-completion-table):
335 * vc/vc-git.el (vc-git-ignore, vc-git-ignore-completion-table):
336 * vc/vc-hg.el (vc-hg-ignore, vc-hg-ignore-completion-table):
337 Remove. Most code moved to vc.el.
338
3392013-09-03 Stefan Monnier <monnier@iro.umontreal.ca>
340
341 * net/tramp-gvfs.el (tramp-gvfs-mount-spec, tramp-synce-list-devices):
342 * net/tramp-smb.el (tramp-smb-get-file-entries):
343 * net/tramp-sh.el (tramp-sh-handle-insert-directory)
344 (tramp-compute-multi-hops): Fix misuses of `add-to-list'.
345
346 * net/eww.el (eww-display-raw): Remove unused argument `charset'.
347 Update call to it.
348 (eww-change-select): Remove unused var `properties'.
349 (eww-make-unique-file-name): Remove unused var `base'.
350
351 * finder.el (finder-compile-keywords): Don't mess with windows.
352
353 * calculator.el (calculator-funcall): Fix typo in last change.
354
355 * vc/vc-git.el (vc-git-checkin): Make it possible to commit a merge.
356
357 * emacs-lisp/package.el (package-activate-1): Don't let a missing
358 <pkg>-autoloads.el file stop us.
359
360 * net/tramp.el (with-parsed-tramp-file-name): Silence compiler
361 warnings, and factor out common code.
362
3632013-09-03 Dmitry Gutov <dgutov@yandex.ru>
364
365 * progmodes/ruby-mode.el (ruby-calculate-indent): Consider
366 two-character operators and whether the character preceding them
367 changes their meaning (Bug#15208).
368
3692013-09-02 Fabián Ezequiel Gallina <fgallina@gnu.org>
370
371 Format code sent to Python shell for robustness.
372 * progmodes/python.el (python-shell-buffer-substring):
373 New function.
374 (python-shell-send-region, python-shell-send-buffer): Use it.
375
3762013-09-02 Michael Albinus <michael.albinus@gmx.de>
377
378 * net/tramp-compat.el (tramp-compat-user-error): Move it ...
379 * net/tramp.el (tramp-user-error): ... here.
380 (tramp-find-method, tramp-check-proper-host)
381 (tramp-dissect-file-name, tramp-debug-message)
382 (tramp-handle-shell-command):
383 * net/tramp-adb.el (tramp-adb-handle-shell-command):
384 * net/tramp-gvfs.el (tramp-gvfs-file-name-handler): Adapt callees.
385
386 * net/tramp-cache.el (tramp-cache-print): Don't print text properties.
387
3882013-09-02 Martin Rudalics <rudalics@gmx.at>
389
390 * avoid.el (mouse-avoidance-point-position)
391 (mouse-avoidance-too-close-p): Handle case where posn-at-point
392 returns nil.
393
3942013-09-02 Fabián Ezequiel Gallina <fgallina@gnu.org>
395
396 * progmodes/python.el (python-shell-completion-get-completions):
397 Drop use of deleted `comint-last-prompt-overlay'.
398 (python-nav-if-name-main): New command.
399
4002013-09-01 Glenn Morris <rgm@gnu.org>
401
402 * Makefile.in (setwins, setwins_almost, setwins_for_subdirs):
403 Avoid leading space in $wins. Otherwise the sed command used by
404 eg compile-main ends up containing "/*.el". (Bug#15170)
405
406 * frame.el (frame-background-mode): Doc fix. (Bug#15226)
407
4082013-08-30 Glenn Morris <rgm@gnu.org>
409
410 * emacs-lisp/bytecomp.el (byte-recompile-directory):
411 Fix is-this-a-directory logic. (Bug#15220)
412
4132013-08-29 Stefan Monnier <monnier@iro.umontreal.ca>
414
415 * textmodes/css-mode.el: Use SMIE.
416 (css-smie-grammar): New var.
417 (css-smie--forward-token, css-smie--backward-token)
418 (css-smie-rules): New functions.
419 (css-mode): Use them.
420 (css-navigation-syntax-table): Remove var.
421 (css-backward-sexp, css-forward-sexp, css-indent-calculate-virtual)
422 (css-indent-calculate, css-indent-line): Remove functions.
423
424 Misc changes to reduce use of `(lambda...); and other cleanups.
425 * cus-edit.el: Use lexical-binding.
426 (customize-push-and-save, customize-apropos)
427 (custom-buffer-create-internal): Use closures.
428 * progmodes/bat-mode.el (bat-mode-syntax-table): "..." are strings.
429 * progmodes/ada-xref.el: Use setq.
430 * net/tramp.el (with-tramp-progress-reporter): Avoid setq.
431 * dframe.el: Use lexical-binding.
432 (dframe-frame-mode): Fix calling convention for hooks. Use a closure.
433 * speedbar.el (speedbar-frame-mode): Adjust call accordingly.
434 * descr-text.el: Use lexical-binding.
435 (describe-text-widget, describe-text-sexp, describe-property-list):
436 Use closures.
437 * comint.el (comint-history-isearch-push-state): Use a closure.
438 * calculator.el: Use lexical-binding.
439 (calculator-number-to-string): Make it work with lexical-binding.
440 (calculator-funcall): Same and use cl-letf.
441
442 * emacs-lisp/lisp.el (lisp--company-doc-buffer)
443 (lisp--company-doc-string, lisp--company-location): New functions.
444 (lisp-completion-at-point): Use them to improve Company support.
445
446 * progmodes/ruby-mode.el (ruby-smie-grammar): Add rule for formal
447 params of lambda expressions.
448 (ruby-smie--implicit-semi-p): Refine rule (bug#15208).
449 (ruby-smie--opening-pipe-p): New function.
450 (ruby-smie--forward-token, ruby-smie--backward-token): Handle Ruby
451 symbols and matched |...| for formal params.
452 (ruby-smie-rules): Don't let the formal params of a "do" prevent it
453 from being treated as hanging. Handle "rescue".
454
4552013-08-29 Glenn Morris <rgm@gnu.org>
456
457 * progmodes/cc-engine.el (c-pull-open-brace):
458 Move definition before use.
459
4602013-08-29 Stefan Monnier <monnier@iro.umontreal.ca>
461
462 * emacs-lisp/cl-macs.el (cl-defsubst): Make it clear that args
463 are immutable. Don't use `unsafe' any more.
464 (cl--defsubst-expand): Don't substitute at the same time as keeping
465 a residual unused let-binding. Don't use `unsafe' any more.
466
4672013-08-29 Glenn Morris <rgm@gnu.org>
468
469 * calendar/cal-china.el (calendar-chinese-year-cache):
470 Recenter on 2015.
471
472 * nxml/nxml-util.el (nxml-debug-clear-inside):
473 Use cl-loop rather than loop.
474
475 * net/eww.el (eww-mode-map): Lower-case menu bar entries look bad.
476
477 * progmodes/sh-script.el (sh-builtins) <bash>: Add some bash4-isms.
478
4792013-08-28 Glenn Morris <rgm@gnu.org>
480
481 * progmodes/antlr-mode.el: No need to require cc-mode twice.
482
483 * progmodes/cc-bytecomp.el (cc-require): Handle uncompiled case.
484
485 * progmodes/cc-mode.el (c-define-abbrev-table): Handle NAME unbound.
486
4872013-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
488
489 * simple.el (repeat-complex-command--called-interactively-skip):
490 New function.
491 (repeat-complex-command): Use it (bug#14136).
492
493 * progmodes/cc-mode.el: Minor cleanup of var declarations.
494 (c-define-abbrev-table): Add `doc' argument.
495 (c-mode-abbrev-table, c++-mode-abbrev-table)
496 (objc-mode-abbrev-table, java-mode-abbrev-table)
497 (idl-mode-abbrev-table, pike-mode-abbrev-table)
498 (awk-mode-abbrev-table): Use it.
499 (c-mode-syntax-table, c-mode-map, c++-mode-syntax-table)
500 (c++-mode-map, objc-mode-syntax-table, objc-mode-map)
501 (java-mode-syntax-table, java-mode-map, idl-mode-syntax-table)
502 (idl-mode-map, pike-mode-syntax-table, pike-mode-map, awk-mode-map):
503 Move initialization into the declaration; and remove any
504 autoload cookie.
505
506 * epg.el (epg--process-filter): Use with-current-buffer, save-excursion
507 and dynamic let binding.
508
509 * vc/smerge-mode.el: Remove redundant :group args.
510
511 * emacs-lisp/package.el (package-activate-1): Don't add unnecessarily
512 to load-path.
513
5142013-08-28 Juri Linkov <juri@jurta.org>
515
516 * isearch.el (isearch-reread-key-sequence-naturally): Use non-nil
517 arg DONT-DOWNCASE-LAST of `read-key-sequence'.
518 (isearch-other-meta-char): Handle an undefined shifted printing
519 character by downshifting it. (Bug#15200)
520
5212013-08-28 Juri Linkov <juri@jurta.org>
522
523 * isearch.el (isearch-search): Change regexp error message for
524 non-regexp searches. (Bug#15166)
525
5262013-08-28 Paul Eggert <eggert@cs.ucla.edu>
527
528 * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
529 for portability to hosts where /bin/sh has problems.
530
5312013-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
532
533 * emacs-lisp/cconv.el (cconv--analyse-function): Improve warning.
534
12013-08-27 Juri Linkov <juri@jurta.org> 5352013-08-27 Juri Linkov <juri@jurta.org>
2 536
3 * isearch.el (isearch-other-meta-char): Don't store kmacro commands 537 * isearch.el (isearch-other-meta-char): Don't store kmacro commands
@@ -12,8 +546,8 @@
122013-08-27 Martin Rudalics <rudalics@gmx.at> 5462013-08-27 Martin Rudalics <rudalics@gmx.at>
13 547
14 * window.el (display-buffer-use-some-window): Add missing 548 * window.el (display-buffer-use-some-window): Add missing
15 argument in call of get-largest-window (Bug#15185). Reported by 549 argument in call of get-largest-window (Bug#15185).
16 Stephen Leake. 550 Reported by Stephen Leake.
17 551
182013-08-27 Glenn Morris <rgm@gnu.org> 5522013-08-27 Glenn Morris <rgm@gnu.org>
19 553
@@ -38,8 +572,8 @@
38 * net/tramp-adb.el (tramp-adb-maybe-open-connection): 572 * net/tramp-adb.el (tramp-adb-maybe-open-connection):
39 * net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection): 573 * net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
40 * net/tramp-sh.el (tramp-maybe-open-connection): 574 * net/tramp-sh.el (tramp-maybe-open-connection):
41 * net/tramp-smb.el (tramp-smb-maybe-open-connection): Apply 575 * net/tramp-smb.el (tramp-smb-maybe-open-connection):
42 `tramp-check-proper-host'. 576 Apply `tramp-check-proper-host'.
43 577
442013-08-26 Tassilo Horn <tsdh@gnu.org> 5782013-08-26 Tassilo Horn <tsdh@gnu.org>
45 579
diff --git a/lisp/ChangeLog.12 b/lisp/ChangeLog.12
index 6b34ef55783..7fcc4ff0caf 100644
--- a/lisp/ChangeLog.12
+++ b/lisp/ChangeLog.12
@@ -17355,7 +17355,7 @@
17355 17355
17356 * calc/calc-embed.el (calc-do-embedded): Update help message. 17356 * calc/calc-embed.el (calc-do-embedded): Update help message.
17357 17357
17358 * calc/calc-prog.el (calc-user-define-invokation): Update help message. 17358 * calc/calc-prog.el (calc-user-define-invocation): Update help message.
17359 17359
173602005-11-28 Stefan Monnier <monnier@iro.umontreal.ca> 173602005-11-28 Stefan Monnier <monnier@iro.umontreal.ca>
17361 17361
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index 066e15368da..4fba1053dfa 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -17,7 +17,7 @@
17# You should have received a copy of the GNU General Public License 17# You should have received a copy of the GNU General Public License
18# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. 18# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
19 19
20SHELL = /bin/sh 20SHELL = @SHELL@
21 21
22srcdir = @srcdir@ 22srcdir = @srcdir@
23top_srcdir = @top_srcdir@ 23top_srcdir = @top_srcdir@
@@ -118,7 +118,7 @@ emacs = EMACSLOADPATH=$(lisp) LC_ALL=C $(EMACS) $(EMACSOPT)
118setwins=subdirs=`find . -type d -print`; \ 118setwins=subdirs=`find . -type d -print`; \
119 for file in $$subdirs; do \ 119 for file in $$subdirs; do \
120 case $$file in */.* | */.*/* | */=* ) ;; \ 120 case $$file in */.* | */.*/* | */=* ) ;; \
121 *) wins="$$wins $$file" ;; \ 121 *) wins="$$wins$${wins:+ }$$file" ;; \
122 esac; \ 122 esac; \
123 done 123 done
124 124
@@ -126,7 +126,7 @@ setwins=subdirs=`find . -type d -print`; \
126setwins_almost=subdirs=`find . -type d -print`; \ 126setwins_almost=subdirs=`find . -type d -print`; \
127 for file in $$subdirs; do \ 127 for file in $$subdirs; do \
128 case $$file in */.* | */.*/* | */=* | */obsolete | */term ) ;; \ 128 case $$file in */.* | */.*/* | */=* | */obsolete | */term ) ;; \
129 *) wins="$$wins $$file" ;; \ 129 *) wins="$$wins$${wins:+ }$$file" ;; \
130 esac; \ 130 esac; \
131 done 131 done
132 132
@@ -134,7 +134,7 @@ setwins_almost=subdirs=`find . -type d -print`; \
134setwins_for_subdirs=subdirs=`find . -type d -print`; \ 134setwins_for_subdirs=subdirs=`find . -type d -print`; \
135 for file in $$subdirs; do \ 135 for file in $$subdirs; do \
136 case $$file in */.* | */.*/* | */=* | */cedet* ) ;; \ 136 case $$file in */.* | */.*/* | */=* | */cedet* ) ;; \
137 *) wins="$$wins $$file" ;; \ 137 *) wins="$$wins$${wins:+ }$$file" ;; \
138 esac; \ 138 esac; \
139 done 139 done
140 140
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index d82e2eabd84..d7d4482693d 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -67,13 +67,15 @@ be replaced by its expansion."
67(put 'abbrev-mode 'safe-local-variable 'booleanp) 67(put 'abbrev-mode 'safe-local-variable 'booleanp)
68 68
69 69
70(defvar edit-abbrevs-map 70(defvar edit-abbrevs-mode-map
71 (let ((map (make-sparse-keymap))) 71 (let ((map (make-sparse-keymap)))
72 (define-key map "\C-x\C-s" 'abbrev-edit-save-buffer) 72 (define-key map "\C-x\C-s" 'abbrev-edit-save-buffer)
73 (define-key map "\C-x\C-w" 'abbrev-edit-save-to-file) 73 (define-key map "\C-x\C-w" 'abbrev-edit-save-to-file)
74 (define-key map "\C-c\C-c" 'edit-abbrevs-redefine) 74 (define-key map "\C-c\C-c" 'edit-abbrevs-redefine)
75 map) 75 map)
76 "Keymap used in `edit-abbrevs'.") 76 "Keymap used in `edit-abbrevs'.")
77(define-obsolete-variable-alias 'edit-abbrevs-map
78 'edit-abbrevs-mode-map "24.4")
77 79
78(defun kill-all-abbrevs () 80(defun kill-all-abbrevs ()
79 "Undefine all defined abbrevs." 81 "Undefine all defined abbrevs."
@@ -144,16 +146,6 @@ Otherwise display all abbrevs."
144 (set-buffer-modified-p nil) 146 (set-buffer-modified-p nil)
145 (current-buffer)))) 147 (current-buffer))))
146 148
147(defun edit-abbrevs-mode ()
148 "Major mode for editing the list of abbrev definitions.
149\\{edit-abbrevs-map}"
150 (interactive)
151 (kill-all-local-variables)
152 (setq major-mode 'edit-abbrevs-mode)
153 (setq mode-name "Edit-Abbrevs")
154 (use-local-map edit-abbrevs-map)
155 (run-mode-hooks 'edit-abbrevs-mode-hook))
156
157(defun edit-abbrevs () 149(defun edit-abbrevs ()
158 "Alter abbrev definitions by editing a list of them. 150 "Alter abbrev definitions by editing a list of them.
159Selects a buffer containing a list of abbrev definitions with 151Selects a buffer containing a list of abbrev definitions with
@@ -1013,6 +1005,11 @@ SORTFUN is passed to `sort' to change the default ordering."
1013 (sort entries (lambda (x y) 1005 (sort entries (lambda (x y)
1014 (funcall sortfun (nth 2 x) (nth 2 y))))))) 1006 (funcall sortfun (nth 2 x) (nth 2 y)))))))
1015 1007
1008;; Keep it after define-abbrev-table, since define-derived-mode uses
1009;; define-abbrev-table.
1010(define-derived-mode edit-abbrevs-mode special-mode "Edit-Abbrevs"
1011 "Major mode for editing the list of abbrev definitions.")
1012
1016(provide 'abbrev) 1013(provide 'abbrev)
1017 1014
1018;;; abbrev.el ends here 1015;;; abbrev.el ends here
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index 5f001ad977b..a4f7015c844 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -218,9 +218,14 @@ Archive and member name will be added."
218;; ------------------------------ 218;; ------------------------------
219;; Zip archive configuration 219;; Zip archive configuration
220 220
221(defvar archive-7z-program (let ((7z (or (executable-find "7z")
222 (executable-find "7za"))))
223 (when 7z
224 (file-name-nondirectory 7z))))
225
221(defcustom archive-zip-extract 226(defcustom archive-zip-extract
222 (cond ((executable-find "unzip") '("unzip" "-qq" "-c")) 227 (cond ((executable-find "unzip") '("unzip" "-qq" "-c"))
223 ((executable-find "7z") '("7z" "x" "-so")) 228 (archive-7z-program `(,archive-7z-program "x" "-so"))
224 ((executable-find "pkunzip") '("pkunzip" "-e" "-o-")) 229 ((executable-find "pkunzip") '("pkunzip" "-e" "-o-"))
225 (t '("unzip" "-qq" "-c"))) 230 (t '("unzip" "-qq" "-c")))
226 "Program and its options to run in order to extract a zip file member. 231 "Program and its options to run in order to extract a zip file member.
@@ -239,7 +244,7 @@ be added."
239 244
240(defcustom archive-zip-expunge 245(defcustom archive-zip-expunge
241 (cond ((executable-find "zip") '("zip" "-d" "-q")) 246 (cond ((executable-find "zip") '("zip" "-d" "-q"))
242 ((executable-find "7z") '("7z" "d")) 247 (archive-7z-program `(,archive-7z-program "d"))
243 ((executable-find "pkzip") '("pkzip" "-d")) 248 ((executable-find "pkzip") '("pkzip" "-d"))
244 (t '("zip" "-d" "-q"))) 249 (t '("zip" "-d" "-q")))
245 "Program and its options to run in order to delete zip file members. 250 "Program and its options to run in order to delete zip file members.
@@ -252,7 +257,7 @@ Archive and member names will be added."
252 257
253(defcustom archive-zip-update 258(defcustom archive-zip-update
254 (cond ((executable-find "zip") '("zip" "-q")) 259 (cond ((executable-find "zip") '("zip" "-q"))
255 ((executable-find "7z") '("7z" "u")) 260 (archive-7z-program `(,archive-7z-program "u"))
256 ((executable-find "pkzip") '("pkzip" "-u" "-P")) 261 ((executable-find "pkzip") '("pkzip" "-u" "-P"))
257 (t '("zip" "-q"))) 262 (t '("zip" "-q")))
258 "Program and its options to run in order to update a zip file member. 263 "Program and its options to run in order to update a zip file member.
@@ -266,7 +271,7 @@ file. Archive and member name will be added."
266 271
267(defcustom archive-zip-update-case 272(defcustom archive-zip-update-case
268 (cond ((executable-find "zip") '("zip" "-q" "-k")) 273 (cond ((executable-find "zip") '("zip" "-q" "-k"))
269 ((executable-find "7z") '("7z" "u")) 274 (archive-7z-program `(,archive-7z-program "u"))
270 ((executable-find "pkzip") '("pkzip" "-u" "-P")) 275 ((executable-find "pkzip") '("pkzip" "-u" "-P"))
271 (t '("zip" "-q" "-k"))) 276 (t '("zip" "-q" "-k")))
272 "Program and its options to run in order to update a case fiddled zip member. 277 "Program and its options to run in order to update a case fiddled zip member.
@@ -321,7 +326,7 @@ Archive and member name will be added."
321;; 7z archive configuration 326;; 7z archive configuration
322 327
323(defcustom archive-7z-extract 328(defcustom archive-7z-extract
324 '("7z" "x" "-so") 329 `(,archive-7z-program "x" "-so")
325 "Program and its options to run in order to extract a 7z file member. 330 "Program and its options to run in order to extract a 7z file member.
326Extraction should happen to standard output. Archive and member name will 331Extraction should happen to standard output. Archive and member name will
327be added." 332be added."
@@ -333,7 +338,7 @@ be added."
333 :group 'archive-7z) 338 :group 'archive-7z)
334 339
335(defcustom archive-7z-expunge 340(defcustom archive-7z-expunge
336 '("7z" "d") 341 `(,archive-7z-program "d")
337 "Program and its options to run in order to delete 7z file members. 342 "Program and its options to run in order to delete 7z file members.
338Archive and member names will be added." 343Archive and member names will be added."
339 :version "24.1" 344 :version "24.1"
@@ -344,7 +349,7 @@ Archive and member names will be added."
344 :group 'archive-7z) 349 :group 'archive-7z)
345 350
346(defcustom archive-7z-update 351(defcustom archive-7z-update
347 '("7z" "u") 352 `(,archive-7z-program "u")
348 "Program and its options to run in order to update a 7z file member. 353 "Program and its options to run in order to update a 7z file member.
349Options should ensure that specified directory will be put into the 7z 354Options should ensure that specified directory will be put into the 7z
350file. Archive and member name will be added." 355file. Archive and member name will be added."
@@ -1864,7 +1869,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
1864 (cond 1869 (cond
1865 ((member-ignore-case (car archive-zip-extract) '("pkunzip" "pkzip")) 1870 ((member-ignore-case (car archive-zip-extract) '("pkunzip" "pkzip"))
1866 (archive-*-extract archive name archive-zip-extract)) 1871 (archive-*-extract archive name archive-zip-extract))
1867 ((equal (car archive-zip-extract) "7z") 1872 ((equal (car archive-zip-extract) archive-7z-program)
1868 (let ((archive-7z-extract archive-zip-extract)) 1873 (let ((archive-7z-extract archive-zip-extract))
1869 (archive-7z-extract archive name))) 1874 (archive-7z-extract archive name)))
1870 (t 1875 (t
@@ -2088,7 +2093,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
2088 (file buffer-file-name) 2093 (file buffer-file-name)
2089 (files ())) 2094 (files ()))
2090 (with-temp-buffer 2095 (with-temp-buffer
2091 (call-process "7z" nil t nil "l" "-slt" file) 2096 (call-process archive-7z-program nil t nil "l" "-slt" file)
2092 (goto-char (point-min)) 2097 (goto-char (point-min))
2093 ;; Four dashes start the meta info section that should be skipped. 2098 ;; Four dashes start the meta info section that should be skipped.
2094 ;; Archive members start with more than four dashes. 2099 ;; Archive members start with more than four dashes.
diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index 978a834cb4c..0e2b6f32cf3 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -531,7 +531,7 @@ will use an up-to-date value of `auto-revert-interval'"
531 531
532(defun auto-revert-notify-handler (event) 532(defun auto-revert-notify-handler (event)
533 "Handle an EVENT returned from file notification." 533 "Handle an EVENT returned from file notification."
534 (ignore-errors 534 (with-demoted-errors
535 (let* ((descriptor (car event)) 535 (let* ((descriptor (car event))
536 (action (nth 1 event)) 536 (action (nth 1 event))
537 (file (nth 2 event)) 537 (file (nth 2 event))
@@ -541,28 +541,31 @@ will use an up-to-date value of `auto-revert-interval'"
541 ;; Check, that event is meant for us. 541 ;; Check, that event is meant for us.
542 (cl-assert descriptor) 542 (cl-assert descriptor)
543 ;; We do not handle `deleted', because nothing has to be refreshed. 543 ;; We do not handle `deleted', because nothing has to be refreshed.
544 (cl-assert (memq action '(attribute-changed changed created renamed)) t) 544 (unless (eq action 'deleted)
545 ;; Since we watch a directory, a file name must be returned. 545 (cl-assert (memq action '(attribute-changed changed created renamed))
546 (cl-assert (stringp file)) 546 t)
547 (when (eq action 'renamed) (cl-assert (stringp file1))) 547 ;; Since we watch a directory, a file name must be returned.
548 ;; Loop over all buffers, in order to find the intended one. 548 (cl-assert (stringp file))
549 (dolist (buffer buffers) 549 (when (eq action 'renamed) (cl-assert (stringp file1)))
550 (when (buffer-live-p buffer) 550 ;; Loop over all buffers, in order to find the intended one.
551 (with-current-buffer buffer 551 (dolist (buffer buffers)
552 (when (and (stringp buffer-file-name) 552 (when (buffer-live-p buffer)
553 (or 553 (with-current-buffer buffer
554 (and (memq action '(attribute-changed changed created)) 554 (when (and (stringp buffer-file-name)
555 (string-equal 555 (or
556 (file-name-nondirectory file) 556 (and (memq action '(attribute-changed changed
557 (file-name-nondirectory buffer-file-name))) 557 created))
558 (and (eq action 'renamed) 558 (string-equal
559 (string-equal 559 (file-name-nondirectory file)
560 (file-name-nondirectory file1) 560 (file-name-nondirectory buffer-file-name)))
561 (file-name-nondirectory buffer-file-name))))) 561 (and (eq action 'renamed)
562 ;; Mark buffer modified. 562 (string-equal
563 (setq auto-revert-notify-modified-p t) 563 (file-name-nondirectory file1)
564 ;; No need to check other buffers. 564 (file-name-nondirectory buffer-file-name)))))
565 (cl-return)))))))) 565 ;; Mark buffer modified.
566 (setq auto-revert-notify-modified-p t)
567 ;; No need to check other buffers.
568 (cl-return)))))))))
566 569
567(defun auto-revert-active-p () 570(defun auto-revert-active-p ()
568 "Check if auto-revert is active (in current buffer or globally)." 571 "Check if auto-revert is active (in current buffer or globally)."
diff --git a/lisp/avoid.el b/lisp/avoid.el
index c92d456ef0c..72f90a30ff5 100644
--- a/lisp/avoid.el
+++ b/lisp/avoid.el
@@ -41,9 +41,9 @@
41;; 41;;
42;; (if (eq window-system 'x) 42;; (if (eq window-system 'x)
43;; (mouse-avoidance-set-pointer-shape 43;; (mouse-avoidance-set-pointer-shape
44;; (eval (nth (random 4) 44;; (nth (random 4)
45;; '(x-pointer-man x-pointer-spider 45;; (list x-pointer-man x-pointer-spider
46;; x-pointer-gobbler x-pointer-gumby))))) 46;; x-pointer-gobbler x-pointer-gumby))))
47;; 47;;
48;; For completely random pointer shape, replace the setq above with: 48;; For completely random pointer shape, replace the setq above with:
49;; (setq x-pointer-shape (mouse-avoidance-random-shape)) 49;; (setq x-pointer-shape (mouse-avoidance-random-shape))
@@ -154,13 +154,15 @@ TOP-OR-BOTTOM-POS: Distance from top or bottom edge of frame or window."
154(defun mouse-avoidance-point-position () 154(defun mouse-avoidance-point-position ()
155 "Return the position of point as (FRAME X . Y). 155 "Return the position of point as (FRAME X . Y).
156Analogous to `mouse-position'." 156Analogous to `mouse-position'."
157 (let ((edges (window-inside-edges)) 157 (let* ((edges (window-inside-edges))
158 (x-y (posn-x-y (posn-at-point)))) 158 (posn-at-point (posn-at-point))
159 (cons (selected-frame) 159 (x-y (and posn-at-point (posn-x-y posn-at-point))))
160 (cons (+ (car edges) 160 (when x-y
161 (/ (car x-y) (frame-char-width))) 161 (cons (selected-frame)
162 (+ (car (cdr edges)) 162 (cons (+ (car edges)
163 (/ (cdr x-y) (frame-char-height))))))) 163 (/ (car x-y) (frame-char-width)))
164 (+ (car (cdr edges))
165 (/ (cdr x-y) (frame-char-height))))))))
164 166
165;(defun mouse-avoidance-point-position-test () 167;(defun mouse-avoidance-point-position-test ()
166; (interactive) 168; (interactive)
@@ -185,19 +187,21 @@ MOUSE is the current mouse position as returned by `mouse-position'.
185Acceptable distance is defined by `mouse-avoidance-threshold'." 187Acceptable distance is defined by `mouse-avoidance-threshold'."
186 (let* ((frame (car mouse)) 188 (let* ((frame (car mouse))
187 (mouse-y (cdr (cdr mouse))) 189 (mouse-y (cdr (cdr mouse)))
188 (tool-bar-lines (frame-parameter nil 'tool-bar-lines))) 190 (tool-bar-lines (frame-parameter nil 'tool-bar-lines))
191 point)
189 (or tool-bar-lines 192 (or tool-bar-lines
190 (setq tool-bar-lines 0)) 193 (setq tool-bar-lines 0))
191 (if (and mouse-y (< mouse-y tool-bar-lines)) 194 (cond
192 nil 195 ((and mouse-y (< mouse-y tool-bar-lines))
193 (let ((point (mouse-avoidance-point-position)) 196 nil)
194 (mouse-x (car (cdr mouse)))) 197 ((setq point (mouse-avoidance-point-position))
198 (let ((mouse-x (car (cdr mouse))))
195 (and (eq frame (car point)) 199 (and (eq frame (car point))
196 (not (null mouse-x)) 200 (not (null mouse-x))
197 (< (abs (- mouse-x (car (cdr point)))) 201 (< (abs (- mouse-x (car (cdr point))))
198 mouse-avoidance-threshold) 202 mouse-avoidance-threshold)
199 (< (abs (- mouse-y (cdr (cdr point)))) 203 (< (abs (- mouse-y (cdr (cdr point))))
200 mouse-avoidance-threshold)))))) 204 mouse-avoidance-threshold)))))))
201 205
202(defun mouse-avoidance-banish-destination () 206(defun mouse-avoidance-banish-destination ()
203 "The position to which Mouse Avoidance mode `banish' moves the mouse. 207 "The position to which Mouse Avoidance mode `banish' moves the mouse.
diff --git a/lisp/calculator.el b/lisp/calculator.el
index c9a73054712..c4611c12d87 100644
--- a/lisp/calculator.el
+++ b/lisp/calculator.el
@@ -1,4 +1,4 @@
1;;; calculator.el --- a [not so] simple calculator for Emacs 1;;; calculator.el --- a [not so] simple calculator for Emacs -*- lexical-binding: t -*-
2 2
3;; Copyright (C) 1998, 2000-2013 Free Software Foundation, Inc. 3;; Copyright (C) 1998, 2000-2013 Free Software Foundation, Inc.
4 4
@@ -131,8 +131,8 @@ The displayer is a symbol, a string or an expression. A symbol should
131be the name of a one-argument function, a string is used with a single 131be the name of a one-argument function, a string is used with a single
132argument and an expression will be evaluated with the variable `num' 132argument and an expression will be evaluated with the variable `num'
133bound to whatever should be displayed. If it is a function symbol, it 133bound to whatever should be displayed. If it is a function symbol, it
134should be able to handle special symbol arguments, currently 'left and 134should be able to handle special symbol arguments, currently `left' and
135'right which will be sent by special keys to modify display parameters 135`right' which will be sent by special keys to modify display parameters
136associated with the displayer function (for example to change the number 136associated with the displayer function (for example to change the number
137of digits displayed). 137of digits displayed).
138 138
@@ -241,6 +241,8 @@ Examples:
241;;;===================================================================== 241;;;=====================================================================
242;;; Code: 242;;; Code:
243 243
244(eval-when-compile (require 'cl-lib))
245
244;;;--------------------------------------------------------------------- 246;;;---------------------------------------------------------------------
245;;; Variables 247;;; Variables
246 248
@@ -1124,11 +1126,10 @@ the 'left or 'right when one of the standard modes is used."
1124 (format calculator-displayer num)) 1126 (format calculator-displayer num))
1125 ((symbolp calculator-displayer) 1127 ((symbolp calculator-displayer)
1126 (funcall calculator-displayer num)) 1128 (funcall calculator-displayer num))
1127 ((and (consp calculator-displayer) 1129 ((eq 'std (car-safe calculator-displayer))
1128 (eq 'std (car calculator-displayer)))
1129 (calculator-standard-displayer num (cadr calculator-displayer))) 1130 (calculator-standard-displayer num (cadr calculator-displayer)))
1130 ((listp calculator-displayer) 1131 ((listp calculator-displayer)
1131 (eval calculator-displayer)) 1132 (eval calculator-displayer `((num. ,num))))
1132 (t (prin1-to-string num t)))) 1133 (t (prin1-to-string num t))))
1133 ;; operators are printed here 1134 ;; operators are printed here
1134 (t (prin1-to-string (nth 1 num) t)))) 1135 (t (prin1-to-string (nth 1 num) t))))
@@ -1273,29 +1274,24 @@ arguments."
1273 ;; smaller than calculator-epsilon (1e-15). I don't think this is 1274 ;; smaller than calculator-epsilon (1e-15). I don't think this is
1274 ;; necessary now. 1275 ;; necessary now.
1275 (if (symbolp f) 1276 (if (symbolp f)
1276 (cond ((and X Y) (funcall f X Y)) 1277 (cond ((and X Y) (funcall f X Y))
1277 (X (funcall f X)) 1278 (X (funcall f X))
1278 (t (funcall f))) 1279 (t (funcall f)))
1279 ;; f is an expression 1280 ;; f is an expression
1280 (let* ((__f__ f) ; so we can get this value below... 1281 (let* ((TX (calculator-truncate X))
1281 (TX (calculator-truncate X))
1282 (TY (and Y (calculator-truncate Y))) 1282 (TY (and Y (calculator-truncate Y)))
1283 (DX (if calculator-deg (/ (* X pi) 180) X)) 1283 (DX (if calculator-deg (/ (* X pi) 180) X))
1284 (L calculator-saved-list) 1284 (L calculator-saved-list))
1285 (Fbound (fboundp 'F)) 1285 (cl-letf (((symbol-function 'F)
1286 (Fsave (and Fbound (symbol-function 'F))) 1286 (lambda (&optional x y) (calculator-funcall f x y)))
1287 (Dbound (fboundp 'D)) 1287 ((symbol-function 'D)
1288 (Dsave (and Dbound (symbol-function 'D)))) 1288 (lambda (x) (if calculator-deg (/ (* x 180) float-pi) x))))
1289 ;; a shortened version of flet 1289 (eval f `((X . ,X)
1290 (fset 'F (function 1290 (Y . ,Y)
1291 (lambda (&optional x y) 1291 (TX . ,TX)
1292 (calculator-funcall __f__ x y)))) 1292 (TY . ,TY)
1293 (fset 'D (function 1293 (DX . ,DX)
1294 (lambda (x) 1294 (L . ,L))))))
1295 (if calculator-deg (/ (* x 180) float-pi) x))))
1296 (unwind-protect (eval f)
1297 (if Fbound (fset 'F Fsave) (fmakunbound 'F))
1298 (if Dbound (fset 'D Dsave) (fmakunbound 'D)))))
1299 (error 0))) 1295 (error 0)))
1300 1296
1301;;;--------------------------------------------------------------------- 1297;;;---------------------------------------------------------------------
diff --git a/lisp/calendar/cal-china.el b/lisp/calendar/cal-china.el
index 86e6efa9696..ca9af673cc2 100644
--- a/lisp/calendar/cal-china.el
+++ b/lisp/calendar/cal-china.el
@@ -327,19 +327,7 @@ Gregorian year Y-1 to the Chinese month of the solstice of Gregorian year Y."
327(defvar calendar-chinese-year-cache 327(defvar calendar-chinese-year-cache
328 ;; Maintainers: delete existing value, position point at start of 328 ;; Maintainers: delete existing value, position point at start of
329 ;; empty line, then call M-: (calendar-chinese-year-cache-init N) 329 ;; empty line, then call M-: (calendar-chinese-year-cache-init N)
330 '((2000 (12 730126) (1 730155) (2 730185) (3 730215) (4 730244) (5 730273) 330 '((2005 (12 731956) (1 731986) (2 732015) (3 732045) (4 732074) (5 732104)
331 (6 730303) (7 730332) (8 730361) (9 730391) (10 730420) (11 730450))
332 (2001 (12 730480) (1 730509) (2 730539) (3 730569) (4 730598) (4.5 730628)
333 (5 730657) (6 730687) (7 730716) (8 730745) (9 730775) (10 730804)
334 (11 730834))
335 (2002 (12 730863) (1 730893) (2 730923) (3 730953) (4 730982) (5 731012)
336 (6 731041) (7 731071) (8 731100) (9 731129) (10 731159) (11 731188))
337 (2003 (12 731218) (1 731247) (2 731277) (3 731307) (4 731336) (5 731366)
338 (6 731396) (7 731425) (8 731455) (9 731484) (10 731513) (11 731543))
339 (2004 (12 731572) (1 731602) (2 731631) (2.5 731661) (3 731690) (4 731720)
340 (5 731750) (6 731779) (7 731809) (8 731838) (9 731868) (10 731897)
341 (11 731927))
342 (2005 (12 731956) (1 731986) (2 732015) (3 732045) (4 732074) (5 732104)
343 (6 732133) (7 732163) (8 732193) (9 732222) (10 732252) (11 732281)) 331 (6 732133) (7 732163) (8 732193) (9 732222) (10 732252) (11 732281))
344 (2006 (12 732311) (1 732340) (2 732370) (3 732399) (4 732429) (5 732458) 332 (2006 (12 732311) (1 732340) (2 732370) (3 732399) (4 732429) (5 732458)
345 (6 732488) (7 732517) (7.5 732547) (8 732576) (9 732606) (10 732636) 333 (6 732488) (7 732517) (7.5 732547) (8 732576) (9 732606) (10 732636)
@@ -376,7 +364,19 @@ Gregorian year Y-1 to the Chinese month of the solstice of Gregorian year Y."
376 (6 737243) (7 737272) (8 737301) (9 737331) (10 737360) (11 737389)) 364 (6 737243) (7 737272) (8 737301) (9 737331) (10 737360) (11 737389))
377 (2020 (12 737419) (1 737449) (2 737478) (3 737508) (4 737538) (4.5 737568) 365 (2020 (12 737419) (1 737449) (2 737478) (3 737508) (4 737538) (4.5 737568)
378 (5 737597) (6 737627) (7 737656) (8 737685) (9 737715) (10 737744) 366 (5 737597) (6 737627) (7 737656) (8 737685) (9 737715) (10 737744)
379 (11 737774))) 367 (11 737774))
368 (2021 (12 737803) (1 737833) (2 737862) (3 737892) (4 737922) (5 737951)
369 (6 737981) (7 738010) (8 738040) (9 738069) (10 738099) (11 738128))
370 (2022 (12 738158) (1 738187) (2 738217) (3 738246) (4 738276) (5 738305)
371 (6 738335) (7 738365) (8 738394) (9 738424) (10 738453) (11 738483))
372 (2023 (12 738512) (1 738542) (2 738571) (2.5 738601) (3 738630) (4 738659)
373 (5 738689) (6 738719) (7 738748) (8 738778) (9 738808) (10 738837)
374 (11 738867))
375 (2024 (12 738896) (1 738926) (2 738955) (3 738985) (4 739014) (5 739043)
376 (6 739073) (7 739102) (8 739132) (9 739162) (10 739191) (11 739221))
377 (2025 (12 739251) (1 739280) (2 739310) (3 739339) (4 739369) (5 739398)
378 (6 739427) (6.5 739457) (7 739486) (8 739516) (9 739545) (10 739575)
379 (11 739605)))
380 "Alist of Chinese year structures as determined by `chinese-year'. 380 "Alist of Chinese year structures as determined by `chinese-year'.
381The default can be nil, but some values are precomputed for efficiency.") 381The default can be nil, but some values are precomputed for efficiency.")
382 382
diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog
index c39a8a700ef..50467fa6e37 100644
--- a/lisp/cedet/ChangeLog
+++ b/lisp/cedet/ChangeLog
@@ -1,3 +1,8 @@
12013-09-05 Glenn Morris <rgm@gnu.org>
2
3 * semantic/fw.el (semantic-make-local-hook):
4 Simplify by dropping Emacs <= 20.
5
12013-07-29 David Engster <deng@randomsample.de> 62013-07-29 David Engster <deng@randomsample.de>
2 7
3 * lisp/cedet/cedet.el (cedet-packages): Remove speedbar since its 8 * lisp/cedet/cedet.el (cedet-packages): Remove speedbar since its
diff --git a/lisp/cedet/semantic/fw.el b/lisp/cedet/semantic/fw.el
index dadf181ce21..7850e0462b2 100644
--- a/lisp/cedet/semantic/fw.el
+++ b/lisp/cedet/semantic/fw.el
@@ -123,8 +123,7 @@
123 123
124 124
125 (defalias 'semantic-make-local-hook 125 (defalias 'semantic-make-local-hook
126 (if (and (not (featurep 'xemacs)) 126 (if (featurep 'emacs)
127 (>= emacs-major-version 21))
128 #'identity #'make-local-hook)) 127 #'identity #'make-local-hook))
129 128
130 (defalias 'semantic-mode-line-update 129 (defalias 'semantic-mode-line-update
diff --git a/lisp/comint.el b/lisp/comint.el
index 4517e9c65a0..0ce7053c031 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -1562,8 +1562,9 @@ or to the last history element for a backward search."
1562 "Save a function restoring the state of input history search. 1562 "Save a function restoring the state of input history search.
1563Save `comint-input-ring-index' to the additional state parameter 1563Save `comint-input-ring-index' to the additional state parameter
1564in the search status stack." 1564in the search status stack."
1565 `(lambda (cmd) 1565 (let ((index comint-input-ring-index))
1566 (comint-history-isearch-pop-state cmd ,comint-input-ring-index))) 1566 (lambda (cmd)
1567 (comint-history-isearch-pop-state cmd index))))
1567 1568
1568(defun comint-history-isearch-pop-state (_cmd hist-pos) 1569(defun comint-history-isearch-pop-state (_cmd hist-pos)
1569 "Restore the input history search state. 1570 "Restore the input history search state.
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index b50c1a5155b..176440f91bb 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -1,4 +1,4 @@
1;;; cus-edit.el --- tools for customizing Emacs and Lisp packages 1;;; cus-edit.el --- tools for customizing Emacs and Lisp packages -*- lexical-binding:t -*-
2;; 2;;
3;; Copyright (C) 1996-1997, 1999-2013 Free Software Foundation, Inc. 3;; Copyright (C) 1996-1997, 1999-2013 Free Software Foundation, Inc.
4;; 4;;
@@ -1057,8 +1057,8 @@ the resulting list value now. Otherwise, add an entry to
1057 (let ((coding-system-for-read nil)) 1057 (let ((coding-system-for-read nil))
1058 (customize-save-variable list-var (eval list-var))) 1058 (customize-save-variable list-var (eval list-var)))
1059 (add-hook 'after-init-hook 1059 (add-hook 'after-init-hook
1060 `(lambda () 1060 (lambda ()
1061 (customize-push-and-save ',list-var ',elts))))) 1061 (customize-push-and-save list-var elts)))))
1062 1062
1063;;;###autoload 1063;;;###autoload
1064(defun customize () 1064(defun customize ()
@@ -1415,6 +1415,7 @@ suggest to customize that face, if it's customizable."
1415 "*Customize Saved*")))) 1415 "*Customize Saved*"))))
1416 1416
1417(declare-function apropos-parse-pattern "apropos" (pattern)) 1417(declare-function apropos-parse-pattern "apropos" (pattern))
1418(defvar apropos-regexp)
1418 1419
1419;;;###autoload 1420;;;###autoload
1420(defun customize-apropos (pattern &optional type) 1421(defun customize-apropos (pattern &optional type)
@@ -1431,23 +1432,23 @@ If TYPE is `groups', include only groups."
1431 (require 'apropos) 1432 (require 'apropos)
1432 (unless (memq type '(nil options faces groups)) 1433 (unless (memq type '(nil options faces groups))
1433 (error "Invalid setting type %s" (symbol-name type))) 1434 (error "Invalid setting type %s" (symbol-name type)))
1434 (apropos-parse-pattern pattern) 1435 (apropos-parse-pattern pattern) ;Sets apropos-regexp by side-effect: Yuck!
1435 (let (found) 1436 (let (found)
1436 (mapatoms 1437 (mapatoms
1437 `(lambda (symbol) 1438 (lambda (symbol)
1438 (when (string-match-p apropos-regexp (symbol-name symbol)) 1439 (when (string-match-p apropos-regexp (symbol-name symbol))
1439 ,(if (memq type '(nil groups)) 1440 (if (memq type '(nil groups))
1440 '(if (get symbol 'custom-group) 1441 (if (get symbol 'custom-group)
1441 (push (list symbol 'custom-group) found))) 1442 (push (list symbol 'custom-group) found)))
1442 ,(if (memq type '(nil faces)) 1443 (if (memq type '(nil faces))
1443 '(if (custom-facep symbol) 1444 (if (custom-facep symbol)
1444 (push (list symbol 'custom-face) found))) 1445 (push (list symbol 'custom-face) found)))
1445 ,(if (memq type '(nil options)) 1446 (if (memq type '(nil options))
1446 `(if (and (boundp symbol) 1447 (if (and (boundp symbol)
1447 (eq (indirect-variable symbol) symbol) 1448 (eq (indirect-variable symbol) symbol)
1448 (or (get symbol 'saved-value) 1449 (or (get symbol 'saved-value)
1449 (custom-variable-p symbol))) 1450 (custom-variable-p symbol)))
1450 (push (list symbol 'custom-variable) found)))))) 1451 (push (list symbol 'custom-variable) found))))))
1451 (unless found 1452 (unless found
1452 (error "No customizable %s matching %s" (symbol-name type) pattern)) 1453 (error "No customizable %s matching %s" (symbol-name type) pattern))
1453 (custom-buffer-create 1454 (custom-buffer-create
@@ -1621,8 +1622,8 @@ or a regular expression.")
1621 (widget-create 1622 (widget-create
1622 'editable-field 1623 'editable-field
1623 :size 40 :help-echo echo 1624 :size 40 :help-echo echo
1624 :action `(lambda (widget &optional event) 1625 :action (lambda (widget &optional _event)
1625 (customize-apropos (split-string (widget-value widget))))))) 1626 (customize-apropos (split-string (widget-value widget)))))))
1626 (widget-insert " ") 1627 (widget-insert " ")
1627 (widget-create-child-and-convert 1628 (widget-create-child-and-convert
1628 search-widget 'push-button 1629 search-widget 'push-button
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 774ee92a146..134dbdfb33b 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -1,4 +1,4 @@
1;;; descr-text.el --- describe text mode 1;;; descr-text.el --- describe text mode -*- lexical-binding:t -*-
2 2
3;; Copyright (C) 1994-1996, 2001-2013 Free Software Foundation, Inc. 3;; Copyright (C) 1994-1996, 2001-2013 Free Software Foundation, Inc.
4 4
@@ -23,7 +23,7 @@
23 23
24;;; Commentary: 24;;; Commentary:
25 25
26;;; Describe-Text Mode. 26;; Describe-Text Mode.
27 27
28;;; Code: 28;;; Code:
29 29
@@ -36,8 +36,7 @@
36 "Insert text to describe WIDGET in the current buffer." 36 "Insert text to describe WIDGET in the current buffer."
37 (insert-text-button 37 (insert-text-button
38 (symbol-name (if (symbolp widget) widget (car widget))) 38 (symbol-name (if (symbolp widget) widget (car widget)))
39 'action `(lambda (&rest ignore) 39 'action (lambda (&rest _ignore) (widget-browse widget))
40 (widget-browse ',widget))
41 'help-echo "mouse-2, RET: browse this widget") 40 'help-echo "mouse-2, RET: browse this widget")
42 (insert " ") 41 (insert " ")
43 (insert-text-button 42 (insert-text-button
@@ -55,10 +54,10 @@
55 (<= (length pp) (- (window-width) (current-column)))) 54 (<= (length pp) (- (window-width) (current-column))))
56 (insert pp) 55 (insert pp)
57 (insert-text-button 56 (insert-text-button
58 "[Show]" 'action `(lambda (&rest ignore) 57 "[Show]" 'action (lambda (&rest _ignore)
59 (with-output-to-temp-buffer 58 (with-output-to-temp-buffer
60 "*Pp Eval Output*" 59 "*Pp Eval Output*"
61 (princ ',pp))) 60 (princ pp)))
62 'help-echo "mouse-2, RET: pretty print value in another buffer")))) 61 'help-echo "mouse-2, RET: pretty print value in another buffer"))))
63 62
64(defun describe-property-list (properties) 63(defun describe-property-list (properties)
@@ -81,8 +80,8 @@ into help buttons that call `describe-text-category' or
81 (cond ((eq key 'category) 80 (cond ((eq key 'category)
82 (insert-text-button 81 (insert-text-button
83 (symbol-name value) 82 (symbol-name value)
84 'action `(lambda (&rest ignore) 83 'action (lambda (&rest _ignore)
85 (describe-text-category ',value)) 84 (describe-text-category value))
86 'follow-link t 85 'follow-link t
87 'help-echo "mouse-2, RET: describe this category")) 86 'help-echo "mouse-2, RET: describe this category"))
88 ((memq key '(face font-lock-face mouse-face)) 87 ((memq key '(face font-lock-face mouse-face))
@@ -663,7 +662,7 @@ relevant to POS."
663 ((and (< char 32) (not (memq char '(9 10)))) 662 ((and (< char 32) (not (memq char '(9 10))))
664 'escape-glyph))))) 663 'escape-glyph)))))
665 (if face (list (list "hardcoded face" 664 (if face (list (list "hardcoded face"
666 `(insert-text-button 665 `(insert-text-button ;FIXME: Wrap in lambda!
667 ,(symbol-name face) 666 ,(symbol-name face)
668 'type 'help-face 667 'type 'help-face
669 'help-args '(,face)))))) 668 'help-args '(,face))))))
diff --git a/lisp/dframe.el b/lisp/dframe.el
index 21b508512d3..66967075e34 100644
--- a/lisp/dframe.el
+++ b/lisp/dframe.el
@@ -1,4 +1,4 @@
1;;; dframe --- dedicate frame support modes 1;;; dframe --- dedicate frame support modes -*- lexical-binding:t -*-
2 2
3;; Copyright (C) 1996-2013 Free Software Foundation, Inc. 3;; Copyright (C) 1996-2013 Free Software Foundation, Inc.
4 4
@@ -259,9 +259,15 @@ This buffer will have `dframe-frame-mode' run on it.
259FRAME-NAME is the name of the frame to create. 259FRAME-NAME is the name of the frame to create.
260LOCAL-MODE-FN is the function used to call this one. 260LOCAL-MODE-FN is the function used to call this one.
261PARAMETERS are frame parameters to apply to this dframe. 261PARAMETERS are frame parameters to apply to this dframe.
262DELETE-HOOK are hooks to run when deleting a frame. 262DELETE-HOOK is a hook to run when deleting a frame.
263POPUP-HOOK are hooks to run before showing a frame. 263POPUP-HOOK is a hook to run before showing a frame.
264CREATE-HOOK are hooks to run after creating a frame." 264CREATE-HOOK is a hook to run after creating a frame."
265 (let ((conv-hook (lambda (val)
266 (let ((sym (make-symbol "hook")))
267 (set sym val) sym))))
268 (if (consp delete-hook) (setq delete-hook (funcall conv-hook delete-hook)))
269 (if (consp create-hook) (setq create-hook (funcall conv-hook create-hook)))
270 (if (consp popup-hook) (setq popup-hook (funcall conv-hook popup-hook))))
265 ;; toggle frame on and off. 271 ;; toggle frame on and off.
266 (if (not arg) (if (dframe-live-p (symbol-value frame-var)) 272 (if (not arg) (if (dframe-live-p (symbol-value frame-var))
267 (setq arg -1) (setq arg 1))) 273 (setq arg -1) (setq arg 1)))
@@ -270,7 +276,7 @@ CREATE-HOOK are hooks to run after creating a frame."
270 ;; turn the frame off on neg number 276 ;; turn the frame off on neg number
271 (if (and (numberp arg) (< arg 0)) 277 (if (and (numberp arg) (< arg 0))
272 (progn 278 (progn
273 (run-hooks 'delete-hook) 279 (run-hooks delete-hook)
274 (if (and (symbol-value frame-var) 280 (if (and (symbol-value frame-var)
275 (frame-live-p (symbol-value frame-var))) 281 (frame-live-p (symbol-value frame-var)))
276 (progn 282 (progn
@@ -279,7 +285,7 @@ CREATE-HOOK are hooks to run after creating a frame."
279 (set frame-var nil)) 285 (set frame-var nil))
280 ;; Set this as our currently attached frame 286 ;; Set this as our currently attached frame
281 (setq dframe-attached-frame (selected-frame)) 287 (setq dframe-attached-frame (selected-frame))
282 (run-hooks 'popup-hook) 288 (run-hooks popup-hook)
283 ;; Updated the buffer passed in to contain all the hacks needed 289 ;; Updated the buffer passed in to contain all the hacks needed
284 ;; to make it work well in a dedicated window. 290 ;; to make it work well in a dedicated window.
285 (with-current-buffer (symbol-value buffer-var) 291 (with-current-buffer (symbol-value buffer-var)
@@ -331,15 +337,15 @@ CREATE-HOOK are hooks to run after creating a frame."
331 (setq temp-buffer-show-function 'dframe-temp-buffer-show-function) 337 (setq temp-buffer-show-function 'dframe-temp-buffer-show-function)
332 ;; If this buffer is killed, we must make sure that we destroy 338 ;; If this buffer is killed, we must make sure that we destroy
333 ;; the frame the dedicated window is in. 339 ;; the frame the dedicated window is in.
334 (add-hook 'kill-buffer-hook `(lambda () 340 (add-hook 'kill-buffer-hook (lambda ()
335 (let ((skilling (boundp 'skilling))) 341 (let ((skilling (boundp 'skilling)))
336 (if skilling 342 (if skilling
337 nil 343 nil
338 (if dframe-controlled 344 (if dframe-controlled
339 (progn 345 (progn
340 (funcall dframe-controlled -1) 346 (funcall dframe-controlled -1)
341 (setq ,buffer-var nil) 347 (set buffer-var nil)
342 ))))) 348 )))))
343 t t) 349 t t)
344 ) 350 )
345 ;; Get the frame to work in 351 ;; Get the frame to work in
@@ -396,7 +402,7 @@ CREATE-HOOK are hooks to run after creating a frame."
396 (switch-to-buffer (symbol-value buffer-var)) 402 (switch-to-buffer (symbol-value buffer-var))
397 (set-window-dedicated-p (selected-window) t)) 403 (set-window-dedicated-p (selected-window) t))
398 ;; Run hooks (like reposition) 404 ;; Run hooks (like reposition)
399 (run-hooks 'create-hook) 405 (run-hooks create-hook)
400 ;; Frame name 406 ;; Frame name
401 (if (and (or (null window-system) (eq window-system 'pc)) 407 (if (and (or (null window-system) (eq window-system 'pc))
402 (fboundp 'set-frame-name)) 408 (fboundp 'set-frame-name))
@@ -602,7 +608,7 @@ Argument E is the event deleting the frame."
602If the selected frame is not in the symbol FRAME-VAR, then FRAME-VAR 608If the selected frame is not in the symbol FRAME-VAR, then FRAME-VAR
603frame is selected. If the FRAME-VAR is active, then select the 609frame is selected. If the FRAME-VAR is active, then select the
604attached frame. If FRAME-VAR is nil, ACTIVATOR is called to 610attached frame. If FRAME-VAR is nil, ACTIVATOR is called to
605created it. HOOK is an optional argument of hooks to run when 611created it. HOOK is an optional hook to run when
606selecting FRAME-VAR." 612selecting FRAME-VAR."
607 (interactive) 613 (interactive)
608 (if (eq (selected-frame) (symbol-value frame-var)) 614 (if (eq (selected-frame) (symbol-value frame-var))
@@ -616,7 +622,7 @@ selecting FRAME-VAR."
616 ) 622 )
617 (other-frame 0) 623 (other-frame 0)
618 ;; If updates are off, then refresh the frame (they want it now...) 624 ;; If updates are off, then refresh the frame (they want it now...)
619 (run-hooks 'hook)) 625 (run-hooks hook))
620 626
621 627
622(defun dframe-close-frame () 628(defun dframe-close-frame ()
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 0c432593909..c15f3b5b121 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -1,4 +1,4 @@
1;;; dired-x.el --- extra Dired functionality 1;;; dired-x.el --- extra Dired functionality -*- lexical-binding:t -*-
2 2
3;; Copyright (C) 1993-1994, 1997, 2001-2013 Free Software Foundation, 3;; Copyright (C) 1993-1994, 1997, 2001-2013 Free Software Foundation,
4;; Inc. 4;; Inc.
@@ -1185,7 +1185,7 @@ results in
1185 (setq count (1+ count) 1185 (setq count (1+ count)
1186 start (1+ start))) 1186 start (1+ start)))
1187 ;; ... and prepend a "../" for each slash found: 1187 ;; ... and prepend a "../" for each slash found:
1188 (dotimes (_n count) 1188 (dotimes (_ count)
1189 (setq name1 (concat "../" name1))))) 1189 (setq name1 (concat "../" name1)))))
1190 (make-symbolic-link 1190 (make-symbolic-link
1191 (directory-file-name name1) ; must not link to foo/ 1191 (directory-file-name name1) ; must not link to foo/
@@ -1397,22 +1397,6 @@ Considers buffers closer to the car of `buffer-list' to be more recent."
1397;; Does anyone use this? - lrd 6/29/93. 1397;; Does anyone use this? - lrd 6/29/93.
1398;; Apparently people do use it. - lrd 12/22/97. 1398;; Apparently people do use it. - lrd 12/22/97.
1399 1399
1400(with-no-warnings
1401 ;; Warnings are suppressed to avoid "global/dynamic var `X' lacks a prefix".
1402 ;; This is unbearably ugly, but not more than having global variables
1403 ;; named size, time, name or s, however practical it can be while writing
1404 ;; `dired-mark-sexp' predicates.
1405 (defvar inode)
1406 (defvar s)
1407 (defvar mode)
1408 (defvar nlink)
1409 (defvar uid)
1410 (defvar gid)
1411 (defvar size)
1412 (defvar time)
1413 (defvar name)
1414 (defvar sym))
1415
1416(defun dired-mark-sexp (predicate &optional unflag-p) 1400(defun dired-mark-sexp (predicate &optional unflag-p)
1417 "Mark files for which PREDICATE returns non-nil. 1401 "Mark files for which PREDICATE returns non-nil.
1418With a prefix arg, unmark or unflag those files instead. 1402With a prefix arg, unmark or unflag those files instead.
@@ -1475,6 +1459,9 @@ to mark all zero length files."
1475 s nil)) 1459 s nil))
1476 (setq mode (buffer-substring (point) (+ mode-len (point)))) 1460 (setq mode (buffer-substring (point) (+ mode-len (point))))
1477 (forward-char mode-len) 1461 (forward-char mode-len)
1462 ;; Skip any extended attributes marker ("." or "+").
1463 (or (looking-at " ")
1464 (forward-char 1))
1478 (setq nlink (read (current-buffer))) 1465 (setq nlink (read (current-buffer)))
1479 ;; Karsten Wenger <kw@cis.uni-muenchen.de> fixed uid. 1466 ;; Karsten Wenger <kw@cis.uni-muenchen.de> fixed uid.
1480 (setq uid (buffer-substring (1+ (point)) 1467 (setq uid (buffer-substring (1+ (point))
@@ -1505,7 +1492,17 @@ to mark all zero length files."
1505 (line-end-position)) 1492 (line-end-position))
1506 "")) 1493 ""))
1507 t) 1494 t)
1508 (eval predicate))) 1495 (eval predicate
1496 `((inode . ,inode)
1497 (s . ,s)
1498 (mode . ,mode)
1499 (nlink . ,nlink)
1500 (uid . ,uid)
1501 (gid . ,gid)
1502 (size . ,size)
1503 (time . ,time)
1504 (name . ,name)
1505 (sym . ,sym)))))
1509 (format "'%s file" predicate)))) 1506 (format "'%s file" predicate))))
1510 1507
1511 1508
diff --git a/lisp/dired.el b/lisp/dired.el
index f830623a255..345e8d57113 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -4352,7 +4352,7 @@ instead.
4352 4352
4353;;;*** 4353;;;***
4354 4354
4355;;;### (autoloads nil "dired-x" "dired-x.el" "1419d865898f84c17f172320e578380c") 4355;;;### (autoloads nil "dired-x" "dired-x.el" "11fd4a8afa32507cc32d4a04d852587f")
4356;;; Generated autoloads from dired-x.el 4356;;; Generated autoloads from dired-x.el
4357 4357
4358(autoload 'dired-jump "dired-x" "\ 4358(autoload 'dired-jump "dired-x" "\
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el
index 861054e777f..7996f9a2263 100644
--- a/lisp/emacs-lisp/advice.el
+++ b/lisp/emacs-lisp/advice.el
@@ -3190,7 +3190,7 @@ See Info node `(elisp)Advising Functions' for comprehensive documentation.
3190usage: (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...) 3190usage: (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...)
3191 [DOCSTRING] [INTERACTIVE-FORM] 3191 [DOCSTRING] [INTERACTIVE-FORM]
3192 BODY...)" 3192 BODY...)"
3193 (declare (doc-string 3) 3193 (declare (doc-string 3) (indent 2)
3194 (debug (&define name ;; thing being advised. 3194 (debug (&define name ;; thing being advised.
3195 (name ;; class is [&or "before" "around" "after" 3195 (name ;; class is [&or "before" "around" "after"
3196 ;; "activation" "deactivation"] 3196 ;; "activation" "deactivation"]
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index 7214501362d..9da1a4d1f38 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -533,18 +533,6 @@
533 ((and for-effect (setq tmp (get fn 'side-effect-free)) 533 ((and for-effect (setq tmp (get fn 'side-effect-free))
534 (or byte-compile-delete-errors 534 (or byte-compile-delete-errors
535 (eq tmp 'error-free) 535 (eq tmp 'error-free)
536 ;; Detect the expansion of (pop foo).
537 ;; There is no need to compile the call to `car' there.
538 (and (eq fn 'car)
539 (eq (car-safe (cadr form)) 'prog1)
540 (let ((var (cadr (cadr form)))
541 (last (nth 2 (cadr form))))
542 (and (symbolp var)
543 (null (nthcdr 3 (cadr form)))
544 (eq (car-safe last) 'setq)
545 (eq (cadr last) var)
546 (eq (car-safe (nth 2 last)) 'cdr)
547 (eq (cadr (nth 2 last)) var))))
548 (progn 536 (progn
549 (byte-compile-warn "value returned from %s is unused" 537 (byte-compile-warn "value returned from %s is unused"
550 (prin1-to-string form)) 538 (prin1-to-string form))
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index c6612024fa6..164cdb12952 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1,7 +1,7 @@
1;;; bytecomp.el --- compilation of Lisp code into byte code -*- lexical-binding: t -*- 1;;; bytecomp.el --- compilation of Lisp code into byte code -*- lexical-binding: t -*-
2 2
3;; Copyright (C) 1985-1987, 1992, 1994, 1998, 2000-2013 Free Software 3;; Copyright (C) 1985-1987, 1992, 1994, 1998, 2000-2013
4;; Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: Jamie Zawinski <jwz@lucid.com> 6;; Author: Jamie Zawinski <jwz@lucid.com>
7;; Hallvard Furuseth <hbf@ulrik.uio.no> 7;; Hallvard Furuseth <hbf@ulrik.uio.no>
@@ -1593,14 +1593,14 @@ that already has a `.elc' file."
1593 (message "Checking %s..." directory) 1593 (message "Checking %s..." directory)
1594 (dolist (file (directory-files directory)) 1594 (dolist (file (directory-files directory))
1595 (let ((source (expand-file-name file directory))) 1595 (let ((source (expand-file-name file directory)))
1596 (if (and (not (member file '("RCS" "CVS"))) 1596 (if (file-directory-p source)
1597 (not (eq ?\. (aref file 0))) 1597 (and (not (member file '("RCS" "CVS")))
1598 (file-directory-p source) 1598 (not (eq ?\. (aref file 0)))
1599 (not (file-symlink-p source))) 1599 (not (file-symlink-p source))
1600 ;; This file is a subdirectory. Handle them differently. 1600 ;; This file is a subdirectory. Handle them differently.
1601 (when (or (null arg) (eq 0 arg) 1601 (or (null arg) (eq 0 arg)
1602 (y-or-n-p (concat "Check " source "? "))) 1602 (y-or-n-p (concat "Check " source "? ")))
1603 (setq directories (nconc directories (list source)))) 1603 (setq directories (nconc directories (list source))))
1604 ;; It is an ordinary file. Decide whether to compile it. 1604 ;; It is an ordinary file. Decide whether to compile it.
1605 (if (and (string-match emacs-lisp-file-regexp source) 1605 (if (and (string-match emacs-lisp-file-regexp source)
1606 ;; The next 2 tests avoid compiling lock files 1606 ;; The next 2 tests avoid compiling lock files
diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el
index 70fa71a0da4..c655c2fff84 100644
--- a/lisp/emacs-lisp/cconv.el
+++ b/lisp/emacs-lisp/cconv.el
@@ -55,7 +55,7 @@
55;; 55;;
56;; If a variable is mutated (updated by setq), and it is used in a closure 56;; If a variable is mutated (updated by setq), and it is used in a closure
57;; we wrap its definition with list: (list val) and we also replace 57;; we wrap its definition with list: (list val) and we also replace
58;; var => (car var) wherever this variable is used, and also 58;; var => (car-safe var) wherever this variable is used, and also
59;; (setq var value) => (setcar var value) where it is updated. 59;; (setq var value) => (setcar var value) where it is updated.
60;; 60;;
61;; If defun argument is closure mutable, we letbind it and wrap it's 61;; If defun argument is closure mutable, we letbind it and wrap it's
@@ -211,9 +211,9 @@ Returns a form where all lambdas don't have any free variables."
211 ;; If `fv' is a variable that's wrapped in a cons-cell, 211 ;; If `fv' is a variable that's wrapped in a cons-cell,
212 ;; we want to put the cons-cell itself in the closure, 212 ;; we want to put the cons-cell itself in the closure,
213 ;; rather than just a copy of its current content. 213 ;; rather than just a copy of its current content.
214 (`(car ,iexp . ,_) 214 (`(car-safe ,iexp . ,_)
215 (push iexp envector) 215 (push iexp envector)
216 (push `(,fv . (car (internal-get-closed-var ,i))) new-env)) 216 (push `(,fv . (car-safe (internal-get-closed-var ,i))) new-env))
217 (_ 217 (_
218 (push exp envector) 218 (push exp envector)
219 (push `(,fv . (internal-get-closed-var ,i)) new-env)))) 219 (push `(,fv . (internal-get-closed-var ,i)) new-env))))
@@ -224,7 +224,7 @@ Returns a form where all lambdas don't have any free variables."
224 (dolist (arg args) 224 (dolist (arg args)
225 (if (not (member (cons (list arg) parentform) cconv-captured+mutated)) 225 (if (not (member (cons (list arg) parentform) cconv-captured+mutated))
226 (if (assq arg new-env) (push `(,arg) new-env)) 226 (if (assq arg new-env) (push `(,arg) new-env))
227 (push `(,arg . (car ,arg)) new-env) 227 (push `(,arg . (car-safe ,arg)) new-env)
228 (push `(,arg (list ,arg)) letbind))) 228 (push `(,arg (list ,arg)) letbind)))
229 229
230 (setq body-new (mapcar (lambda (form) 230 (setq body-new (mapcar (lambda (form)
@@ -254,7 +254,7 @@ ENV is a lexical environment mapping variables to the expression
254used to get its value. This is used for variables that are copied into 254used to get its value. This is used for variables that are copied into
255closures, moved into cons cells, ... 255closures, moved into cons cells, ...
256ENV is a list where each entry takes the shape either: 256ENV is a list where each entry takes the shape either:
257 (VAR . (car EXP)): VAR has been moved into the car of a cons-cell, and EXP 257 (VAR . (car-safe EXP)): VAR has been moved into the car of a cons-cell, and EXP
258 is an expression that evaluates to this cons-cell. 258 is an expression that evaluates to this cons-cell.
259 (VAR . (internal-get-closed-var N)): VAR has been copied into the closure 259 (VAR . (internal-get-closed-var N)): VAR has been copied into the closure
260 environment's Nth slot. 260 environment's Nth slot.
@@ -320,9 +320,9 @@ places where they originally did not directly appear."
320 (push `(,var . (apply-partially ,var . ,fvs)) new-env) 320 (push `(,var . (apply-partially ,var . ,fvs)) new-env)
321 (dolist (fv fvs) 321 (dolist (fv fvs)
322 (cl-pushnew fv new-extend) 322 (cl-pushnew fv new-extend)
323 (if (and (eq 'car (car-safe (cdr (assq fv env)))) 323 (if (and (eq 'car-safe (car-safe (cdr (assq fv env))))
324 (not (memq fv funargs))) 324 (not (memq fv funargs)))
325 (push `(,fv . (car ,fv)) funcbody-env))) 325 (push `(,fv . (car-safe ,fv)) funcbody-env)))
326 `(function (lambda ,funcvars . 326 `(function (lambda ,funcvars .
327 ,(mapcar (lambda (form) 327 ,(mapcar (lambda (form)
328 (cconv-convert 328 (cconv-convert
@@ -332,7 +332,7 @@ places where they originally did not directly appear."
332 ;; Check if it needs to be turned into a "ref-cell". 332 ;; Check if it needs to be turned into a "ref-cell".
333 ((member (cons binder form) cconv-captured+mutated) 333 ((member (cons binder form) cconv-captured+mutated)
334 ;; Declared variable is mutated and captured. 334 ;; Declared variable is mutated and captured.
335 (push `(,var . (car ,var)) new-env) 335 (push `(,var . (car-safe ,var)) new-env)
336 `(list ,(cconv-convert value env extend))) 336 `(list ,(cconv-convert value env extend)))
337 337
338 ;; Normal default case. 338 ;; Normal default case.
@@ -448,7 +448,7 @@ places where they originally did not directly appear."
448 (value (cconv-convert (pop forms) env extend))) 448 (value (cconv-convert (pop forms) env extend)))
449 (push (pcase sym-new 449 (push (pcase sym-new
450 ((pred symbolp) `(setq ,sym-new ,value)) 450 ((pred symbolp) `(setq ,sym-new ,value))
451 (`(car ,iexp) `(setcar ,iexp ,value)) 451 (`(car-safe ,iexp) `(setcar ,iexp ,value))
452 ;; This "should never happen", but for variables which are 452 ;; This "should never happen", but for variables which are
453 ;; mutated+captured+unused, we may end up trying to `setq' 453 ;; mutated+captured+unused, we may end up trying to `setq'
454 ;; on a closed-over variable, so just drop the setq. 454 ;; on a closed-over variable, so just drop the setq.
@@ -472,7 +472,7 @@ places where they originally did not directly appear."
472 ,@(mapcar (lambda (fv) 472 ,@(mapcar (lambda (fv)
473 (let ((exp (or (cdr (assq fv env)) fv))) 473 (let ((exp (or (cdr (assq fv env)) fv)))
474 (pcase exp 474 (pcase exp
475 (`(car ,iexp . ,_) iexp) 475 (`(car-safe ,iexp . ,_) iexp)
476 (_ exp)))) 476 (_ exp))))
477 fvs) 477 fvs)
478 ,@(mapcar (lambda (arg) 478 ,@(mapcar (lambda (arg)
@@ -552,7 +552,8 @@ FORM is the parent form that binds this var."
552 (cond 552 (cond
553 ((byte-compile-not-lexical-var-p arg) 553 ((byte-compile-not-lexical-var-p arg)
554 (byte-compile-log-warning 554 (byte-compile-log-warning
555 (format "Argument %S is not a lexical variable" arg))) 555 (format "Lexical argument shadows the dynamic variable %S"
556 arg)))
556 ((eq ?& (aref (symbol-name arg) 0)) nil) ;Ignore &rest, &optional, ... 557 ((eq ?& (aref (symbol-name arg) 0)) nil) ;Ignore &rest, &optional, ...
557 (t (let ((varstruct (list arg nil nil nil nil))) 558 (t (let ((varstruct (list arg nil nil nil nil)))
558 (cl-pushnew arg byte-compile-lexical-variables) 559 (cl-pushnew arg byte-compile-lexical-variables)
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index d9d6658811f..af7c41d5c4c 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -2693,15 +2693,16 @@ macro that returns its `&whole' argument."
2693;;;###autoload 2693;;;###autoload
2694(defmacro cl-defsubst (name args &rest body) 2694(defmacro cl-defsubst (name args &rest body)
2695 "Define NAME as a function. 2695 "Define NAME as a function.
2696Like `defun', except the function is automatically declared `inline', 2696Like `defun', except the function is automatically declared `inline' and
2697the arguments are immutable.
2697ARGLIST allows full Common Lisp conventions, and BODY is implicitly 2698ARGLIST allows full Common Lisp conventions, and BODY is implicitly
2698surrounded by (cl-block NAME ...). 2699surrounded by (cl-block NAME ...).
2700The function's arguments should be treated as immutable.
2699 2701
2700\(fn NAME ARGLIST [DOCSTRING] BODY...)" 2702\(fn NAME ARGLIST [DOCSTRING] BODY...)"
2701 (declare (debug cl-defun) (indent 2)) 2703 (declare (debug cl-defun) (indent 2))
2702 (let* ((argns (cl--arglist-args args)) (p argns) 2704 (let* ((argns (cl--arglist-args args)) (p argns)
2703 (pbody (cons 'progn body)) 2705 (pbody (cons 'progn body)))
2704 (unsafe (not (cl--safe-expr-p pbody))))
2705 (while (and p (eq (cl--expr-contains args (car p)) 1)) (pop p)) 2706 (while (and p (eq (cl--expr-contains args (car p)) 1)) (pop p))
2706 `(progn 2707 `(progn
2707 ,(if p nil ; give up if defaults refer to earlier args 2708 ,(if p nil ; give up if defaults refer to earlier args
@@ -2717,10 +2718,10 @@ surrounded by (cl-block NAME ...).
2717 ;; does not pay attention to the argvs (and 2718 ;; does not pay attention to the argvs (and
2718 ;; cl-expr-access-order itself is also too naive). 2719 ;; cl-expr-access-order itself is also too naive).
2719 nil 2720 nil
2720 ,(and (memq '&key args) 'cl-whole) ,unsafe ,@argns))) 2721 ,(and (memq '&key args) 'cl-whole) nil ,@argns)))
2721 (cl-defun ,name ,args ,@body)))) 2722 (cl-defun ,name ,args ,@body))))
2722 2723
2723(defun cl--defsubst-expand (argns body simple whole unsafe &rest argvs) 2724(defun cl--defsubst-expand (argns body simple whole _unsafe &rest argvs)
2724 (if (and whole (not (cl--safe-expr-p (cons 'progn argvs)))) whole 2725 (if (and whole (not (cl--safe-expr-p (cons 'progn argvs)))) whole
2725 (if (cl--simple-exprs-p argvs) (setq simple t)) 2726 (if (cl--simple-exprs-p argvs) (setq simple t))
2726 (let* ((substs ()) 2727 (let* ((substs ())
@@ -2728,7 +2729,7 @@ surrounded by (cl-block NAME ...).
2728 (cl-mapcar (lambda (argn argv) 2729 (cl-mapcar (lambda (argn argv)
2729 (if (or simple (macroexp-const-p argv)) 2730 (if (or simple (macroexp-const-p argv))
2730 (progn (push (cons argn argv) substs) 2731 (progn (push (cons argn argv) substs)
2731 (and unsafe (list argn argv))) 2732 nil)
2732 (list argn argv))) 2733 (list argn argv)))
2733 argns argvs)))) 2734 argns argvs))))
2734 ;; FIXME: `sublis/subst' will happily substitute the symbol 2735 ;; FIXME: `sublis/subst' will happily substitute the symbol
diff --git a/lisp/emacs-lisp/crm.el b/lisp/emacs-lisp/crm.el
index b8e327625e7..750e0709591 100644
--- a/lisp/emacs-lisp/crm.el
+++ b/lisp/emacs-lisp/crm.el
@@ -157,33 +157,32 @@ Functions'."
157 predicate 157 predicate
158 flag))) 158 flag)))
159 159
160(defun crm--select-current-element () 160(defun crm--current-element ()
161 "Parse the minibuffer to find the current element. 161 "Parse the minibuffer to find the current element.
162Place an overlay on the element, with a `field' property, and return it." 162Return the element's boundaries as (START . END)."
163 (let* ((bob (minibuffer-prompt-end)) 163 (let ((bob (minibuffer-prompt-end)))
164 (start (save-excursion 164 (cons (save-excursion
165 (if (re-search-backward crm-separator bob t) 165 (if (re-search-backward crm-separator bob t)
166 (match-end 0) 166 (match-end 0)
167 bob))) 167 bob))
168 (end (save-excursion 168 (save-excursion
169 (if (re-search-forward crm-separator nil t) 169 (if (re-search-forward crm-separator nil t)
170 (match-beginning 0) 170 (match-beginning 0)
171 (point-max)))) 171 (point-max))))))
172 (ol (make-overlay start end nil nil t))) 172
173 (overlay-put ol 'field (make-symbol "crm")) 173(defmacro crm--completion-command (beg end &rest body)
174 ol)) 174 "Run BODY with BEG and END bound to the current element's boundaries."
175 175 (declare (indent 2) (debug (sexp sexp &rest body)))
176(defmacro crm--completion-command (command) 176 `(let* ((crm--boundaries (crm--current-element))
177 "Make COMMAND a completion command for `completing-read-multiple'." 177 (,beg (car crm--boundaries))
178 `(let ((ol (crm--select-current-element))) 178 (,end (cdr crm--boundaries)))
179 (unwind-protect 179 ,@body))
180 ,command
181 (delete-overlay ol))))
182 180
183(defun crm-completion-help () 181(defun crm-completion-help ()
184 "Display a list of possible completions of the current minibuffer element." 182 "Display a list of possible completions of the current minibuffer element."
185 (interactive) 183 (interactive)
186 (crm--completion-command (minibuffer-completion-help)) 184 (crm--completion-command beg end
185 (minibuffer-completion-help beg end))
187 nil) 186 nil)
188 187
189(defun crm-complete () 188(defun crm-complete ()
@@ -192,13 +191,18 @@ If no characters can be completed, display a list of possible completions.
192 191
193Return t if the current element is now a valid match; otherwise return nil." 192Return t if the current element is now a valid match; otherwise return nil."
194 (interactive) 193 (interactive)
195 (crm--completion-command (minibuffer-complete))) 194 (crm--completion-command beg end
195 (completion-in-region beg end
196 minibuffer-completion-table
197 minibuffer-completion-predicate)))
196 198
197(defun crm-complete-word () 199(defun crm-complete-word ()
198 "Complete the current element at most a single word. 200 "Complete the current element at most a single word.
199Like `minibuffer-complete-word' but for `completing-read-multiple'." 201Like `minibuffer-complete-word' but for `completing-read-multiple'."
200 (interactive) 202 (interactive)
201 (crm--completion-command (minibuffer-complete-word))) 203 (crm--completion-command beg end
204 (completion-in-region--single-word
205 beg end minibuffer-completion-table minibuffer-completion-predicate)))
202 206
203(defun crm-complete-and-exit () 207(defun crm-complete-and-exit ()
204 "If all of the minibuffer elements are valid completions then exit. 208 "If all of the minibuffer elements are valid completions then exit.
@@ -211,16 +215,14 @@ This function is modeled after `minibuffer-complete-and-exit'."
211 (goto-char (minibuffer-prompt-end)) 215 (goto-char (minibuffer-prompt-end))
212 (while 216 (while
213 (and doexit 217 (and doexit
214 (let ((ol (crm--select-current-element))) 218 (crm--completion-command beg end
215 (goto-char (overlay-end ol)) 219 (let ((end (copy-marker end t)))
216 (unwind-protect 220 (goto-char end)
217 (catch 'exit 221 (setq doexit nil)
218 (minibuffer-complete-and-exit) 222 (completion-complete-and-exit beg end
219 ;; This did not throw `exit', so there was a problem. 223 (lambda () (setq doexit t)))
220 (setq doexit nil)) 224 (goto-char end)
221 (goto-char (overlay-end ol)) 225 (not (eobp))))
222 (delete-overlay ol))
223 (not (eobp)))
224 (looking-at crm-separator)) 226 (looking-at crm-separator))
225 ;; Skip to the next element. 227 ;; Skip to the next element.
226 (goto-char (match-end 0))) 228 (goto-char (match-end 0)))
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 4efbdcb22cb..9b9fd325941 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -185,6 +185,7 @@ expression point is on."
185 (add-hook 'post-self-insert-hook prn-info nil t) 185 (add-hook 'post-self-insert-hook prn-info nil t)
186 (remove-hook 'post-self-insert-hook prn-info t)))) 186 (remove-hook 'post-self-insert-hook prn-info t))))
187 187
188;; FIXME: This changes Emacs's behavior when the file is loaded!
188(add-hook 'eval-expression-minibuffer-setup-hook 'eldoc-post-insert-mode) 189(add-hook 'eval-expression-minibuffer-setup-hook 'eldoc-post-insert-mode)
189 190
190;;;###autoload 191;;;###autoload
@@ -487,11 +488,11 @@ In the absence of INDEX, just call `eldoc-docstring-format-sym-doc'."
487(defun eldoc-beginning-of-sexp () 488(defun eldoc-beginning-of-sexp ()
488 (let ((parse-sexp-ignore-comments t) 489 (let ((parse-sexp-ignore-comments t)
489 (num-skipped-sexps 0)) 490 (num-skipped-sexps 0))
490 (condition-case err 491 (condition-case _
491 (progn 492 (progn
492 ;; First account for the case the point is directly over a 493 ;; First account for the case the point is directly over a
493 ;; beginning of a nested sexp. 494 ;; beginning of a nested sexp.
494 (condition-case err 495 (condition-case _
495 (let ((p (point))) 496 (let ((p (point)))
496 (forward-sexp -1) 497 (forward-sexp -1)
497 (forward-sexp 1) 498 (forward-sexp 1)
@@ -518,7 +519,7 @@ In the absence of INDEX, just call `eldoc-docstring-format-sym-doc'."
518 (let ((defn (and (fboundp fsym) 519 (let ((defn (and (fboundp fsym)
519 (symbol-function fsym)))) 520 (symbol-function fsym))))
520 (and (symbolp defn) 521 (and (symbolp defn)
521 (condition-case err 522 (condition-case _
522 (setq defn (indirect-function fsym)) 523 (setq defn (indirect-function fsym))
523 (error (setq defn nil)))) 524 (error (setq defn nil))))
524 defn)) 525 defn))
diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el
index 279ae582a05..8a5841a5fad 100644
--- a/lisp/emacs-lisp/gv.el
+++ b/lisp/emacs-lisp/gv.el
@@ -102,7 +102,9 @@ DO must return an Elisp expression."
102 ;; Follow aliases. 102 ;; Follow aliases.
103 (setq me (cons (symbol-function head) (cdr place)))) 103 (setq me (cons (symbol-function head) (cdr place))))
104 (if (eq me place) 104 (if (eq me place)
105 (error "%S is not a valid place expression" place) 105 (if (and (symbolp head) (get head 'setf-method))
106 (error "Incompatible place needs recompilation: %S" head)
107 (error "%S is not a valid place expression" place))
106 (gv-get me do))))))) 108 (gv-get me do)))))))
107 109
108;;;###autoload 110;;;###autoload
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index b37a811b8d5..11891679202 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -752,6 +752,57 @@ considered."
752 (mapcar #'symbol-name (lisp--local-variables)))))) 752 (mapcar #'symbol-name (lisp--local-variables))))))
753 lastvars))))) 753 lastvars)))))
754 754
755;; FIXME: Support for Company brings in features which straddle eldoc.
756;; We should consolidate this, so that major modes can provide all that
757;; data all at once:
758;; - a function to extract "the reference at point" (may be more complex
759;; than a mere string, to distinguish various namespaces).
760;; - a function to jump to such a reference.
761;; - a function to show the signature/interface of such a reference.
762;; - a function to build a help-buffer about that reference.
763;; FIXME: Those functions should also be used by the normal completion code in
764;; the *Completions* buffer.
765
766(defun lisp--company-doc-buffer (str)
767 (let ((symbol (intern-soft str)))
768 ;; FIXME: we really don't want to "display-buffer and then undo it".
769 (save-window-excursion
770 ;; Make sure we don't display it in another frame, otherwise
771 ;; save-window-excursion won't be able to undo it.
772 (let ((display-buffer-overriding-action
773 '(nil . ((inhibit-switch-frame . t)))))
774 (ignore-errors
775 (cond
776 ((fboundp symbol) (describe-function symbol))
777 ((boundp symbol) (describe-variable symbol))
778 ((featurep symbol) (describe-package symbol))
779 ((facep symbol) (describe-face symbol))
780 (t (signal 'user-error nil)))
781 (help-buffer))))))
782
783(defun lisp--company-doc-string (str)
784 (let* ((symbol (intern-soft str))
785 (doc (if (fboundp symbol)
786 (documentation symbol t)
787 (documentation-property symbol 'variable-documentation t))))
788 (and (stringp doc)
789 (string-match ".*$" doc)
790 (match-string 0 doc))))
791
792(declare-function find-library-name "find-func" (library))
793
794(defun lisp--company-location (str)
795 (let ((sym (intern-soft str)))
796 (cond
797 ((fboundp sym) (find-definition-noselect sym nil))
798 ((boundp sym) (find-definition-noselect sym 'defvar))
799 ((featurep sym)
800 (require 'find-func)
801 (cons (find-file-noselect (find-library-name
802 (symbol-name sym)))
803 0))
804 ((facep sym) (find-definition-noselect sym 'defface)))))
805
755(defun lisp-completion-at-point (&optional _predicate) 806(defun lisp-completion-at-point (&optional _predicate)
756 "Function used for `completion-at-point-functions' in `emacs-lisp-mode'." 807 "Function used for `completion-at-point-functions' in `emacs-lisp-mode'."
757 (with-syntax-table emacs-lisp-mode-syntax-table 808 (with-syntax-table emacs-lisp-mode-syntax-table
@@ -783,7 +834,10 @@ considered."
783 lisp--local-variables-completion-table 834 lisp--local-variables-completion-table
784 obarray) ;Could be anything. 835 obarray) ;Could be anything.
785 :annotation-function 836 :annotation-function
786 (lambda (str) (if (fboundp (intern-soft str)) " <f>"))) 837 (lambda (str) (if (fboundp (intern-soft str)) " <f>"))
838 :company-doc-buffer #'lisp--company-doc-buffer
839 :company-docsig #'lisp--company-doc-string
840 :company-location #'lisp--company-location)
787 ;; Looks like a funcall position. Let's double check. 841 ;; Looks like a funcall position. Let's double check.
788 (save-excursion 842 (save-excursion
789 (goto-char (1- beg)) 843 (goto-char (1- beg))
@@ -800,10 +854,12 @@ considered."
800 ;; we should use something like a symbol-property. 854 ;; we should use something like a symbol-property.
801 (`declare 855 (`declare
802 (list t (mapcar (lambda (x) (symbol-name (car x))) 856 (list t (mapcar (lambda (x) (symbol-name (car x)))
803 (delete-dups 857 (delete-dups
804 (append 858 ;; FIXME: We should include some
805 macro-declarations-alist 859 ;; docstring with each entry.
806 defun-declarations-alist))))) 860 (append
861 macro-declarations-alist
862 defun-declarations-alist)))))
807 ((and (or `condition-case `condition-case-unless-debug) 863 ((and (or `condition-case `condition-case-unless-debug)
808 (guard (save-excursion 864 (guard (save-excursion
809 (ignore-errors 865 (ignore-errors
@@ -811,7 +867,12 @@ considered."
811 (< (point) beg))))) 867 (< (point) beg)))))
812 (list t obarray 868 (list t obarray
813 :predicate (lambda (sym) (get sym 'error-conditions)))) 869 :predicate (lambda (sym) (get sym 'error-conditions))))
814 (_ (list nil obarray #'fboundp)))))))) 870 (_ (list nil obarray
871 :predicate #'fboundp
872 :company-doc-buffer #'lisp--company-doc-buffer
873 :company-docsig #'lisp--company-doc-string
874 :company-location #'lisp--company-location
875 ))))))))
815 (when end 876 (when end
816 (let ((tail (if (null (car table-etc)) 877 (let ((tail (if (null (car table-etc))
817 (cdr table-etc) 878 (cdr table-etc)
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 0085074e5be..7799ee23d62 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -457,19 +457,27 @@ Return the max version (as a string) if the package is held at a lower version."
457 457
458(defun package-activate-1 (pkg-desc) 458(defun package-activate-1 (pkg-desc)
459 (let* ((name (package-desc-name pkg-desc)) 459 (let* ((name (package-desc-name pkg-desc))
460 (pkg-dir (package-desc-dir pkg-desc))) 460 (pkg-dir (package-desc-dir pkg-desc))
461 (pkg-dir-dir (file-name-as-directory pkg-dir)))
461 (unless pkg-dir 462 (unless pkg-dir
462 (error "Internal error: unable to find directory for `%s'" 463 (error "Internal error: unable to find directory for `%s'"
463 (package-desc-full-name pkg-desc))) 464 (package-desc-full-name pkg-desc)))
465 ;; Add to load path, add autoloads, and activate the package.
466 (let ((old-lp load-path))
467 (with-demoted-errors
468 (load (expand-file-name (format "%s-autoloads" name) pkg-dir) nil t))
469 (when (and (eq old-lp load-path)
470 (not (or (member pkg-dir load-path)
471 (member pkg-dir-dir load-path))))
472 ;; Old packages don't add themselves to the `load-path', so we have to
473 ;; do it ourselves.
474 (push pkg-dir load-path)))
464 ;; Add info node. 475 ;; Add info node.
465 (when (file-exists-p (expand-file-name "dir" pkg-dir)) 476 (when (file-exists-p (expand-file-name "dir" pkg-dir))
466 ;; FIXME: not the friendliest, but simple. 477 ;; FIXME: not the friendliest, but simple.
467 (require 'info) 478 (require 'info)
468 (info-initialize) 479 (info-initialize)
469 (push pkg-dir Info-directory-list)) 480 (push pkg-dir Info-directory-list))
470 ;; Add to load path, add autoloads, and activate the package.
471 (push pkg-dir load-path)
472 (load (expand-file-name (format "%s-autoloads" name) pkg-dir) nil t)
473 (push name package-activated-list) 481 (push name package-activated-list)
474 ;; Don't return nil. 482 ;; Don't return nil.
475 t)) 483 t))
diff --git a/lisp/epa.el b/lisp/epa.el
index a99fb9230e1..1b06e6ca3bf 100644
--- a/lisp/epa.el
+++ b/lisp/epa.el
@@ -268,62 +268,40 @@ You should bind this variable with `let', but do not set it globally.")
268 (epg-sub-key-id (car (epg-key-sub-key-list 268 (epg-sub-key-id (car (epg-key-sub-key-list
269 (widget-get widget :value)))))) 269 (widget-get widget :value))))))
270 270
271(eval-and-compile 271(defalias 'epa--encode-coding-string
272 (if (fboundp 'encode-coding-string) 272 (if (fboundp 'encode-coding-string) #'encode-coding-string #'identity))
273 (defalias 'epa--encode-coding-string 'encode-coding-string)
274 (defalias 'epa--encode-coding-string 'identity)))
275 273
276(eval-and-compile 274(defalias 'epa--decode-coding-string
277 (if (fboundp 'decode-coding-string) 275 (if (fboundp 'decode-coding-string) #'decode-coding-string #'identity))
278 (defalias 'epa--decode-coding-string 'decode-coding-string)
279 (defalias 'epa--decode-coding-string 'identity)))
280 276
281(defun epa-key-list-mode () 277(define-derived-mode epa-key-list-mode special-mode "Keys"
282 "Major mode for `epa-list-keys'." 278 "Major mode for `epa-list-keys'."
283 (kill-all-local-variables)
284 (buffer-disable-undo) 279 (buffer-disable-undo)
285 (setq major-mode 'epa-key-list-mode 280 (setq truncate-lines t
286 mode-name "Keys"
287 truncate-lines t
288 buffer-read-only t) 281 buffer-read-only t)
289 (use-local-map epa-key-list-mode-map) 282 (setq-local font-lock-defaults '(epa-font-lock-keywords t))
290 (make-local-variable 'font-lock-defaults)
291 (setq font-lock-defaults '(epa-font-lock-keywords t))
292 ;; In XEmacs, auto-initialization of font-lock is not effective 283 ;; In XEmacs, auto-initialization of font-lock is not effective
293 ;; if buffer-file-name is not set. 284 ;; if buffer-file-name is not set.
294 (font-lock-set-defaults) 285 (font-lock-set-defaults)
295 (make-local-variable 'epa-exit-buffer-function) 286 (make-local-variable 'epa-exit-buffer-function)
296 (make-local-variable 'revert-buffer-function) 287 (setq-local revert-buffer-function #'epa--key-list-revert-buffer))
297 (setq revert-buffer-function 'epa--key-list-revert-buffer)
298 (run-mode-hooks 'epa-key-list-mode-hook))
299 288
300(defun epa-key-mode () 289(define-derived-mode epa-key-mode special-mode "Key"
301 "Major mode for a key description." 290 "Major mode for a key description."
302 (kill-all-local-variables)
303 (buffer-disable-undo) 291 (buffer-disable-undo)
304 (setq major-mode 'epa-key-mode 292 (setq truncate-lines t
305 mode-name "Key"
306 truncate-lines t
307 buffer-read-only t) 293 buffer-read-only t)
308 (use-local-map epa-key-mode-map) 294 (setq-local font-lock-defaults '(epa-font-lock-keywords t))
309 (make-local-variable 'font-lock-defaults)
310 (setq font-lock-defaults '(epa-font-lock-keywords t))
311 ;; In XEmacs, auto-initialization of font-lock is not effective 295 ;; In XEmacs, auto-initialization of font-lock is not effective
312 ;; if buffer-file-name is not set. 296 ;; if buffer-file-name is not set.
313 (font-lock-set-defaults) 297 (font-lock-set-defaults)
314 (make-local-variable 'epa-exit-buffer-function) 298 (make-local-variable 'epa-exit-buffer-function))
315 (run-mode-hooks 'epa-key-mode-hook))
316 299
317(defun epa-info-mode () 300(define-derived-mode epa-info-mode special-mode "Info"
318 "Major mode for `epa-info-buffer'." 301 "Major mode for `epa-info-buffer'."
319 (kill-all-local-variables)
320 (buffer-disable-undo) 302 (buffer-disable-undo)
321 (setq major-mode 'epa-info-mode 303 (setq truncate-lines t
322 mode-name "Info" 304 buffer-read-only t))
323 truncate-lines t
324 buffer-read-only t)
325 (use-local-map epa-info-mode-map)
326 (run-mode-hooks 'epa-info-mode-hook))
327 305
328(defun epa-mark-key (&optional arg) 306(defun epa-mark-key (&optional arg)
329 "Mark a key on the current line. 307 "Mark a key on the current line.
@@ -951,10 +929,10 @@ See the reason described in the `epa-verify-region' documentation."
951 (error "No cleartext tail")) 929 (error "No cleartext tail"))
952 (epa-verify-region cleartext-start cleartext-end)))))) 930 (epa-verify-region cleartext-start cleartext-end))))))
953 931
954(eval-and-compile 932(defalias 'epa--select-safe-coding-system
955 (if (fboundp 'select-safe-coding-system) 933 (if (fboundp 'select-safe-coding-system)
956 (defalias 'epa--select-safe-coding-system 'select-safe-coding-system) 934 #'select-safe-coding-system
957 (defun epa--select-safe-coding-system (_from _to) 935 (lambda (_from _to)
958 buffer-file-coding-system))) 936 buffer-file-coding-system)))
959 937
960;;;###autoload 938;;;###autoload
@@ -1026,16 +1004,16 @@ If no one is selected, default secret key is used. "
1026 'start-open t 1004 'start-open t
1027 'end-open t))))) 1005 'end-open t)))))
1028 1006
1029(eval-and-compile 1007(defalias 'epa--derived-mode-p
1030 (if (fboundp 'derived-mode-p) 1008 (if (fboundp 'derived-mode-p)
1031 (defalias 'epa--derived-mode-p 'derived-mode-p) 1009 #'derived-mode-p
1032 (defun epa--derived-mode-p (&rest modes) 1010 (lambda (&rest modes)
1033 "Non-nil if the current major mode is derived from one of MODES. 1011 "Non-nil if the current major mode is derived from one of MODES.
1034Uses the `derived-mode-parent' property of the symbol to trace backwards." 1012Uses the `derived-mode-parent' property of the symbol to trace backwards."
1035 (let ((parent major-mode)) 1013 (let ((parent major-mode))
1036 (while (and (not (memq parent modes)) 1014 (while (and (not (memq parent modes))
1037 (setq parent (get parent 'derived-mode-parent)))) 1015 (setq parent (get parent 'derived-mode-parent))))
1038 parent)))) 1016 parent))))
1039 1017
1040;;;###autoload 1018;;;###autoload
1041(defun epa-encrypt-region (start end recipients sign signers) 1019(defun epa-encrypt-region (start end recipients sign signers)
@@ -1138,6 +1116,7 @@ If no one is selected, symmetric encryption will be performed. ")
1138 (if (epg-context-result-for context 'import) 1116 (if (epg-context-result-for context 'import)
1139 (epa-display-info (epg-import-result-to-string 1117 (epa-display-info (epg-import-result-to-string
1140 (epg-context-result-for context 'import)))) 1118 (epg-context-result-for context 'import))))
1119 ;; FIXME: Why not use the (otherwise unused) epa--derived-mode-p?
1141 (if (eq major-mode 'epa-key-list-mode) 1120 (if (eq major-mode 'epa-key-list-mode)
1142 (apply #'epa--list-keys epa-list-keys-arguments)))) 1121 (apply #'epa--list-keys epa-list-keys-arguments))))
1143 1122
diff --git a/lisp/epg.el b/lisp/epg.el
index 33c0443dd91..c733a273988 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -1278,37 +1278,34 @@ This function is for internal use only."
1278 1278
1279(defun epg--process-filter (process input) 1279(defun epg--process-filter (process input)
1280 (if epg-debug 1280 (if epg-debug
1281 (save-excursion 1281 (with-current-buffer
1282 (unless epg-debug-buffer 1282 (or epg-debug-buffer
1283 (setq epg-debug-buffer (generate-new-buffer " *epg-debug*"))) 1283 (setq epg-debug-buffer (generate-new-buffer " *epg-debug*")))
1284 (set-buffer epg-debug-buffer)
1285 (goto-char (point-max)) 1284 (goto-char (point-max))
1286 (insert input))) 1285 (insert input)))
1287 (if (buffer-live-p (process-buffer process)) 1286 (if (buffer-live-p (process-buffer process))
1288 (with-current-buffer (process-buffer process) 1287 (with-current-buffer (process-buffer process)
1289 (goto-char (point-max)) 1288 (save-excursion
1290 (insert input) 1289 (goto-char (point-max))
1291 (unless epg-process-filter-running 1290 (insert input)
1292 (unwind-protect 1291 (unless epg-process-filter-running
1293 (progn 1292 (let ((epg-process-filter-running t))
1294 (setq epg-process-filter-running t) 1293 (goto-char epg-read-point)
1295 (goto-char epg-read-point) 1294 (beginning-of-line)
1296 (beginning-of-line) 1295 (while (looking-at ".*\n") ;the input line finished
1297 (while (looking-at ".*\n") ;the input line finished 1296 (if (looking-at "\\[GNUPG:] \\([A-Z_]+\\) ?\\(.*\\)")
1298 (if (looking-at "\\[GNUPG:] \\([A-Z_]+\\) ?\\(.*\\)") 1297 (let* ((status (match-string 1))
1299 (let* ((status (match-string 1)) 1298 (string (match-string 2))
1300 (string (match-string 2)) 1299 (symbol (intern-soft (concat "epg--status-"
1301 (symbol (intern-soft (concat "epg--status-" 1300 status))))
1302 status)))) 1301 (if (member status epg-pending-status-list)
1303 (if (member status epg-pending-status-list) 1302 (setq epg-pending-status-list nil))
1304 (setq epg-pending-status-list nil)) 1303 (if (and symbol
1305 (if (and symbol 1304 (fboundp symbol))
1306 (fboundp symbol)) 1305 (funcall symbol epg-context string))
1307 (funcall symbol epg-context string)) 1306 (setq epg-last-status (cons status string))))
1308 (setq epg-last-status (cons status string)))) 1307 (forward-line)
1309 (forward-line) 1308 (setq epg-read-point (point)))))))))
1310 (setq epg-read-point (point))))
1311 (setq epg-process-filter-running nil))))))
1312 1309
1313(defun epg-read-output (context) 1310(defun epg-read-output (context)
1314 "Read the output file CONTEXT and return the content as a string." 1311 "Read the output file CONTEXT and return the content as a string."
@@ -2418,9 +2415,8 @@ If you are unsure, use synchronous version of this function
2418 (list "--" (epg-data-file plain))))) 2415 (list "--" (epg-data-file plain)))))
2419 ;; `gpgsm' does not read passphrase from stdin, so waiting is not needed. 2416 ;; `gpgsm' does not read passphrase from stdin, so waiting is not needed.
2420 (unless (eq (epg-context-protocol context) 'CMS) 2417 (unless (eq (epg-context-protocol context) 'CMS)
2421 (if sign 2418 (epg-wait-for-status context
2422 (epg-wait-for-status context '("BEGIN_SIGNING")) 2419 (if sign '("BEGIN_SIGNING") '("BEGIN_ENCRYPTION"))))
2423 (epg-wait-for-status context '("BEGIN_ENCRYPTION"))))
2424 (when (epg-data-string plain) 2420 (when (epg-data-string plain)
2425 (if (eq (process-status (epg-context-process context)) 'run) 2421 (if (eq (process-status (epg-context-process context)) 'run)
2426 (process-send-string (epg-context-process context) 2422 (process-send-string (epg-context-process context)
diff --git a/lisp/files.el b/lisp/files.el
index f9ff3c936bd..2315448c549 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2447,48 +2447,43 @@ and `magic-mode-alist', which determines modes based on file contents.")
2447 (mapcar 2447 (mapcar
2448 (lambda (l) 2448 (lambda (l)
2449 (cons (purecopy (car l)) (cdr l))) 2449 (cons (purecopy (car l)) (cdr l)))
2450 '(("perl" . perl-mode) 2450 '(("\\`\\(mini\\)?perl5?\\'" . perl-mode)
2451 ("perl5" . perl-mode) 2451 ("\\`wishx?\\'" . tcl-mode)
2452 ("miniperl" . perl-mode) 2452 ("\\`tcl\\(sh\\)?\\'" . tcl-mode)
2453 ("wish" . tcl-mode) 2453 ("\\`expect\\'" . tcl-mode)
2454 ("wishx" . tcl-mode) 2454 ("\\`scm\\'" . scheme-mode)
2455 ("tcl" . tcl-mode) 2455 ("\\`[acjkwz]sh\\'" . sh-mode)
2456 ("tclsh" . tcl-mode) 2456 ("\\`bash2?\\'" . sh-mode)
2457 ("expect" . tcl-mode) 2457 ("\\`dtksh\\'" . sh-mode)
2458 ("scm" . scheme-mode) 2458 ("\\`es\\'" . sh-mode)
2459 ("ash" . sh-mode) 2459 ("\\`itcsh\\'" . sh-mode)
2460 ("bash" . sh-mode) 2460 ("\\`oash\\'" . sh-mode)
2461 ("bash2" . sh-mode) 2461 ("\\`pdksh\\'" . sh-mode)
2462 ("csh" . sh-mode) 2462 ("\\`rbash\\'" . sh-mode)
2463 ("dtksh" . sh-mode) 2463 ("\\`rc\\'" . sh-mode)
2464 ("es" . sh-mode) 2464 ("\\`rpm\\'" . sh-mode)
2465 ("itcsh" . sh-mode) 2465 ("\\`sh5?\\'" . sh-mode)
2466 ("jsh" . sh-mode) 2466 ("\\`tcsh\\'" . sh-mode)
2467 ("ksh" . sh-mode) 2467 ("\\`wksh\\'" . sh-mode)
2468 ("oash" . sh-mode) 2468 ("\\`tail\\'" . text-mode)
2469 ("pdksh" . sh-mode) 2469 ("\\`more\\'" . text-mode)
2470 ("rbash" . sh-mode) 2470 ("\\`less\\'" . text-mode)
2471 ("rc" . sh-mode) 2471 ("\\`pg\\'" . text-mode)
2472 ("rpm" . sh-mode) 2472 ("\\`make\\'" . makefile-gmake-mode) ; Debian uses this
2473 ("sh" . sh-mode) 2473 ("\\`guile\\'" . scheme-mode)
2474 ("sh5" . sh-mode) 2474 ("\\`clisp\\'" . lisp-mode)
2475 ("tcsh" . sh-mode) 2475 ("\\`emacs\\'" . emacs-lisp-mode)))
2476 ("wksh" . sh-mode)
2477 ("wsh" . sh-mode)
2478 ("zsh" . sh-mode)
2479 ("tail" . text-mode)
2480 ("more" . text-mode)
2481 ("less" . text-mode)
2482 ("pg" . text-mode)
2483 ("make" . makefile-gmake-mode) ; Debian uses this
2484 ("guile" . scheme-mode)
2485 ("clisp" . lisp-mode)
2486 ("emacs" . emacs-lisp-mode)))
2487 "Alist mapping interpreter names to major modes. 2476 "Alist mapping interpreter names to major modes.
2488This is used for files whose first lines match `auto-mode-interpreter-regexp'. 2477This is used for files whose first lines match `auto-mode-interpreter-regexp'.
2489Each element looks like (INTERPRETER . MODE). 2478Each element looks like (REGEXP . MODE).
2490If INTERPRETER matches the name of the interpreter specified in the first line 2479If REGEXP matches the name (minus any directory part) of the interpreter
2491of a script, mode MODE is enabled. 2480specified in the first line of a script, enable major mode MODE.
2481
2482Emacs versions earlier than 24.4 treat the car of each element as a
2483literal string that must match the entire name, rather than a regexp.
2484For backwards compatibility, any REGEXP that does not begin with \"\\\\\"
2485continues to be treated in this way. This behavior may be removed in
2486future and should not be relied upon.
2492 2487
2493See also `auto-mode-alist'.") 2488See also `auto-mode-alist'.")
2494 2489
@@ -2683,19 +2678,27 @@ we don't actually set it to the same mode the buffer already has."
2683 ;; If we didn't, look for an interpreter specified in the first line. 2678 ;; If we didn't, look for an interpreter specified in the first line.
2684 ;; As a special case, allow for things like "#!/bin/env perl", which 2679 ;; As a special case, allow for things like "#!/bin/env perl", which
2685 ;; finds the interpreter anywhere in $PATH. 2680 ;; finds the interpreter anywhere in $PATH.
2686 (unless done 2681 (and (not done)
2687 (setq mode (save-excursion 2682 (setq mode (save-excursion
2688 (goto-char (point-min)) 2683 (goto-char (point-min))
2689 (if (looking-at auto-mode-interpreter-regexp) 2684 (if (looking-at auto-mode-interpreter-regexp)
2690 (match-string 2) 2685 (match-string 2))))
2691 "")) 2686 ;; Map interpreter name to a mode, signaling we're done at the
2692 ;; Map interpreter name to a mode, signaling we're done at the 2687 ;; same time.
2693 ;; same time. 2688 (setq done (assoc-default
2694 done (assoc (file-name-nondirectory mode) 2689 (file-name-nondirectory mode)
2695 interpreter-mode-alist)) 2690 ;; Backwards compat: if car of i-m-alist does not start
2696 ;; If we found an interpreter mode to use, invoke it now. 2691 ;; with "\\", treat as literal string.
2697 (if done 2692 (mapcar (lambda (e)
2698 (set-auto-mode-0 (cdr done) keep-mode-if-same))) 2693 (if (string-match-p "\\`\\\\" (car e))
2694 e
2695 (cons
2696 (format "\\`%s\\'" (regexp-quote (car e)))
2697 (cdr e))))
2698 interpreter-mode-alist)
2699 #'string-match-p))
2700 ;; If we found an interpreter mode to use, invoke it now.
2701 (set-auto-mode-0 done keep-mode-if-same))
2699 ;; Next try matching the buffer beginning against magic-mode-alist. 2702 ;; Next try matching the buffer beginning against magic-mode-alist.
2700 (unless done 2703 (unless done
2701 (if (setq done (save-excursion 2704 (if (setq done (save-excursion
diff --git a/lisp/finder.el b/lisp/finder.el
index e07c6a241ab..c06c01c2c97 100644
--- a/lisp/finder.el
+++ b/lisp/finder.el
@@ -225,8 +225,8 @@ from; the default is `load-path'."
225 (lambda (a b) (string< (symbol-name (car a)) 225 (lambda (a b) (string< (symbol-name (car a))
226 (symbol-name (car b)))))) 226 (symbol-name (car b))))))
227 227
228 (save-excursion 228 (with-current-buffer
229 (find-file generated-finder-keywords-file) 229 (find-file-noselect generated-finder-keywords-file)
230 (setq buffer-undo-list t) 230 (setq buffer-undo-list t)
231 (erase-buffer) 231 (erase-buffer)
232 (insert (autoload-rubric generated-finder-keywords-file 232 (insert (autoload-rubric generated-finder-keywords-file
diff --git a/lisp/frame.el b/lisp/frame.el
index 79394bd305b..3668f24ba01 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -872,8 +872,11 @@ If there is no frame by that name, signal an error."
872 "The brightness of the background. 872 "The brightness of the background.
873Set this to the symbol `dark' if your background color is dark, 873Set this to the symbol `dark' if your background color is dark,
874`light' if your background is light, or nil (automatic by default) 874`light' if your background is light, or nil (automatic by default)
875if you want Emacs to examine the brightness for you. Don't set this 875if you want Emacs to examine the brightness for you.
876variable with `setq'; this won't have the expected effect." 876
877If you change this without using customize, you should use
878`frame-set-background-mode' to update existing frames;
879e.g. (mapc 'frame-set-background-mode (frame-list))."
877 :group 'faces 880 :group 'faces
878 :set #'(lambda (var value) 881 :set #'(lambda (var value)
879 (set-default var value) 882 (set-default var value)
diff --git a/lisp/generic-x.el b/lisp/generic-x.el
index c964b53952e..e722333d49b 100644
--- a/lisp/generic-x.el
+++ b/lisp/generic-x.el
@@ -1283,18 +1283,22 @@ like an INI file. You can add this hook to `find-file-hook'."
1283 "WIN32SMINOR") 1283 "WIN32SMINOR")
1284 "Function argument constants used in InstallShield 3 and 5.")) 1284 "Function argument constants used in InstallShield 3 and 5."))
1285 1285
1286(defvar rul-generic-mode-syntax-table nil 1286;; c++-mode-syntax-table used to be autoloaded, with an initial nil value.
1287;; This file did not load cc-mode, and therefore rul-generic-mode-syntax-table
1288;; would have different values according to whether or not cc-mode
1289;; happened to be loaded before this file was.
1290(require 'cc-mode)
1291(defvar c++-mode-syntax-table)
1292
1293(defvar rul-generic-mode-syntax-table
1294 (let ((table (make-syntax-table c++-mode-syntax-table)))
1295 (modify-syntax-entry ?\r "> b" table)
1296 (modify-syntax-entry ?\n "> b" table)
1297 (modify-syntax-entry ?/ ". 124b" table)
1298 (modify-syntax-entry ?* ". 23" table)
1299 table)
1287 "Syntax table to use in `rul-generic-mode' buffers.") 1300 "Syntax table to use in `rul-generic-mode' buffers.")
1288 1301
1289(setq rul-generic-mode-syntax-table
1290 (make-syntax-table c++-mode-syntax-table))
1291
1292(modify-syntax-entry ?\r "> b" rul-generic-mode-syntax-table)
1293(modify-syntax-entry ?\n "> b" rul-generic-mode-syntax-table)
1294
1295(modify-syntax-entry ?/ ". 124b" rul-generic-mode-syntax-table)
1296(modify-syntax-entry ?* ". 23" rul-generic-mode-syntax-table)
1297
1298;; here manually instead 1302;; here manually instead
1299(defun generic-rul-mode-setup-function () 1303(defun generic-rul-mode-setup-function ()
1300 (make-local-variable 'parse-sexp-ignore-comments) 1304 (make-local-variable 'parse-sexp-ignore-comments)
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 950b73666e2..c75588536a4 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,7 @@
12013-08-28 Katsumi Yamaoka <yamaoka@jpl.org>
2
3 * mm-decode.el (mm-temp-files-delete): Fix file deletion logic.
4
12013-08-19 Katsumi Yamaoka <yamaoka@jpl.org> 52013-08-19 Katsumi Yamaoka <yamaoka@jpl.org>
2 6
3 * mm-util.el (mm-coding-system-priorities): Exclude iso-2022-jp-2 and 7 * mm-util.el (mm-coding-system-priorities): Exclude iso-2022-jp-2 and
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index dbbf0befe60..28d930b55f7 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -607,19 +607,19 @@ files left at the next time."
607 (split-string (buffer-string) "\n" t)))) 607 (split-string (buffer-string) "\n" t))))
608 fails) 608 fails)
609 (dolist (temp (append cache mm-temp-files-to-be-deleted)) 609 (dolist (temp (append cache mm-temp-files-to-be-deleted))
610 (unless (and (file-exists-p temp) 610 (when (and (file-exists-p temp)
611 (if (file-directory-p temp) 611 (if (file-directory-p temp)
612 ;; A parent directory left at the previous time. 612 ;; A parent directory left at the previous time.
613 (progn
614 (ignore-errors (delete-directory temp))
615 (file-exists-p temp))
616 ;; Delete a temporary file and its parent directory.
617 (ignore-errors (delete-file temp))
618 (or (file-exists-p temp)
613 (progn 619 (progn
620 (setq temp (file-name-directory temp))
614 (ignore-errors (delete-directory temp)) 621 (ignore-errors (delete-directory temp))
615 (not (file-exists-p temp))) 622 (file-exists-p temp)))))
616 ;; Delete a temporary file and its parent directory.
617 (ignore-errors (delete-file temp))
618 (and (not (file-exists-p temp))
619 (progn
620 (setq temp (file-name-directory temp))
621 (ignore-errors (delete-directory temp))
622 (not (file-exists-p temp))))))
623 (push temp fails))) 623 (push temp fails)))
624 (if fails 624 (if fails
625 ;; Schedule the deletion of the files left at the next time. 625 ;; Schedule the deletion of the files left at the next time.
diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index 104e3363831..9aec829cd97 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -158,11 +158,13 @@ minibuffer completion.")
158(add-hook 'icomplete-post-command-hook 'icomplete-exhibit) 158(add-hook 'icomplete-post-command-hook 'icomplete-exhibit)
159 159
160;;;_ = icomplete-with-completion-tables 160;;;_ = icomplete-with-completion-tables
161(defvar icomplete-with-completion-tables '(internal-complete-buffer) 161(defcustom icomplete-with-completion-tables t
162 "Specialized completion tables with which icomplete should operate. 162 "Specialized completion tables with which icomplete should operate.
163 163
164Icomplete does not operate with any specialized completion tables 164Icomplete does not operate with any specialized completion tables
165except those on this list.") 165except those on this list."
166 :type '(choice (const :tag "All" t)
167 (repeat function)))
166 168
167(defvar icomplete-minibuffer-map 169(defvar icomplete-minibuffer-map
168 (let ((map (make-sparse-keymap))) 170 (let ((map (make-sparse-keymap)))
@@ -177,24 +179,28 @@ except those on this list.")
177Second entry becomes the first and can be selected with 179Second entry becomes the first and can be selected with
178`minibuffer-force-complete-and-exit'." 180`minibuffer-force-complete-and-exit'."
179 (interactive) 181 (interactive)
180 (let* ((comps (completion-all-sorted-completions)) 182 (let* ((beg (minibuffer-prompt-end))
183 (end (point-max))
184 (comps (completion-all-sorted-completions beg end))
181 (last (last comps))) 185 (last (last comps)))
182 (when comps 186 (when comps
183 (setcdr last (cons (car comps) (cdr last))) 187 (setcdr last (cons (car comps) (cdr last)))
184 (completion--cache-all-sorted-completions (cdr comps))))) 188 (completion--cache-all-sorted-completions beg end (cdr comps)))))
185 189
186(defun icomplete-backward-completions () 190(defun icomplete-backward-completions ()
187 "Step backward completions by one entry. 191 "Step backward completions by one entry.
188Last entry becomes the first and can be selected with 192Last entry becomes the first and can be selected with
189`minibuffer-force-complete-and-exit'." 193`minibuffer-force-complete-and-exit'."
190 (interactive) 194 (interactive)
191 (let* ((comps (completion-all-sorted-completions)) 195 (let* ((beg (minibuffer-prompt-end))
196 (end (point-max))
197 (comps (completion-all-sorted-completions beg end))
192 (last-but-one (last comps 2)) 198 (last-but-one (last comps 2))
193 (last (cdr last-but-one))) 199 (last (cdr last-but-one)))
194 (when (consp last) ; At least two elements in comps 200 (when (consp last) ; At least two elements in comps
195 (setcdr last-but-one (cdr last)) 201 (setcdr last-but-one (cdr last))
196 (push (car last) comps) 202 (push (car last) comps)
197 (completion--cache-all-sorted-completions comps)))) 203 (completion--cache-all-sorted-completions beg end comps))))
198 204
199;;;_ > icomplete-mode (&optional prefix) 205;;;_ > icomplete-mode (&optional prefix)
200;;;###autoload 206;;;###autoload
@@ -263,7 +269,8 @@ and `minibuffer-setup-hook'."
263 "Insert icomplete completions display. 269 "Insert icomplete completions display.
264Should be run via minibuffer `post-command-hook'. See `icomplete-mode' 270Should be run via minibuffer `post-command-hook'. See `icomplete-mode'
265and `minibuffer-setup-hook'." 271and `minibuffer-setup-hook'."
266 (when (and icomplete-mode (icomplete-simple-completing-p)) 272 (when (and icomplete-mode
273 (icomplete-simple-completing-p)) ;Shouldn't be necessary.
267 (save-excursion 274 (save-excursion
268 (goto-char (point-max)) 275 (goto-char (point-max))
269 ; Insert the match-status information: 276 ; Insert the match-status information:
@@ -319,7 +326,8 @@ matches exist. \(Keybindings for uniquely matched commands
319are exhibited within the square braces.)" 326are exhibited within the square braces.)"
320 327
321 (let* ((md (completion--field-metadata (field-beginning))) 328 (let* ((md (completion--field-metadata (field-beginning)))
322 (comps (completion-all-sorted-completions)) 329 (comps (completion-all-sorted-completions
330 (minibuffer-prompt-end) (point-max)))
323 (last (if (consp comps) (last comps))) 331 (last (if (consp comps) (last comps)))
324 (base-size (cdr last)) 332 (base-size (cdr last))
325 (open-bracket (if require-match "(" "[")) 333 (open-bracket (if require-match "(" "["))
diff --git a/lisp/info.el b/lisp/info.el
index 182ad8563aa..65cd7eddcfd 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -1595,17 +1595,20 @@ escaped (\\\",\\\\)."
1595 "")) 1595 ""))
1596 (image (if (file-exists-p image-file) 1596 (image (if (file-exists-p image-file)
1597 (create-image image-file) 1597 (create-image image-file)
1598 "[broken image]"))) 1598 (or (cdr (assoc-string "text" parameter-alist))
1599 (and src (concat "[broken image:" src "]"))
1600 "[broken image]"))))
1599 (if (not (get-text-property start 'display)) 1601 (if (not (get-text-property start 'display))
1600 (add-text-properties 1602 (add-text-properties
1601 start (point) `(display ,image rear-nonsticky (display))))) 1603 start (point)
1604 `(display ,image rear-nonsticky (display)
1605 help-echo ,(cdr (assoc-string "alt" parameter-alist))))))
1602 ;; text-only display, show alternative text if provided, or 1606 ;; text-only display, show alternative text if provided, or
1603 ;; otherwise a clue that there's meant to be a picture 1607 ;; otherwise a clue that there's meant to be a picture
1604 (delete-region start (point)) 1608 (delete-region start (point))
1605 (insert (or (cdr (assoc-string "text" parameter-alist)) 1609 (insert (or (cdr (assoc-string "text" parameter-alist))
1606 (cdr (assoc-string "alt" parameter-alist)) 1610 (cdr (assoc-string "alt" parameter-alist))
1607 (and src 1611 (and src (concat "[image:" src "]"))
1608 (concat "[image:" src "]"))
1609 "[image]")))))) 1612 "[image]"))))))
1610 (set-buffer-modified-p nil))) 1613 (set-buffer-modified-p nil)))
1611 1614
diff --git a/lisp/international/characters.el b/lisp/international/characters.el
index ce6256c1e47..ab83ff0034a 100644
--- a/lisp/international/characters.el
+++ b/lisp/international/characters.el
@@ -792,7 +792,7 @@ with L, LRE, or LRO Unicode bidi character type.")
792 ;; Combining diacritics 792 ;; Combining diacritics
793 (modify-category-entry '(#x300 . #x362) ?^) 793 (modify-category-entry '(#x300 . #x362) ?^)
794 ;; Combining marks 794 ;; Combining marks
795 (modify-category-entry '(#x20d0 . #x20e3) ?^) 795 (modify-category-entry '(#x20d0 . #x20ff) ?^)
796 796
797 ;; Fixme: syntax for symbols &c 797 ;; Fixme: syntax for symbols &c
798 ) 798 )
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 34b1576d23e..588460b657b 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -30,6 +30,8 @@
30 30
31;;; Code: 31;;; Code:
32 32
33(eval-when-compile (require 'cl-lib))
34
33(defvar dos-codepage) 35(defvar dos-codepage)
34(autoload 'widget-value "wid-edit") 36(autoload 'widget-value "wid-edit")
35 37
@@ -548,7 +550,7 @@ Emacs, but is unlikely to be what you really want now."
548 (coding-system-charset-list cs))) 550 (coding-system-charset-list cs)))
549 (charsets charsets)) 551 (charsets charsets))
550 (if (coding-system-get cs :ascii-compatible-p) 552 (if (coding-system-get cs :ascii-compatible-p)
551 (add-to-list 'cs-charsets 'ascii)) 553 (cl-pushnew 'ascii cs-charsets))
552 (if (catch 'ok 554 (if (catch 'ok
553 (when cs-charsets 555 (when cs-charsets
554 (while charsets 556 (while charsets
@@ -636,6 +638,36 @@ The meaning is the same as the argument ACCEPT-DEFAULT-P of the
636function `select-safe-coding-system' (which see). This variable 638function `select-safe-coding-system' (which see). This variable
637overrides that argument.") 639overrides that argument.")
638 640
641(defun sanitize-coding-system-list (codings)
642 "Return a list of coding systems presumably more user-friendly than CODINGS."
643 ;; Change each safe coding system to the corresponding
644 ;; mime-charset name if it is also a coding system. Such a name
645 ;; is more friendly to users.
646 (setq codings
647 (mapcar (lambda (cs)
648 (let ((mime-charset (coding-system-get cs 'mime-charset)))
649 (if (and mime-charset (coding-system-p mime-charset)
650 (coding-system-equal cs mime-charset))
651 mime-charset cs)))
652 codings))
653
654 ;; Don't offer variations with locking shift, which you
655 ;; basically never want.
656 (let (l)
657 (dolist (elt codings (setq codings (nreverse l)))
658 (unless (or (eq 'coding-category-iso-7-else
659 (coding-system-category elt))
660 (eq 'coding-category-iso-8-else
661 (coding-system-category elt)))
662 (push elt l))))
663
664 ;; Remove raw-text, emacs-mule and no-conversion unless nothing
665 ;; else is available.
666 (or (delq 'raw-text
667 (delq 'emacs-mule
668 (delq 'no-conversion (copy-sequence codings))))
669 codings))
670
639(defun select-safe-coding-system-interactively (from to codings unsafe 671(defun select-safe-coding-system-interactively (from to codings unsafe
640 &optional rejected default) 672 &optional rejected default)
641 "Select interactively a coding system for the region FROM ... TO. 673 "Select interactively a coding system for the region FROM ... TO.
@@ -667,35 +699,7 @@ DEFAULT is the coding system to use by default in the query."
667 from to coding 11))))) 699 from to coding 11)))))
668 unsafe))) 700 unsafe)))
669 701
670 ;; Change each safe coding system to the corresponding 702 (setq codings (sanitize-coding-system-list codings))
671 ;; mime-charset name if it is also a coding system. Such a name
672 ;; is more friendly to users.
673 (let ((l codings)
674 mime-charset)
675 (while l
676 (setq mime-charset (coding-system-get (car l) :mime-charset))
677 (if (and mime-charset (coding-system-p mime-charset)
678 (coding-system-equal (car l) mime-charset))
679 (setcar l mime-charset))
680 (setq l (cdr l))))
681
682 ;; Don't offer variations with locking shift, which you
683 ;; basically never want.
684 (let (l)
685 (dolist (elt codings (setq codings (nreverse l)))
686 (unless (or (eq 'coding-category-iso-7-else
687 (coding-system-category elt))
688 (eq 'coding-category-iso-8-else
689 (coding-system-category elt)))
690 (push elt l))))
691
692 ;; Remove raw-text, emacs-mule and no-conversion unless nothing
693 ;; else is available.
694 (setq codings
695 (or (delq 'raw-text
696 (delq 'emacs-mule
697 (delq 'no-conversion codings)))
698 '(raw-text emacs-mule no-conversion)))
699 703
700 (let ((window-configuration (current-window-configuration)) 704 (let ((window-configuration (current-window-configuration))
701 (bufname (buffer-name)) 705 (bufname (buffer-name))
@@ -1421,7 +1425,9 @@ The return value is a string."
1421 ;; buffer local. 1425 ;; buffer local.
1422 (input-method (completing-read prompt input-method-alist 1426 (input-method (completing-read prompt input-method-alist
1423 nil t nil 'input-method-history 1427 nil t nil 'input-method-history
1424 default))) 1428 (if (and default (symbolp default))
1429 (symbol-name default)
1430 default))))
1425 (if (and input-method (symbolp input-method)) 1431 (if (and input-method (symbolp input-method))
1426 (setq input-method (symbol-name input-method))) 1432 (setq input-method (symbol-name input-method)))
1427 (if (> (length input-method) 0) 1433 (if (> (length input-method) 0)
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 32de931954f..131ab5893d4 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2249,7 +2249,9 @@ the bottom."
2249Return the key sequence as a string/vector." 2249Return the key sequence as a string/vector."
2250 (isearch-unread-key-sequence keylist) 2250 (isearch-unread-key-sequence keylist)
2251 (let (overriding-terminal-local-map) 2251 (let (overriding-terminal-local-map)
2252 (read-key-sequence nil))) ; This will go through function-key-map, if nec. 2252 ;; This will go through function-key-map, if nec.
2253 ;; The arg DONT-DOWNCASE-LAST prevents premature shift-translation.
2254 (read-key-sequence nil nil t)))
2253 2255
2254(defun isearch-lookup-scroll-key (key-seq) 2256(defun isearch-lookup-scroll-key (key-seq)
2255 "If KEY-SEQ is bound to a scrolling command, return it as a symbol. 2257 "If KEY-SEQ is bound to a scrolling command, return it as a symbol.
@@ -2307,6 +2309,16 @@ Isearch mode."
2307 (lookup-key local-function-key-map key))) 2309 (lookup-key local-function-key-map key)))
2308 (while keylist 2310 (while keylist
2309 (setq key (car keylist)) 2311 (setq key (car keylist))
2312 ;; Handle an undefined shifted printing character
2313 ;; by downshifting it if that makes it printing.
2314 ;; (As read-key-sequence would normally do,
2315 ;; if we didn't have a default definition.)
2316 (if (and (integerp key)
2317 (memq 'shift (event-modifiers key))
2318 (>= key (+ ?\s (- ?\S-a ?a)))
2319 (/= key (+ 127 (- ?\S-a ?a)))
2320 (< key (+ 256 (- ?\S-a ?a))))
2321 (setq key (- key (- ?\S-a ?a))))
2310 ;; If KEY is a printing char, we handle it here 2322 ;; If KEY is a printing char, we handle it here
2311 ;; directly to avoid the input method and keyboard 2323 ;; directly to avoid the input method and keyboard
2312 ;; coding system translating it. 2324 ;; coding system translating it.
@@ -2784,10 +2796,18 @@ update the match data, and return point."
2784 2796
2785 (invalid-regexp 2797 (invalid-regexp
2786 (setq isearch-error (car (cdr lossage))) 2798 (setq isearch-error (car (cdr lossage)))
2787 (if (string-match 2799 (cond
2788 "\\`Premature \\|\\`Unmatched \\|\\`Invalid " 2800 ((string-match
2789 isearch-error) 2801 "\\`Premature \\|\\`Unmatched \\|\\`Invalid "
2790 (setq isearch-error "incomplete input"))) 2802 isearch-error)
2803 (setq isearch-error "incomplete input"))
2804 ((and (not isearch-regexp)
2805 (string-match "\\`Regular expression too big" isearch-error))
2806 (cond
2807 (isearch-word
2808 (setq isearch-error "Too many words"))
2809 ((and isearch-lax-whitespace search-whitespace-regexp)
2810 (setq isearch-error "Too many spaces for whitespace matching"))))))
2791 2811
2792 (search-failed 2812 (search-failed
2793 (setq isearch-success nil) 2813 (setq isearch-success nil)
diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el
index 2c99f2bde2e..26268f5924c 100644
--- a/lisp/ldefs-boot.el
+++ b/lisp/ldefs-boot.el
@@ -65,8 +65,8 @@ should return a grid vector array that is the new solution.
65 65
66;;;*** 66;;;***
67 67
68;;;### (autoloads nil "ada-mode" "progmodes/ada-mode.el" (20874 62962 68;;;### (autoloads nil "ada-mode" "progmodes/ada-mode.el" (20998 4934
69;;;;;; 290468 0)) 69;;;;;; 952905 0))
70;;; Generated autoloads from progmodes/ada-mode.el 70;;; Generated autoloads from progmodes/ada-mode.el
71 71
72(autoload 'ada-add-extensions "ada-mode" "\ 72(autoload 'ada-add-extensions "ada-mode" "\
@@ -96,8 +96,8 @@ Insert a descriptive header at the top of the file.
96 96
97;;;*** 97;;;***
98 98
99;;;### (autoloads nil "ada-xref" "progmodes/ada-xref.el" (20709 26818 99;;;### (autoloads nil "ada-xref" "progmodes/ada-xref.el" (21024 28968
100;;;;;; 907104 0)) 100;;;;;; 738399 0))
101;;; Generated autoloads from progmodes/ada-xref.el 101;;; Generated autoloads from progmodes/ada-xref.el
102 102
103(autoload 'ada-find-file "ada-xref" "\ 103(autoload 'ada-find-file "ada-xref" "\
@@ -108,7 +108,7 @@ Completion is available.
108 108
109;;;*** 109;;;***
110 110
111;;;### (autoloads nil "add-log" "vc/add-log.el" (20709 26818 907104 111;;;### (autoloads nil "add-log" "vc/add-log.el" (20992 52525 458637
112;;;;;; 0)) 112;;;;;; 0))
113;;; Generated autoloads from vc/add-log.el 113;;; Generated autoloads from vc/add-log.el
114 114
@@ -238,8 +238,8 @@ old-style time formats for entries are supported.
238 238
239;;;*** 239;;;***
240 240
241;;;### (autoloads nil "advice" "emacs-lisp/advice.el" (20725 15032 241;;;### (autoloads nil "advice" "emacs-lisp/advice.el" (20991 31656
242;;;;;; 264919 0)) 242;;;;;; 363459 0))
243;;; Generated autoloads from emacs-lisp/advice.el 243;;; Generated autoloads from emacs-lisp/advice.el
244 244
245(defvar ad-redefinition-action 'warn "\ 245(defvar ad-redefinition-action 'warn "\
@@ -375,7 +375,7 @@ usage: (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...)
375 375
376;;;*** 376;;;***
377 377
378;;;### (autoloads nil "align" "align.el" (20709 26818 907104 0)) 378;;;### (autoloads nil "align" "align.el" (21012 37798 962028 0))
379;;; Generated autoloads from align.el 379;;; Generated autoloads from align.el
380 380
381(autoload 'align "align" "\ 381(autoload 'align "align" "\
@@ -399,15 +399,8 @@ on the format of these lists.
399 399
400(autoload 'align-regexp "align" "\ 400(autoload 'align-regexp "align" "\
401Align the current region using an ad-hoc rule read from the minibuffer. 401Align the current region using an ad-hoc rule read from the minibuffer.
402BEG and END mark the limits of the region. This function will prompt 402BEG and END mark the limits of the region. Interactively, this function
403for the REGEXP to align with. If no prefix arg was specified, you 403prompts for the regular expression REGEXP to align with.
404only need to supply the characters to be lined up and any preceding
405whitespace is replaced. If a prefix arg was specified, the full
406regexp with parenthesized whitespace should be supplied; it will also
407prompt for which parenthesis GROUP within REGEXP to modify, the amount
408of SPACING to use, and whether or not to REPEAT the rule throughout
409the line. See `align-rules-list' for more information about these
410options.
411 404
412For example, let's say you had a list of phone numbers, and wanted to 405For example, let's say you had a list of phone numbers, and wanted to
413align them so that the opening parentheses would line up: 406align them so that the opening parentheses would line up:
@@ -418,8 +411,29 @@ align them so that the opening parentheses would line up:
418 Joe (123) 456-7890 411 Joe (123) 456-7890
419 412
420There is no predefined rule to handle this, but you could easily do it 413There is no predefined rule to handle this, but you could easily do it
421using a REGEXP like \"(\". All you would have to do is to mark the 414using a REGEXP like \"(\". Interactively, all you would have to do is
422region, call `align-regexp' and type in that regular expression. 415to mark the region, call `align-regexp' and enter that regular expression.
416
417REGEXP must contain at least one parenthesized subexpression, typically
418whitespace of the form \"\\\\(\\\\s-*\\\\)\". In normal interactive use,
419this is automatically added to the start of your regular expression after
420you enter it. You only need to supply the characters to be lined up, and
421any preceding whitespace is replaced.
422
423If you specify a prefix argument (or use this function non-interactively),
424you must enter the full regular expression, including the subexpression.
425The function also then prompts for which subexpression parenthesis GROUP
426\(default 1) within REGEXP to modify, the amount of SPACING (default
427`align-default-spacing') to use, and whether or not to REPEAT the rule
428throughout the line.
429
430See `align-rules-list' for more information about these options.
431
432The non-interactive form of the previous example would look something like:
433 (align-regexp (point-min) (point-max) \"\\\\(\\\\s-*\\\\)(\")
434
435This function is a nothing more than a small wrapper that helps you
436construct a rule to pass to `align-region', which does the real work.
423 437
424\(fn BEG END REGEXP &optional GROUP SPACING REPEAT)" t nil) 438\(fn BEG END REGEXP &optional GROUP SPACING REPEAT)" t nil)
425 439
@@ -464,9 +478,9 @@ A replacement function for `newline-and-indent', aligning as it goes.
464 478
465;;;*** 479;;;***
466 480
467;;;### (autoloads nil "allout" "allout.el" (20932 10282 564846 0)) 481;;;### (autoloads nil "allout" "allout.el" (20996 49577 892030 0))
468;;; Generated autoloads from allout.el 482;;; Generated autoloads from allout.el
469(push (purecopy (quote (allout 2 3))) package--builtin-versions) 483(push (purecopy '(allout 2 3)) package--builtin-versions)
470(autoload 'allout-auto-activation-helper "allout" "\ 484(autoload 'allout-auto-activation-helper "allout" "\
471Institute `allout-auto-activation'. 485Institute `allout-auto-activation'.
472 486
@@ -823,10 +837,10 @@ for details on preparing Emacs for automatic allout activation.
823 837
824;;;*** 838;;;***
825 839
826;;;### (autoloads nil "allout-widgets" "allout-widgets.el" (20932 840;;;### (autoloads nil "allout-widgets" "allout-widgets.el" (20996
827;;;;;; 61699 522706 0)) 841;;;;;; 49577 892030 0))
828;;; Generated autoloads from allout-widgets.el 842;;; Generated autoloads from allout-widgets.el
829(push (purecopy (quote (allout-widgets 1 0))) package--builtin-versions) 843(push (purecopy '(allout-widgets 1 0)) package--builtin-versions)
830(let ((loads (get 'allout-widgets 'custom-loads))) (if (member '"allout-widgets" loads) nil (put 'allout-widgets 'custom-loads (cons '"allout-widgets" loads)))) 844(let ((loads (get 'allout-widgets 'custom-loads))) (if (member '"allout-widgets" loads) nil (put 'allout-widgets 'custom-loads (cons '"allout-widgets" loads))))
831 845
832(autoload 'allout-widgets-setup "allout-widgets" "\ 846(autoload 'allout-widgets-setup "allout-widgets" "\
@@ -883,7 +897,7 @@ outline hot-spot navigation (see `allout-mode').
883 897
884;;;*** 898;;;***
885 899
886;;;### (autoloads nil "ange-ftp" "net/ange-ftp.el" (20843 54187 671468 900;;;### (autoloads nil "ange-ftp" "net/ange-ftp.el" (21005 64551 555603
887;;;;;; 0)) 901;;;;;; 0))
888;;; Generated autoloads from net/ange-ftp.el 902;;; Generated autoloads from net/ange-ftp.el
889 903
@@ -938,10 +952,10 @@ the buffer *Birthday-Present-for-Name*.
938 952
939;;;*** 953;;;***
940 954
941;;;### (autoloads nil "ansi-color" "ansi-color.el" (20930 54950 26050 955;;;### (autoloads nil "ansi-color" "ansi-color.el" (20975 43430 521692
942;;;;;; 0)) 956;;;;;; 0))
943;;; Generated autoloads from ansi-color.el 957;;; Generated autoloads from ansi-color.el
944(push (purecopy (quote (ansi-color 3 4 2))) package--builtin-versions) 958(push (purecopy '(ansi-color 3 4 2)) package--builtin-versions)
945(autoload 'ansi-color-for-comint-mode-on "ansi-color" "\ 959(autoload 'ansi-color-for-comint-mode-on "ansi-color" "\
946Set `ansi-color-for-comint-mode' to t. 960Set `ansi-color-for-comint-mode' to t.
947 961
@@ -964,10 +978,10 @@ This is a good function to put in `comint-output-filter-functions'.
964 978
965;;;*** 979;;;***
966 980
967;;;### (autoloads nil "antlr-mode" "progmodes/antlr-mode.el" (20709 981;;;### (autoloads nil "antlr-mode" "progmodes/antlr-mode.el" (21022
968;;;;;; 26818 907104 0)) 982;;;;;; 34805 522289 827000))
969;;; Generated autoloads from progmodes/antlr-mode.el 983;;; Generated autoloads from progmodes/antlr-mode.el
970(push (purecopy (quote (antlr-mode 2 2 3))) package--builtin-versions) 984(push (purecopy '(antlr-mode 2 2 3)) package--builtin-versions)
971(autoload 'antlr-show-makefile-rules "antlr-mode" "\ 985(autoload 'antlr-show-makefile-rules "antlr-mode" "\
972Show Makefile rules for all grammar files in the current directory. 986Show Makefile rules for all grammar files in the current directory.
973If the `major-mode' of the current buffer has the value `makefile-mode', 987If the `major-mode' of the current buffer has the value `makefile-mode',
@@ -1000,7 +1014,7 @@ Used in `antlr-mode'. Also a useful function in `java-mode-hook'.
1000 1014
1001;;;*** 1015;;;***
1002 1016
1003;;;### (autoloads nil "appt" "calendar/appt.el" (20709 26818 907104 1017;;;### (autoloads nil "appt" "calendar/appt.el" (20992 52525 458637
1004;;;;;; 0)) 1018;;;;;; 0))
1005;;; Generated autoloads from calendar/appt.el 1019;;; Generated autoloads from calendar/appt.el
1006 1020
@@ -1022,7 +1036,8 @@ ARG is positive, otherwise off.
1022 1036
1023;;;*** 1037;;;***
1024 1038
1025;;;### (autoloads nil "apropos" "apropos.el" (20716 56 356960 0)) 1039;;;### (autoloads nil "apropos" "apropos.el" (20991 31656 363459
1040;;;;;; 0))
1026;;; Generated autoloads from apropos.el 1041;;; Generated autoloads from apropos.el
1027 1042
1028(autoload 'apropos-read-pattern "apropos" "\ 1043(autoload 'apropos-read-pattern "apropos" "\
@@ -1232,7 +1247,7 @@ Entering array mode calls the function `array-mode-hook'.
1232;;;### (autoloads nil "artist" "textmodes/artist.el" (20891 18859 1247;;;### (autoloads nil "artist" "textmodes/artist.el" (20891 18859
1233;;;;;; 893295 0)) 1248;;;;;; 893295 0))
1234;;; Generated autoloads from textmodes/artist.el 1249;;; Generated autoloads from textmodes/artist.el
1235(push (purecopy (quote (artist 1 2 6))) package--builtin-versions) 1250(push (purecopy '(artist 1 2 6)) package--builtin-versions)
1236(autoload 'artist-mode "artist" "\ 1251(autoload 'artist-mode "artist" "\
1237Toggle Artist mode. 1252Toggle Artist mode.
1238With argument ARG, turn Artist mode on if ARG is positive. 1253With argument ARG, turn Artist mode on if ARG is positive.
@@ -1463,8 +1478,8 @@ Special commands:
1463 1478
1464;;;*** 1479;;;***
1465 1480
1466;;;### (autoloads nil "auth-source" "gnus/auth-source.el" (20929 1481;;;### (autoloads nil "auth-source" "gnus/auth-source.el" (20953
1467;;;;;; 34089 117790 0)) 1482;;;;;; 16424 151515 0))
1468;;; Generated autoloads from gnus/auth-source.el 1483;;; Generated autoloads from gnus/auth-source.el
1469 1484
1470(defvar auth-source-cache-expiry 7200 "\ 1485(defvar auth-source-cache-expiry 7200 "\
@@ -1548,7 +1563,7 @@ Major mode for editing Autoconf configure.ac files.
1548 1563
1549;;;*** 1564;;;***
1550 1565
1551;;;### (autoloads nil "autoinsert" "autoinsert.el" (20709 26818 907104 1566;;;### (autoloads nil "autoinsert" "autoinsert.el" (20950 40231 187426
1552;;;;;; 0)) 1567;;;;;; 0))
1553;;; Generated autoloads from autoinsert.el 1568;;; Generated autoloads from autoinsert.el
1554 1569
@@ -1587,8 +1602,8 @@ insert a template for the file depending on the mode of the buffer.
1587 1602
1588;;;*** 1603;;;***
1589 1604
1590;;;### (autoloads nil "autoload" "emacs-lisp/autoload.el" (20925 1605;;;### (autoloads nil "autoload" "emacs-lisp/autoload.el" (20974
1591;;;;;; 37032 237257 0)) 1606;;;;;; 22577 548213 0))
1592;;; Generated autoloads from emacs-lisp/autoload.el 1607;;; Generated autoloads from emacs-lisp/autoload.el
1593 1608
1594(put 'generated-autoload-file 'safe-local-variable 'stringp) 1609(put 'generated-autoload-file 'safe-local-variable 'stringp)
@@ -1637,7 +1652,7 @@ should be non-nil).
1637 1652
1638;;;*** 1653;;;***
1639 1654
1640;;;### (autoloads nil "autorevert" "autorevert.el" (20912 25000 802412 1655;;;### (autoloads nil "autorevert" "autorevert.el" (20987 34598 970563
1641;;;;;; 0)) 1656;;;;;; 0))
1642;;; Generated autoloads from autorevert.el 1657;;; Generated autoloads from autorevert.el
1643 1658
@@ -1726,7 +1741,7 @@ specifies in the mode line.
1726 1741
1727;;;*** 1742;;;***
1728 1743
1729;;;### (autoloads nil "avoid" "avoid.el" (20709 26818 907104 0)) 1744;;;### (autoloads nil "avoid" "avoid.el" (21024 28968 738399 0))
1730;;; Generated autoloads from avoid.el 1745;;; Generated autoloads from avoid.el
1731 1746
1732(defvar mouse-avoidance-mode nil "\ 1747(defvar mouse-avoidance-mode nil "\
@@ -1766,6 +1781,25 @@ definition of \"random distance\".)
1766 1781
1767;;;*** 1782;;;***
1768 1783
1784;;;### (autoloads nil "bat-mode" "progmodes/bat-mode.el" (21024 28968
1785;;;;;; 738399 0))
1786;;; Generated autoloads from progmodes/bat-mode.el
1787
1788(add-to-list 'auto-mode-alist '("\\.\\(bat\\|cmd\\)\\'" . bat-mode))
1789
1790(autoload 'bat-mode "bat-mode" "\
1791Major mode for editing DOS/Windows batch files.
1792
1793Start a new script from `bat-template'. Read help pages for DOS commands
1794with `bat-cmd-help'. Navigate between sections using `imenu'.
1795Run script using `bat-run' and `bat-run-args'.
1796
1797\\{bat-mode-map}
1798
1799\(fn)" t nil)
1800
1801;;;***
1802
1769;;;### (autoloads nil "battery" "battery.el" (20791 9657 561026 0)) 1803;;;### (autoloads nil "battery" "battery.el" (20791 9657 561026 0))
1770;;; Generated autoloads from battery.el 1804;;; Generated autoloads from battery.el
1771 (put 'battery-mode-line-string 'risky-local-variable t) 1805 (put 'battery-mode-line-string 'risky-local-variable t)
@@ -2086,8 +2120,8 @@ a reflection.
2086 2120
2087;;;*** 2121;;;***
2088 2122
2089;;;### (autoloads nil "bookmark" "bookmark.el" (20874 65006 176325 2123;;;### (autoloads nil "bookmark" "bookmark.el" (20998 4934 952905
2090;;;;;; 548000)) 2124;;;;;; 0))
2091;;; Generated autoloads from bookmark.el 2125;;; Generated autoloads from bookmark.el
2092 (define-key ctl-x-r-map "b" 'bookmark-jump) 2126 (define-key ctl-x-r-map "b" 'bookmark-jump)
2093 (define-key ctl-x-r-map "m" 'bookmark-set) 2127 (define-key ctl-x-r-map "m" 'bookmark-set)
@@ -2280,8 +2314,8 @@ Incremental search of bookmarks, hiding the non-matches as we go.
2280 2314
2281;;;*** 2315;;;***
2282 2316
2283;;;### (autoloads nil "browse-url" "net/browse-url.el" (20929 34089 2317;;;### (autoloads nil "browse-url" "net/browse-url.el" (20984 58408
2284;;;;;; 117790 0)) 2318;;;;;; 354075 0))
2285;;; Generated autoloads from net/browse-url.el 2319;;; Generated autoloads from net/browse-url.el
2286 2320
2287(defvar browse-url-browser-function 'browse-url-default-browser "\ 2321(defvar browse-url-browser-function 'browse-url-default-browser "\
@@ -2596,9 +2630,9 @@ from `browse-url-elinks-wrapper'.
2596 2630
2597;;;*** 2631;;;***
2598 2632
2599;;;### (autoloads nil "bs" "bs.el" (20933 31141 450159 0)) 2633;;;### (autoloads nil "bs" "bs.el" (20992 52525 458637 0))
2600;;; Generated autoloads from bs.el 2634;;; Generated autoloads from bs.el
2601(push (purecopy (quote (bs 1 17))) package--builtin-versions) 2635(push (purecopy '(bs 1 17)) package--builtin-versions)
2602(autoload 'bs-cycle-next "bs" "\ 2636(autoload 'bs-cycle-next "bs" "\
2603Select next buffer defined by buffer cycling. 2637Select next buffer defined by buffer cycling.
2604The buffers taking part in buffer cycling are defined 2638The buffers taking part in buffer cycling are defined
@@ -2679,8 +2713,8 @@ Like `bug-reference-mode', but only buttonize in comments and strings.
2679 2713
2680;;;*** 2714;;;***
2681 2715
2682;;;### (autoloads nil "bytecomp" "emacs-lisp/bytecomp.el" (20929 2716;;;### (autoloads nil "bytecomp" "emacs-lisp/bytecomp.el" (21024
2683;;;;;; 34089 117790 0)) 2717;;;;;; 55496 462544 366000))
2684;;; Generated autoloads from emacs-lisp/bytecomp.el 2718;;; Generated autoloads from emacs-lisp/bytecomp.el
2685(put 'byte-compile-dynamic 'safe-local-variable 'booleanp) 2719(put 'byte-compile-dynamic 'safe-local-variable 'booleanp)
2686(put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp) 2720(put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp)
@@ -2800,8 +2834,8 @@ and corresponding effects.
2800 2834
2801;;;*** 2835;;;***
2802 2836
2803;;;### (autoloads nil "cal-china" "calendar/cal-china.el" (20709 2837;;;### (autoloads nil "cal-china" "calendar/cal-china.el" (21023
2804;;;;;; 26818 907104 0)) 2838;;;;;; 8104 618865 0))
2805;;; Generated autoloads from calendar/cal-china.el 2839;;; Generated autoloads from calendar/cal-china.el
2806 2840
2807(put 'calendar-chinese-time-zone 'risky-local-variable t) 2841(put 'calendar-chinese-time-zone 'risky-local-variable t)
@@ -2837,7 +2871,7 @@ from the cursor position.
2837 2871
2838;;;*** 2872;;;***
2839 2873
2840;;;### (autoloads nil "calc" "calc/calc.el" (20932 10282 564846 0)) 2874;;;### (autoloads nil "calc" "calc/calc.el" (20998 4934 952905 0))
2841;;; Generated autoloads from calc/calc.el 2875;;; Generated autoloads from calc/calc.el
2842 (define-key ctl-x-map "*" 'calc-dispatch) 2876 (define-key ctl-x-map "*" 'calc-dispatch)
2843 2877
@@ -2932,7 +2966,7 @@ See Info node `(calc)Defining Functions'.
2932 2966
2933;;;*** 2967;;;***
2934 2968
2935;;;### (autoloads nil "calculator" "calculator.el" (20891 18859 893295 2969;;;### (autoloads nil "calculator" "calculator.el" (21024 28968 738399
2936;;;;;; 0)) 2970;;;;;; 0))
2937;;; Generated autoloads from calculator.el 2971;;; Generated autoloads from calculator.el
2938 2972
@@ -2944,8 +2978,8 @@ See the documentation for `calculator-mode' for more information.
2944 2978
2945;;;*** 2979;;;***
2946 2980
2947;;;### (autoloads nil "calendar" "calendar/calendar.el" (20762 9398 2981;;;### (autoloads nil "calendar" "calendar/calendar.el" (20993 36675
2948;;;;;; 526093 0)) 2982;;;;;; 840108 928000))
2949;;; Generated autoloads from calendar/calendar.el 2983;;; Generated autoloads from calendar/calendar.el
2950 2984
2951(autoload 'calendar "calendar" "\ 2985(autoload 'calendar "calendar" "\
@@ -3053,8 +3087,8 @@ Obsoletes `c-forward-into-nomenclature'.
3053 3087
3054;;;*** 3088;;;***
3055 3089
3056;;;### (autoloads nil "cc-engine" "progmodes/cc-engine.el" (20911 3090;;;### (autoloads nil "cc-engine" "progmodes/cc-engine.el" (21023
3057;;;;;; 4138 279475 0)) 3091;;;;;; 33771 640838 743000))
3058;;; Generated autoloads from progmodes/cc-engine.el 3092;;; Generated autoloads from progmodes/cc-engine.el
3059 3093
3060(autoload 'c-guess-basic-syntax "cc-engine" "\ 3094(autoload 'c-guess-basic-syntax "cc-engine" "\
@@ -3163,8 +3197,8 @@ the absolute file name of the file if STYLE-NAME is nil.
3163 3197
3164;;;*** 3198;;;***
3165 3199
3166;;;### (autoloads nil "cc-mode" "progmodes/cc-mode.el" (20907 7082 3200;;;### (autoloads nil "cc-mode" "progmodes/cc-mode.el" (21022 34805
3167;;;;;; 901087 0)) 3201;;;;;; 23711 194000))
3168;;; Generated autoloads from progmodes/cc-mode.el 3202;;; Generated autoloads from progmodes/cc-mode.el
3169 3203
3170(autoload 'c-initialize-cc-mode "cc-mode" "\ 3204(autoload 'c-initialize-cc-mode "cc-mode" "\
@@ -3176,9 +3210,6 @@ only some basic setup is done, and a call to `c-init-language-vars' or
3176control). See \"cc-mode.el\" for more info. 3210control). See \"cc-mode.el\" for more info.
3177 3211
3178\(fn &optional NEW-STYLE-INIT)" nil nil) 3212\(fn &optional NEW-STYLE-INIT)" nil nil)
3179
3180(defvar c-mode-syntax-table nil "\
3181Syntax table used in c-mode buffers.")
3182 (add-to-list 'auto-mode-alist '("\\.\\(cc\\|hh\\)\\'" . c++-mode)) 3213 (add-to-list 'auto-mode-alist '("\\.\\(cc\\|hh\\)\\'" . c++-mode))
3183 (add-to-list 'auto-mode-alist '("\\.[ch]\\(pp\\|xx\\|\\+\\+\\)\\'" . c++-mode)) 3214 (add-to-list 'auto-mode-alist '("\\.[ch]\\(pp\\|xx\\|\\+\\+\\)\\'" . c++-mode))
3184 (add-to-list 'auto-mode-alist '("\\.\\(CC?\\|HH?\\)\\'" . c++-mode)) 3215 (add-to-list 'auto-mode-alist '("\\.\\(CC?\\|HH?\\)\\'" . c++-mode))
@@ -3205,9 +3236,6 @@ Key bindings:
3205 3236
3206\(fn)" t nil) 3237\(fn)" t nil)
3207 3238
3208(defvar c++-mode-syntax-table nil "\
3209Syntax table used in c++-mode buffers.")
3210
3211(autoload 'c++-mode "cc-mode" "\ 3239(autoload 'c++-mode "cc-mode" "\
3212Major mode for editing C++ code. 3240Major mode for editing C++ code.
3213To submit a problem report, enter `\\[c-submit-bug-report]' from a 3241To submit a problem report, enter `\\[c-submit-bug-report]' from a
@@ -3225,9 +3253,6 @@ Key bindings:
3225\\{c++-mode-map} 3253\\{c++-mode-map}
3226 3254
3227\(fn)" t nil) 3255\(fn)" t nil)
3228
3229(defvar objc-mode-syntax-table nil "\
3230Syntax table used in objc-mode buffers.")
3231 (add-to-list 'auto-mode-alist '("\\.m\\'" . objc-mode)) 3256 (add-to-list 'auto-mode-alist '("\\.m\\'" . objc-mode))
3232 3257
3233(autoload 'objc-mode "cc-mode" "\ 3258(autoload 'objc-mode "cc-mode" "\
@@ -3247,9 +3272,6 @@ Key bindings:
3247\\{objc-mode-map} 3272\\{objc-mode-map}
3248 3273
3249\(fn)" t nil) 3274\(fn)" t nil)
3250
3251(defvar java-mode-syntax-table nil "\
3252Syntax table used in java-mode buffers.")
3253 (add-to-list 'auto-mode-alist '("\\.java\\'" . java-mode)) 3275 (add-to-list 'auto-mode-alist '("\\.java\\'" . java-mode))
3254 3276
3255(autoload 'java-mode "cc-mode" "\ 3277(autoload 'java-mode "cc-mode" "\
@@ -3269,9 +3291,6 @@ Key bindings:
3269\\{java-mode-map} 3291\\{java-mode-map}
3270 3292
3271\(fn)" t nil) 3293\(fn)" t nil)
3272
3273(defvar idl-mode-syntax-table nil "\
3274Syntax table used in idl-mode buffers.")
3275 (add-to-list 'auto-mode-alist '("\\.idl\\'" . idl-mode)) 3294 (add-to-list 'auto-mode-alist '("\\.idl\\'" . idl-mode))
3276 3295
3277(autoload 'idl-mode "cc-mode" "\ 3296(autoload 'idl-mode "cc-mode" "\
@@ -3291,9 +3310,6 @@ Key bindings:
3291\\{idl-mode-map} 3310\\{idl-mode-map}
3292 3311
3293\(fn)" t nil) 3312\(fn)" t nil)
3294
3295(defvar pike-mode-syntax-table nil "\
3296Syntax table used in pike-mode buffers.")
3297 (add-to-list 'auto-mode-alist '("\\.\\(u?lpc\\|pike\\|pmod\\(\\.in\\)?\\)\\'" . pike-mode)) 3313 (add-to-list 'auto-mode-alist '("\\.\\(u?lpc\\|pike\\|pmod\\(\\.in\\)?\\)\\'" . pike-mode))
3298 (add-to-list 'interpreter-mode-alist '("pike" . pike-mode)) 3314 (add-to-list 'interpreter-mode-alist '("pike" . pike-mode))
3299 3315
@@ -3662,8 +3678,8 @@ See the documentation of `define-ccl-program' for the detail of CCL program.
3662 3678
3663;;;*** 3679;;;***
3664 3680
3665;;;### (autoloads nil "cconv" "emacs-lisp/cconv.el" (20922 60838 3681;;;### (autoloads nil "cconv" "emacs-lisp/cconv.el" (21021 52778
3666;;;;;; 997229 0)) 3682;;;;;; 175609 0))
3667;;; Generated autoloads from emacs-lisp/cconv.el 3683;;; Generated autoloads from emacs-lisp/cconv.el
3668 3684
3669(autoload 'cconv-closure-convert "cconv" "\ 3685(autoload 'cconv-closure-convert "cconv" "\
@@ -3682,16 +3698,16 @@ Add the warnings that closure conversion would encounter.
3682 3698
3683;;;*** 3699;;;***
3684 3700
3685;;;### (autoloads nil "cedet" "cedet/cedet.el" (20748 62911 684442 3701;;;### (autoloads nil "cedet" "cedet/cedet.el" (20983 37555 279226
3686;;;;;; 0)) 3702;;;;;; 0))
3687;;; Generated autoloads from cedet/cedet.el 3703;;; Generated autoloads from cedet/cedet.el
3688(push (purecopy (quote (cedet 2 0))) package--builtin-versions) 3704(push (purecopy '(cedet 2 0)) package--builtin-versions)
3689;;;*** 3705;;;***
3690 3706
3691;;;### (autoloads nil "cfengine" "progmodes/cfengine.el" (20929 34089 3707;;;### (autoloads nil "cfengine" "progmodes/cfengine.el" (20958 34345
3692;;;;;; 117790 0)) 3708;;;;;; 952538 0))
3693;;; Generated autoloads from progmodes/cfengine.el 3709;;; Generated autoloads from progmodes/cfengine.el
3694(push (purecopy (quote (cfengine 1 2))) package--builtin-versions) 3710(push (purecopy '(cfengine 1 2)) package--builtin-versions)
3695(autoload 'cfengine3-mode "cfengine" "\ 3711(autoload 'cfengine3-mode "cfengine" "\
3696Major mode for editing CFEngine3 input. 3712Major mode for editing CFEngine3 input.
3697There are no special keybindings by default. 3713There are no special keybindings by default.
@@ -3721,7 +3737,7 @@ on the buffer contents
3721;;;### (autoloads nil "chart" "emacs-lisp/chart.el" (20895 15912 3737;;;### (autoloads nil "chart" "emacs-lisp/chart.el" (20895 15912
3722;;;;;; 444844 0)) 3738;;;;;; 444844 0))
3723;;; Generated autoloads from emacs-lisp/chart.el 3739;;; Generated autoloads from emacs-lisp/chart.el
3724(push (purecopy (quote (chart 0 2))) package--builtin-versions) 3740(push (purecopy '(chart 0 2)) package--builtin-versions)
3725;;;*** 3741;;;***
3726 3742
3727;;;### (autoloads nil "check-declare" "emacs-lisp/check-declare.el" 3743;;;### (autoloads nil "check-declare" "emacs-lisp/check-declare.el"
@@ -3742,19 +3758,24 @@ Returns non-nil if any false statements are found.
3742 3758
3743;;;*** 3759;;;***
3744 3760
3745;;;### (autoloads nil "checkdoc" "emacs-lisp/checkdoc.el" (20893 3761;;;### (autoloads nil "checkdoc" "emacs-lisp/checkdoc.el" (20996
3746;;;;;; 60586 188550 0)) 3762;;;;;; 49577 892030 0))
3747;;; Generated autoloads from emacs-lisp/checkdoc.el 3763;;; Generated autoloads from emacs-lisp/checkdoc.el
3748(push (purecopy (quote (checkdoc 0 6 2))) package--builtin-versions)(put 'checkdoc-force-docstrings-flag 'safe-local-variable 'booleanp) 3764(push (purecopy '(checkdoc 0 6 2)) package--builtin-versions)(put 'checkdoc-force-docstrings-flag 'safe-local-variable #'booleanp)
3749(put 'checkdoc-force-history-flag 'safe-local-variable 'booleanp) 3765(put 'checkdoc-force-history-flag 'safe-local-variable #'booleanp)
3750(put 'checkdoc-permit-comma-termination-flag 'safe-local-variable 'booleanp) 3766(put 'checkdoc-permit-comma-termination-flag 'safe-local-variable #'booleanp)
3751(put 'checkdoc-arguments-in-order-flag 'safe-local-variable 'booleanp) 3767(put 'checkdoc-spellcheck-documentation-flag 'safe-local-variable #'booleanp)
3752(put 'checkdoc-symbol-words 'safe-local-variable 'checkdoc-list-of-strings-p) 3768(put 'checkdoc-ispell-list-words 'safe-local-variable #'checkdoc-list-of-strings-p)
3769(put 'checkdoc-arguments-in-order-flag 'safe-local-variable #'booleanp)
3770(put 'checkdoc-verb-check-experimental-flag 'safe-local-variable #'booleanp)
3771(put 'checkdoc-symbol-words 'safe-local-variable #'checkdoc-list-of-strings-p)
3753 3772
3754(autoload 'checkdoc-list-of-strings-p "checkdoc" "\ 3773(autoload 'checkdoc-list-of-strings-p "checkdoc" "\
3755 3774
3756 3775
3757\(fn OBJ)" nil nil) 3776\(fn OBJ)" nil nil)
3777(put 'checkdoc-proper-noun-regexp 'safe-local-variable 'stringp)
3778(put 'checkdoc-common-verbs-regexp 'safe-local-variable 'stringp)
3758 3779
3759(autoload 'checkdoc "checkdoc" "\ 3780(autoload 'checkdoc "checkdoc" "\
3760Interactively check the entire buffer for style errors. 3781Interactively check the entire buffer for style errors.
@@ -3861,65 +3882,65 @@ space at the end of each line.
3861(autoload 'checkdoc-ispell "checkdoc" "\ 3882(autoload 'checkdoc-ispell "checkdoc" "\
3862Check the style and spelling of everything interactively. 3883Check the style and spelling of everything interactively.
3863Calls `checkdoc' with spell-checking turned on. 3884Calls `checkdoc' with spell-checking turned on.
3864Prefix argument TAKE-NOTES is the same as for `checkdoc' 3885Prefix argument is the same as for `checkdoc'
3865 3886
3866\(fn &optional TAKE-NOTES)" t nil) 3887\(fn)" t nil)
3867 3888
3868(autoload 'checkdoc-ispell-current-buffer "checkdoc" "\ 3889(autoload 'checkdoc-ispell-current-buffer "checkdoc" "\
3869Check the style and spelling of the current buffer. 3890Check the style and spelling of the current buffer.
3870Calls `checkdoc-current-buffer' with spell-checking turned on. 3891Calls `checkdoc-current-buffer' with spell-checking turned on.
3871Prefix argument TAKE-NOTES is the same as for `checkdoc-current-buffer' 3892Prefix argument is the same as for `checkdoc-current-buffer'
3872 3893
3873\(fn &optional TAKE-NOTES)" t nil) 3894\(fn)" t nil)
3874 3895
3875(autoload 'checkdoc-ispell-interactive "checkdoc" "\ 3896(autoload 'checkdoc-ispell-interactive "checkdoc" "\
3876Check the style and spelling of the current buffer interactively. 3897Check the style and spelling of the current buffer interactively.
3877Calls `checkdoc-interactive' with spell-checking turned on. 3898Calls `checkdoc-interactive' with spell-checking turned on.
3878Prefix argument TAKE-NOTES is the same as for `checkdoc-interactive' 3899Prefix argument is the same as for `checkdoc-interactive'
3879 3900
3880\(fn &optional TAKE-NOTES)" t nil) 3901\(fn)" t nil)
3881 3902
3882(autoload 'checkdoc-ispell-message-interactive "checkdoc" "\ 3903(autoload 'checkdoc-ispell-message-interactive "checkdoc" "\
3883Check the style and spelling of message text interactively. 3904Check the style and spelling of message text interactively.
3884Calls `checkdoc-message-interactive' with spell-checking turned on. 3905Calls `checkdoc-message-interactive' with spell-checking turned on.
3885Prefix argument TAKE-NOTES is the same as for `checkdoc-message-interactive' 3906Prefix argument is the same as for `checkdoc-message-interactive'
3886 3907
3887\(fn &optional TAKE-NOTES)" t nil) 3908\(fn)" t nil)
3888 3909
3889(autoload 'checkdoc-ispell-message-text "checkdoc" "\ 3910(autoload 'checkdoc-ispell-message-text "checkdoc" "\
3890Check the style and spelling of message text interactively. 3911Check the style and spelling of message text interactively.
3891Calls `checkdoc-message-text' with spell-checking turned on. 3912Calls `checkdoc-message-text' with spell-checking turned on.
3892Prefix argument TAKE-NOTES is the same as for `checkdoc-message-text' 3913Prefix argument is the same as for `checkdoc-message-text'
3893 3914
3894\(fn &optional TAKE-NOTES)" t nil) 3915\(fn)" t nil)
3895 3916
3896(autoload 'checkdoc-ispell-start "checkdoc" "\ 3917(autoload 'checkdoc-ispell-start "checkdoc" "\
3897Check the style and spelling of the current buffer. 3918Check the style and spelling of the current buffer.
3898Calls `checkdoc-start' with spell-checking turned on. 3919Calls `checkdoc-start' with spell-checking turned on.
3899Prefix argument TAKE-NOTES is the same as for `checkdoc-start' 3920Prefix argument is the same as for `checkdoc-start'
3900 3921
3901\(fn &optional TAKE-NOTES)" t nil) 3922\(fn)" t nil)
3902 3923
3903(autoload 'checkdoc-ispell-continue "checkdoc" "\ 3924(autoload 'checkdoc-ispell-continue "checkdoc" "\
3904Check the style and spelling of the current buffer after point. 3925Check the style and spelling of the current buffer after point.
3905Calls `checkdoc-continue' with spell-checking turned on. 3926Calls `checkdoc-continue' with spell-checking turned on.
3906Prefix argument TAKE-NOTES is the same as for `checkdoc-continue' 3927Prefix argument is the same as for `checkdoc-continue'
3907 3928
3908\(fn &optional TAKE-NOTES)" t nil) 3929\(fn)" t nil)
3909 3930
3910(autoload 'checkdoc-ispell-comments "checkdoc" "\ 3931(autoload 'checkdoc-ispell-comments "checkdoc" "\
3911Check the style and spelling of the current buffer's comments. 3932Check the style and spelling of the current buffer's comments.
3912Calls `checkdoc-comments' with spell-checking turned on. 3933Calls `checkdoc-comments' with spell-checking turned on.
3913Prefix argument TAKE-NOTES is the same as for `checkdoc-comments' 3934Prefix argument is the same as for `checkdoc-comments'
3914 3935
3915\(fn &optional TAKE-NOTES)" t nil) 3936\(fn)" t nil)
3916 3937
3917(autoload 'checkdoc-ispell-defun "checkdoc" "\ 3938(autoload 'checkdoc-ispell-defun "checkdoc" "\
3918Check the style and spelling of the current defun with Ispell. 3939Check the style and spelling of the current defun with Ispell.
3919Calls `checkdoc-defun' with spell-checking turned on. 3940Calls `checkdoc-defun' with spell-checking turned on.
3920Prefix argument TAKE-NOTES is the same as for `checkdoc-defun' 3941Prefix argument is the same as for `checkdoc-defun'
3921 3942
3922\(fn &optional TAKE-NOTES)" t nil) 3943\(fn)" t nil)
3923 3944
3924(autoload 'checkdoc-minor-mode "checkdoc" "\ 3945(autoload 'checkdoc-minor-mode "checkdoc" "\
3925Toggle automatic docstring checking (Checkdoc minor mode). 3946Toggle automatic docstring checking (Checkdoc minor mode).
@@ -4094,10 +4115,10 @@ For example, the function `case' has an indent property
4094 4115
4095;;;*** 4116;;;***
4096 4117
4097;;;### (autoloads nil "cl-lib" "emacs-lisp/cl-lib.el" (20932 10282 4118;;;### (autoloads nil "cl-lib" "emacs-lisp/cl-lib.el" (20998 4934
4098;;;;;; 564846 0)) 4119;;;;;; 952905 0))
4099;;; Generated autoloads from emacs-lisp/cl-lib.el 4120;;; Generated autoloads from emacs-lisp/cl-lib.el
4100(push (purecopy (quote (cl-lib 1 0))) package--builtin-versions) 4121(push (purecopy '(cl-lib 1 0)) package--builtin-versions)
4101(define-obsolete-variable-alias 'custom-print-functions 'cl-custom-print-functions "24.3") 4122(define-obsolete-variable-alias 'custom-print-functions 'cl-custom-print-functions "24.3")
4102 4123
4103(defvar cl-custom-print-functions nil "\ 4124(defvar cl-custom-print-functions nil "\
@@ -4110,6 +4131,8 @@ printer proceeds to the next function on the list.
4110This variable is not used at present, but it is defined in hopes that 4131This variable is not used at present, but it is defined in hopes that
4111a future Emacs interpreter will be able to use it.") 4132a future Emacs interpreter will be able to use it.")
4112 4133
4134(define-error 'cl-assertion-failed (purecopy "Assertion failed"))
4135
4113(autoload 'cl--defsubst-expand "cl-macs") 4136(autoload 'cl--defsubst-expand "cl-macs")
4114 4137
4115(put 'cl-defun 'doc-string-elt 3) 4138(put 'cl-defun 'doc-string-elt 3)
@@ -4183,7 +4206,7 @@ If FRAME cannot display COLOR, return nil.
4183 4206
4184;;;*** 4207;;;***
4185 4208
4186;;;### (autoloads nil "comint" "comint.el" (20932 10282 564846 0)) 4209;;;### (autoloads nil "comint" "comint.el" (21024 28968 738399 0))
4187;;; Generated autoloads from comint.el 4210;;; Generated autoloads from comint.el
4188 4211
4189(defvar comint-output-filter-functions '(ansi-color-process-output comint-postoutput-scroll-to-bottom comint-watch-for-password-prompt) "\ 4212(defvar comint-output-filter-functions '(ansi-color-process-output comint-postoutput-scroll-to-bottom comint-watch-for-password-prompt) "\
@@ -4282,8 +4305,8 @@ REGEXP-GROUP is the regular expression group in REGEXP to use.
4282 4305
4283;;;*** 4306;;;***
4284 4307
4285;;;### (autoloads nil "compare-w" "vc/compare-w.el" (20871 33574 4308;;;### (autoloads nil "compare-w" "vc/compare-w.el" (20992 52525
4286;;;;;; 214287 0)) 4309;;;;;; 458637 0))
4287;;; Generated autoloads from vc/compare-w.el 4310;;; Generated autoloads from vc/compare-w.el
4288 4311
4289(autoload 'compare-windows "compare-w" "\ 4312(autoload 'compare-windows "compare-w" "\
@@ -4316,8 +4339,8 @@ on third call it again advances points to the next difference and so on.
4316 4339
4317;;;*** 4340;;;***
4318 4341
4319;;;### (autoloads nil "compile" "progmodes/compile.el" (20911 4138 4342;;;### (autoloads nil "compile" "progmodes/compile.el" (21002 1963
4320;;;;;; 279475 0)) 4343;;;;;; 769129 0))
4321;;; Generated autoloads from progmodes/compile.el 4344;;; Generated autoloads from progmodes/compile.el
4322 4345
4323(defvar compilation-mode-hook nil "\ 4346(defvar compilation-mode-hook nil "\
@@ -4385,7 +4408,9 @@ You might also use mode hooks to specify it in certain modes, like this:
4385 (file-exists-p \"Makefile\")) 4408 (file-exists-p \"Makefile\"))
4386 (set (make-local-variable 'compile-command) 4409 (set (make-local-variable 'compile-command)
4387 (concat \"make -k \" 4410 (concat \"make -k \"
4388 (file-name-sans-extension buffer-file-name))))))") 4411 (if buffer-file-name
4412 (shell-quote-argument
4413 (file-name-sans-extension buffer-file-name))))))))")
4389 4414
4390(custom-autoload 'compile-command "compile" t) 4415(custom-autoload 'compile-command "compile" t)
4391(put 'compile-command 'safe-local-variable (lambda (a) (and (stringp a) (or (not (boundp 'compilation-read-command)) compilation-read-command)))) 4416(put 'compile-command 'safe-local-variable (lambda (a) (and (stringp a) (or (not (boundp 'compilation-read-command)) compilation-read-command))))
@@ -4496,8 +4521,8 @@ This is the value of `next-error-function' in Compilation buffers.
4496 4521
4497;;;*** 4522;;;***
4498 4523
4499;;;### (autoloads nil "completion" "completion.el" (20884 7264 412929 4524;;;### (autoloads nil "completion" "completion.el" (20999 25770 522517
4500;;;;;; 442000)) 4525;;;;;; 0))
4501;;; Generated autoloads from completion.el 4526;;; Generated autoloads from completion.el
4502 4527
4503(defvar dynamic-completion-mode nil "\ 4528(defvar dynamic-completion-mode nil "\
@@ -5024,8 +5049,8 @@ INHERIT-INPUT-METHOD.
5024 5049
5025;;;*** 5050;;;***
5026 5051
5027;;;### (autoloads nil "css-mode" "textmodes/css-mode.el" (20709 26818 5052;;;### (autoloads nil "css-mode" "textmodes/css-mode.el" (21024 28968
5028;;;;;; 907104 0)) 5053;;;;;; 738399 0))
5029;;; Generated autoloads from textmodes/css-mode.el 5054;;; Generated autoloads from textmodes/css-mode.el
5030 5055
5031(autoload 'css-mode "css-mode" "\ 5056(autoload 'css-mode "css-mode" "\
@@ -5035,8 +5060,8 @@ Major mode to edit Cascading Style Sheets.
5035 5060
5036;;;*** 5061;;;***
5037 5062
5038;;;### (autoloads nil "cua-base" "emulation/cua-base.el" (20709 26818 5063;;;### (autoloads nil "cua-base" "emulation/cua-base.el" (20992 52525
5039;;;;;; 907104 0)) 5064;;;;;; 458637 0))
5040;;; Generated autoloads from emulation/cua-base.el 5065;;; Generated autoloads from emulation/cua-base.el
5041 5066
5042(defvar cua-mode nil "\ 5067(defvar cua-mode nil "\
@@ -5086,7 +5111,7 @@ Enable CUA selection mode without the C-z/C-x/C-c/C-v bindings.
5086 5111
5087;;;*** 5112;;;***
5088 5113
5089;;;### (autoloads nil "cus-edit" "cus-edit.el" (20932 10282 564846 5114;;;### (autoloads nil "cus-edit" "cus-edit.el" (21024 28968 738399
5090;;;;;; 0)) 5115;;;;;; 0))
5091;;; Generated autoloads from cus-edit.el 5116;;; Generated autoloads from cus-edit.el
5092 5117
@@ -5446,7 +5471,7 @@ Mode used for cvs status output.
5446;;;### (autoloads nil "cwarn" "progmodes/cwarn.el" (20709 26818 907104 5471;;;### (autoloads nil "cwarn" "progmodes/cwarn.el" (20709 26818 907104
5447;;;;;; 0)) 5472;;;;;; 0))
5448;;; Generated autoloads from progmodes/cwarn.el 5473;;; Generated autoloads from progmodes/cwarn.el
5449(push (purecopy (quote (cwarn 1 3 1))) package--builtin-versions) 5474(push (purecopy '(cwarn 1 3 1)) package--builtin-versions)
5450(autoload 'cwarn-mode "cwarn" "\ 5475(autoload 'cwarn-mode "cwarn" "\
5451Minor mode that highlights suspicious C and C++ constructions. 5476Minor mode that highlights suspicious C and C++ constructions.
5452 5477
@@ -5516,7 +5541,7 @@ If the argument is nil, we return the display table to its standard state.
5516 5541
5517;;;*** 5542;;;***
5518 5543
5519;;;### (autoloads nil "dabbrev" "dabbrev.el" (20709 26818 907104 5544;;;### (autoloads nil "dabbrev" "dabbrev.el" (20992 52525 458637
5520;;;;;; 0)) 5545;;;;;; 0))
5521;;; Generated autoloads from dabbrev.el 5546;;; Generated autoloads from dabbrev.el
5522(put 'dabbrev-case-fold-search 'risky-local-variable t) 5547(put 'dabbrev-case-fold-search 'risky-local-variable t)
@@ -5714,8 +5739,8 @@ There is some minimal font-lock support (see vars
5714 5739
5715;;;*** 5740;;;***
5716 5741
5717;;;### (autoloads nil "debug" "emacs-lisp/debug.el" (20709 26818 5742;;;### (autoloads nil "debug" "emacs-lisp/debug.el" (21005 64551
5718;;;;;; 907104 0)) 5743;;;;;; 555603 0))
5719;;; Generated autoloads from emacs-lisp/debug.el 5744;;; Generated autoloads from emacs-lisp/debug.el
5720 5745
5721(setq debugger 'debug) 5746(setq debugger 'debug)
@@ -5790,7 +5815,7 @@ The most useful commands are:
5790;;;### (autoloads nil "delim-col" "delim-col.el" (20709 26818 907104 5815;;;### (autoloads nil "delim-col" "delim-col.el" (20709 26818 907104
5791;;;;;; 0)) 5816;;;;;; 0))
5792;;; Generated autoloads from delim-col.el 5817;;; Generated autoloads from delim-col.el
5793(push (purecopy (quote (delim-col 2 1))) package--builtin-versions) 5818(push (purecopy '(delim-col 2 1)) package--builtin-versions)
5794(autoload 'delimit-columns-customize "delim-col" "\ 5819(autoload 'delimit-columns-customize "delim-col" "\
5795Customization of `columns' group. 5820Customization of `columns' group.
5796 5821
@@ -5908,7 +5933,7 @@ the first time the mode is used.
5908 5933
5909;;;*** 5934;;;***
5910 5935
5911;;;### (autoloads nil "descr-text" "descr-text.el" (20875 30633 412173 5936;;;### (autoloads nil "descr-text" "descr-text.el" (21024 28968 738399
5912;;;;;; 0)) 5937;;;;;; 0))
5913;;; Generated autoloads from descr-text.el 5938;;; Generated autoloads from descr-text.el
5914 5939
@@ -5943,7 +5968,8 @@ relevant to POS.
5943 5968
5944;;;*** 5969;;;***
5945 5970
5946;;;### (autoloads nil "desktop" "desktop.el" (20945 22315 8369 0)) 5971;;;### (autoloads nil "desktop" "desktop.el" (21005 64551 555603
5972;;;;;; 0))
5947;;; Generated autoloads from desktop.el 5973;;; Generated autoloads from desktop.el
5948 5974
5949(defvar desktop-save-mode nil "\ 5975(defvar desktop-save-mode nil "\
@@ -5971,9 +5997,8 @@ modes are restored automatically; they should not be listed here.")
5971 5997
5972(custom-autoload 'desktop-locals-to-save "desktop" t) 5998(custom-autoload 'desktop-locals-to-save "desktop" t)
5973 5999
5974(defvar desktop-save-buffer nil "\ 6000(defvar-local desktop-save-buffer nil "\
5975When non-nil, save buffer status in desktop file. 6001When non-nil, save buffer status in desktop file.
5976This variable becomes buffer local when set.
5977 6002
5978If the value is a function, it is called by `desktop-save' with argument 6003If the value is a function, it is called by `desktop-save' with argument
5979DESKTOP-DIRNAME to obtain auxiliary information to save in the desktop 6004DESKTOP-DIRNAME to obtain auxiliary information to save in the desktop
@@ -6074,6 +6099,9 @@ Empty the Desktop.
6074This kills all buffers except for internal ones and those with names matched by 6099This kills all buffers except for internal ones and those with names matched by
6075a regular expression in the list `desktop-clear-preserve-buffers'. 6100a regular expression in the list `desktop-clear-preserve-buffers'.
6076Furthermore, it clears the variables listed in `desktop-globals-to-clear'. 6101Furthermore, it clears the variables listed in `desktop-globals-to-clear'.
6102When called interactively and `desktop-restore-frames' is non-nil, it also
6103deletes all frames except the selected one (and its minibuffer frame,
6104if different).
6077 6105
6078\(fn)" t nil) 6106\(fn)" t nil)
6079 6107
@@ -6164,8 +6192,8 @@ Deuglify broken Outlook (Express) articles and redisplay.
6164 6192
6165;;;*** 6193;;;***
6166 6194
6167;;;### (autoloads nil "diary-lib" "calendar/diary-lib.el" (20932 6195;;;### (autoloads nil "diary-lib" "calendar/diary-lib.el" (20992
6168;;;;;; 61699 522706 0)) 6196;;;;;; 52525 458637 0))
6169;;; Generated autoloads from calendar/diary-lib.el 6197;;; Generated autoloads from calendar/diary-lib.el
6170 6198
6171(autoload 'diary "diary-lib" "\ 6199(autoload 'diary "diary-lib" "\
@@ -6299,7 +6327,7 @@ Optional arguments are passed to `dig-invoke'.
6299 6327
6300;;;*** 6328;;;***
6301 6329
6302;;;### (autoloads nil "dired" "dired.el" (20932 61699 522706 0)) 6330;;;### (autoloads nil "dired" "dired.el" (20999 25770 522517 0))
6303;;; Generated autoloads from dired.el 6331;;; Generated autoloads from dired.el
6304 6332
6305(defvar dired-listing-switches (purecopy "-al") "\ 6333(defvar dired-listing-switches (purecopy "-al") "\
@@ -6470,7 +6498,7 @@ redefine OBJECT if it is a symbol.
6470 6498
6471;;;*** 6499;;;***
6472 6500
6473;;;### (autoloads nil "disp-table" "disp-table.el" (20709 26818 907104 6501;;;### (autoloads nil "disp-table" "disp-table.el" (20992 52525 458637
6474;;;;;; 0)) 6502;;;;;; 0))
6475;;; Generated autoloads from disp-table.el 6503;;; Generated autoloads from disp-table.el
6476 6504
@@ -6653,7 +6681,7 @@ Locate SOA record and increment the serial field.
6653 6681
6654;;;*** 6682;;;***
6655 6683
6656;;;### (autoloads nil "doc-view" "doc-view.el" (20899 12965 791908 6684;;;### (autoloads nil "doc-view" "doc-view.el" (20992 52525 458637
6657;;;;;; 0)) 6685;;;;;; 0))
6658;;; Generated autoloads from doc-view.el 6686;;; Generated autoloads from doc-view.el
6659 6687
@@ -6730,7 +6758,7 @@ strings when pressed twice. See `double-map' for details.
6730;;;### (autoloads nil "dunnet" "play/dunnet.el" (20900 33838 319219 6758;;;### (autoloads nil "dunnet" "play/dunnet.el" (20900 33838 319219
6731;;;;;; 0)) 6759;;;;;; 0))
6732;;; Generated autoloads from play/dunnet.el 6760;;; Generated autoloads from play/dunnet.el
6733(push (purecopy (quote (dunnet 2 1))) package--builtin-versions) 6761(push (purecopy '(dunnet 2 1)) package--builtin-versions)
6734(autoload 'dunnet "dunnet" "\ 6762(autoload 'dunnet "dunnet" "\
6735Switch to *dungeon* buffer and start game. 6763Switch to *dungeon* buffer and start game.
6736 6764
@@ -6738,8 +6766,8 @@ Switch to *dungeon* buffer and start game.
6738 6766
6739;;;*** 6767;;;***
6740 6768
6741;;;### (autoloads nil "easy-mmode" "emacs-lisp/easy-mmode.el" (20900 6769;;;### (autoloads nil "easy-mmode" "emacs-lisp/easy-mmode.el" (20992
6742;;;;;; 33838 319219 0)) 6770;;;;;; 52525 458637 0))
6743;;; Generated autoloads from emacs-lisp/easy-mmode.el 6771;;; Generated autoloads from emacs-lisp/easy-mmode.el
6744 6772
6745(defalias 'easy-mmode-define-minor-mode 'define-minor-mode) 6773(defalias 'easy-mmode-define-minor-mode 'define-minor-mode)
@@ -7020,7 +7048,7 @@ To implement dynamic menus, either call this from
7020;;;### (autoloads nil "ebnf2ps" "progmodes/ebnf2ps.el" (20709 26818 7048;;;### (autoloads nil "ebnf2ps" "progmodes/ebnf2ps.el" (20709 26818
7021;;;;;; 907104 0)) 7049;;;;;; 907104 0))
7022;;; Generated autoloads from progmodes/ebnf2ps.el 7050;;; Generated autoloads from progmodes/ebnf2ps.el
7023(push (purecopy (quote (ebnf2ps 4 4))) package--builtin-versions) 7051(push (purecopy '(ebnf2ps 4 4)) package--builtin-versions)
7024(autoload 'ebnf-customize "ebnf2ps" "\ 7052(autoload 'ebnf-customize "ebnf2ps" "\
7025Customization for ebnf group. 7053Customization for ebnf group.
7026 7054
@@ -7282,8 +7310,8 @@ See `ebnf-style-database' documentation.
7282 7310
7283;;;*** 7311;;;***
7284 7312
7285;;;### (autoloads nil "ebrowse" "progmodes/ebrowse.el" (20709 26818 7313;;;### (autoloads nil "ebrowse" "progmodes/ebrowse.el" (20992 52525
7286;;;;;; 907104 0)) 7314;;;;;; 458637 0))
7287;;; Generated autoloads from progmodes/ebrowse.el 7315;;; Generated autoloads from progmodes/ebrowse.el
7288 7316
7289(autoload 'ebrowse-tree-mode "ebrowse" "\ 7317(autoload 'ebrowse-tree-mode "ebrowse" "\
@@ -7431,7 +7459,7 @@ Display statistics for a class tree.
7431 7459
7432;;;*** 7460;;;***
7433 7461
7434;;;### (autoloads nil "ebuff-menu" "ebuff-menu.el" (20709 26818 907104 7462;;;### (autoloads nil "ebuff-menu" "ebuff-menu.el" (20992 52525 458637
7435;;;;;; 0)) 7463;;;;;; 0))
7436;;; Generated autoloads from ebuff-menu.el 7464;;; Generated autoloads from ebuff-menu.el
7437 7465
@@ -7489,7 +7517,7 @@ With prefix arg NOCONFIRM, execute current line as-is without editing.
7489 7517
7490;;;### (autoloads nil "ede" "cedet/ede.el" (20908 27948 216644 0)) 7518;;;### (autoloads nil "ede" "cedet/ede.el" (20908 27948 216644 0))
7491;;; Generated autoloads from cedet/ede.el 7519;;; Generated autoloads from cedet/ede.el
7492(push (purecopy (quote (ede 1 2))) package--builtin-versions) 7520(push (purecopy '(ede 1 2)) package--builtin-versions)
7493(defvar global-ede-mode nil "\ 7521(defvar global-ede-mode nil "\
7494Non-nil if Global-Ede mode is enabled. 7522Non-nil if Global-Ede mode is enabled.
7495See the command `global-ede-mode' for a description of this minor mode. 7523See the command `global-ede-mode' for a description of this minor mode.
@@ -7515,17 +7543,17 @@ an EDE controlled project.
7515;;;### (autoloads nil "ede/dired" "cedet/ede/dired.el" (20709 26818 7543;;;### (autoloads nil "ede/dired" "cedet/ede/dired.el" (20709 26818
7516;;;;;; 907104 0)) 7544;;;;;; 907104 0))
7517;;; Generated autoloads from cedet/ede/dired.el 7545;;; Generated autoloads from cedet/ede/dired.el
7518(push (purecopy (quote (dired 0 4))) package--builtin-versions) 7546(push (purecopy '(dired 0 4)) package--builtin-versions)
7519;;;*** 7547;;;***
7520 7548
7521;;;### (autoloads nil "ede/project-am" "cedet/ede/project-am.el" 7549;;;### (autoloads nil "ede/project-am" "cedet/ede/project-am.el"
7522;;;;;; (20881 10343 547564 552000)) 7550;;;;;; (20881 10343 547564 552000))
7523;;; Generated autoloads from cedet/ede/project-am.el 7551;;; Generated autoloads from cedet/ede/project-am.el
7524(push (purecopy (quote (project-am 0 0 3))) package--builtin-versions) 7552(push (purecopy '(project-am 0 0 3)) package--builtin-versions)
7525;;;*** 7553;;;***
7526 7554
7527;;;### (autoloads nil "edebug" "emacs-lisp/edebug.el" (20912 25000 7555;;;### (autoloads nil "edebug" "emacs-lisp/edebug.el" (20996 49577
7528;;;;;; 802412 0)) 7556;;;;;; 892030 0))
7529;;; Generated autoloads from emacs-lisp/edebug.el 7557;;; Generated autoloads from emacs-lisp/edebug.el
7530 7558
7531(defvar edebug-all-defs nil "\ 7559(defvar edebug-all-defs nil "\
@@ -7589,9 +7617,9 @@ Toggle edebugging of all forms.
7589 7617
7590;;;*** 7618;;;***
7591 7619
7592;;;### (autoloads nil "ediff" "vc/ediff.el" (20893 60586 188550 0)) 7620;;;### (autoloads nil "ediff" "vc/ediff.el" (20992 52525 458637 0))
7593;;; Generated autoloads from vc/ediff.el 7621;;; Generated autoloads from vc/ediff.el
7594(push (purecopy (quote (ediff 2 81 4))) package--builtin-versions) 7622(push (purecopy '(ediff 2 81 4)) package--builtin-versions)
7595(autoload 'ediff-files "ediff" "\ 7623(autoload 'ediff-files "ediff" "\
7596Run Ediff on a pair of files, FILE-A and FILE-B. 7624Run Ediff on a pair of files, FILE-A and FILE-B.
7597 7625
@@ -7818,10 +7846,50 @@ With optional NODE, goes to that node.
7818 7846
7819\(fn &optional NODE)" t nil) 7847\(fn &optional NODE)" t nil)
7820 7848
7849(autoload 'ediff-files-command "ediff" "\
7850
7851
7852\(fn)" nil nil)
7853
7854(autoload 'ediff3-files-command "ediff" "\
7855
7856
7857\(fn)" nil nil)
7858
7859(autoload 'ediff-merge-command "ediff" "\
7860
7861
7862\(fn)" nil nil)
7863
7864(autoload 'ediff-merge-with-ancestor-command "ediff" "\
7865
7866
7867\(fn)" nil nil)
7868
7869(autoload 'ediff-directories-command "ediff" "\
7870
7871
7872\(fn)" nil nil)
7873
7874(autoload 'ediff-directories3-command "ediff" "\
7875
7876
7877\(fn)" nil nil)
7878
7879(autoload 'ediff-merge-directories-command "ediff" "\
7880
7881
7882\(fn)" nil nil)
7883
7884(autoload 'ediff-merge-directories-with-ancestor-command "ediff" "\
7885
7886
7887\(fn)" nil nil)
7888
7821;;;*** 7889;;;***
7822 7890
7823;;;### (autoloads nil "ediff-help" "vc/ediff-help.el" (20709 26818 7891;;;### (autoloads nil "ediff-help" "vc/ediff-help.el" (20992 52525
7824;;;;;; 907104 0)) 7892;;;;;; 458637 0))
7825;;; Generated autoloads from vc/ediff-help.el 7893;;; Generated autoloads from vc/ediff-help.el
7826 7894
7827(autoload 'ediff-customize "ediff-help" "\ 7895(autoload 'ediff-customize "ediff-help" "\
@@ -7844,8 +7912,8 @@ Display Ediff's registry.
7844 7912
7845;;;*** 7913;;;***
7846 7914
7847;;;### (autoloads nil "ediff-util" "vc/ediff-util.el" (20893 60586 7915;;;### (autoloads nil "ediff-util" "vc/ediff-util.el" (20992 52525
7848;;;;;; 188550 0)) 7916;;;;;; 458637 0))
7849;;; Generated autoloads from vc/ediff-util.el 7917;;; Generated autoloads from vc/ediff-util.el
7850 7918
7851(autoload 'ediff-toggle-multiframe "ediff-util" "\ 7919(autoload 'ediff-toggle-multiframe "ediff-util" "\
@@ -7864,10 +7932,10 @@ To change the default, set the variable `ediff-use-toolbar-p', which see.
7864 7932
7865;;;*** 7933;;;***
7866 7934
7867;;;### (autoloads nil "edmacro" "edmacro.el" (20709 26818 907104 7935;;;### (autoloads nil "edmacro" "edmacro.el" (20964 20753 310858
7868;;;;;; 0)) 7936;;;;;; 446000))
7869;;; Generated autoloads from edmacro.el 7937;;; Generated autoloads from edmacro.el
7870(push (purecopy (quote (edmacro 2 1))) package--builtin-versions) 7938(push (purecopy '(edmacro 2 1)) package--builtin-versions)
7871(autoload 'edit-kbd-macro "edmacro" "\ 7939(autoload 'edit-kbd-macro "edmacro" "\
7872Edit a keyboard macro. 7940Edit a keyboard macro.
7873At the prompt, type any key sequence which is bound to a keyboard macro. 7941At the prompt, type any key sequence which is bound to a keyboard macro.
@@ -7931,7 +7999,7 @@ Turn on EDT Emulation.
7931 7999
7932;;;*** 8000;;;***
7933 8001
7934;;;### (autoloads nil "ehelp" "ehelp.el" (20762 9398 526093 0)) 8002;;;### (autoloads nil "ehelp" "ehelp.el" (20992 52525 458637 0))
7935;;; Generated autoloads from ehelp.el 8003;;; Generated autoloads from ehelp.el
7936 8004
7937(autoload 'with-electric-help "ehelp" "\ 8005(autoload 'with-electric-help "ehelp" "\
@@ -7970,13 +8038,13 @@ BUFFER is put back into its original major mode.
7970;;;### (autoloads nil "eieio" "emacs-lisp/eieio.el" (20930 5097 423575 8038;;;### (autoloads nil "eieio" "emacs-lisp/eieio.el" (20930 5097 423575
7971;;;;;; 701000)) 8039;;;;;; 701000))
7972;;; Generated autoloads from emacs-lisp/eieio.el 8040;;; Generated autoloads from emacs-lisp/eieio.el
7973(push (purecopy (quote (eieio 1 4))) package--builtin-versions) 8041(push (purecopy '(eieio 1 4)) package--builtin-versions)
7974;;;*** 8042;;;***
7975 8043
7976;;;### (autoloads nil "eieio-core" "emacs-lisp/eieio-core.el" (20908 8044;;;### (autoloads nil "eieio-core" "emacs-lisp/eieio-core.el" (20908
7977;;;;;; 27948 216644 0)) 8045;;;;;; 27948 216644 0))
7978;;; Generated autoloads from emacs-lisp/eieio-core.el 8046;;; Generated autoloads from emacs-lisp/eieio-core.el
7979(push (purecopy (quote (eieio-core 1 4))) package--builtin-versions) 8047(push (purecopy '(eieio-core 1 4)) package--builtin-versions)
7980(autoload 'eieio-defclass-autoload "eieio-core" "\ 8048(autoload 'eieio-defclass-autoload "eieio-core" "\
7981Create autoload symbols for the EIEIO class CNAME. 8049Create autoload symbols for the EIEIO class CNAME.
7982SUPERCLASSES are the superclasses that CNAME inherits from. 8050SUPERCLASSES are the superclasses that CNAME inherits from.
@@ -8035,8 +8103,8 @@ Also extracts information about all methods specific to this generic.
8035 8103
8036;;;*** 8104;;;***
8037 8105
8038;;;### (autoloads nil "eldoc" "emacs-lisp/eldoc.el" (20806 59818 8106;;;### (autoloads nil "eldoc" "emacs-lisp/eldoc.el" (21024 28968
8039;;;;;; 347907 0)) 8107;;;;;; 738399 0))
8040;;; Generated autoloads from emacs-lisp/eldoc.el 8108;;; Generated autoloads from emacs-lisp/eldoc.el
8041 8109
8042(defvar eldoc-minor-mode-string (purecopy " ElDoc") "\ 8110(defvar eldoc-minor-mode-string (purecopy " ElDoc") "\
@@ -8289,7 +8357,7 @@ Prompts for bug subject. Leaves you in a mail buffer.
8289 8357
8290;;;*** 8358;;;***
8291 8359
8292;;;### (autoloads nil "emerge" "vc/emerge.el" (20576 42138 697312 8360;;;### (autoloads nil "emerge" "vc/emerge.el" (20992 52525 458637
8293;;;;;; 0)) 8361;;;;;; 0))
8294;;; Generated autoloads from vc/emerge.el 8362;;; Generated autoloads from vc/emerge.el
8295 8363
@@ -8386,7 +8454,7 @@ Commands:
8386 8454
8387;;;*** 8455;;;***
8388 8456
8389;;;### (autoloads nil "epa" "epa.el" (20917 42917 611340 0)) 8457;;;### (autoloads nil "epa" "epa.el" (20978 19624 657047 0))
8390;;; Generated autoloads from epa.el 8458;;; Generated autoloads from epa.el
8391 8459
8392(autoload 'epa-list-keys "epa" "\ 8460(autoload 'epa-list-keys "epa" "\
@@ -8611,7 +8679,7 @@ Encrypt marked files.
8611 8679
8612;;;*** 8680;;;***
8613 8681
8614;;;### (autoloads nil "epa-mail" "epa-mail.el" (20709 26818 907104 8682;;;### (autoloads nil "epa-mail" "epa-mail.el" (20978 19624 657047
8615;;;;;; 0)) 8683;;;;;; 0))
8616;;; Generated autoloads from epa-mail.el 8684;;; Generated autoloads from epa-mail.el
8617 8685
@@ -8648,12 +8716,19 @@ Don't use this command in Lisp programs!
8648\(fn START END SIGNERS MODE)" t nil) 8716\(fn START END SIGNERS MODE)" t nil)
8649 8717
8650(autoload 'epa-mail-encrypt "epa-mail" "\ 8718(autoload 'epa-mail-encrypt "epa-mail" "\
8651Encrypt the current buffer. 8719Encrypt the outgoing mail message in the current buffer.
8652The buffer is expected to contain a mail message. 8720Takes the recipients from the text in the header in the buffer
8721and translates them through `epa-mail-aliases'.
8722With prefix argument, asks you to select among them interactively
8723and also whether and how to sign.
8653 8724
8654Don't use this command in Lisp programs! 8725Called from Lisp, the optional argument RECIPIENTS is a list
8726of recipient addresses, t to perform symmetric encryption,
8727or nil meaning use the defaults.
8655 8728
8656\(fn START END RECIPIENTS SIGN SIGNERS)" t nil) 8729SIGNERS is a list of keys to sign the message with.
8730
8731\(fn &optional RECIPIENTS SIGNERS)" t nil)
8657 8732
8658(autoload 'epa-mail-import-keys "epa-mail" "\ 8733(autoload 'epa-mail-import-keys "epa-mail" "\
8659Import keys in the OpenPGP armor format in the current buffer. 8734Import keys in the OpenPGP armor format in the current buffer.
@@ -8682,9 +8757,9 @@ if ARG is omitted or nil.
8682 8757
8683;;;*** 8758;;;***
8684 8759
8685;;;### (autoloads nil "epg" "epg.el" (20936 7342 261759 0)) 8760;;;### (autoloads nil "epg" "epg.el" (21022 27213 317995 0))
8686;;; Generated autoloads from epg.el 8761;;; Generated autoloads from epg.el
8687(push (purecopy (quote (epg 1 0 0))) package--builtin-versions) 8762(push (purecopy '(epg 1 0 0)) package--builtin-versions)
8688(autoload 'epg-make-context "epg" "\ 8763(autoload 'epg-make-context "epg" "\
8689Return a context object. 8764Return a context object.
8690 8765
@@ -8713,9 +8788,9 @@ Look at CONFIG and try to expand GROUP.
8713 8788
8714;;;*** 8789;;;***
8715 8790
8716;;;### (autoloads nil "erc" "erc/erc.el" (20891 18859 893295 0)) 8791;;;### (autoloads nil "erc" "erc/erc.el" (21013 58662 278539 0))
8717;;; Generated autoloads from erc/erc.el 8792;;; Generated autoloads from erc/erc.el
8718(push (purecopy (quote (erc 5 3))) package--builtin-versions) 8793(push (purecopy '(erc 5 3)) package--builtin-versions)
8719(autoload 'erc-select-read-args "erc" "\ 8794(autoload 'erc-select-read-args "erc" "\
8720Prompt the user for values of nick, server, port, and password. 8795Prompt the user for values of nick, server, port, and password.
8721 8796
@@ -8768,8 +8843,8 @@ Otherwise, connect to HOST:PORT as USER and /join CHANNEL.
8768 8843
8769;;;*** 8844;;;***
8770 8845
8771;;;### (autoloads nil "erc-button" "erc/erc-button.el" (20709 26818 8846;;;### (autoloads nil "erc-button" "erc/erc-button.el" (21013 58662
8772;;;;;; 907104 0)) 8847;;;;;; 278539 0))
8773;;; Generated autoloads from erc/erc-button.el 8848;;; Generated autoloads from erc/erc-button.el
8774 (autoload 'erc-button-mode "erc-button" nil t) 8849 (autoload 'erc-button-mode "erc-button" nil t)
8775 8850
@@ -8945,13 +9020,13 @@ system.
8945;;;### (autoloads nil "erc-lang" "erc/erc-lang.el" (20709 26818 907104 9020;;;### (autoloads nil "erc-lang" "erc/erc-lang.el" (20709 26818 907104
8946;;;;;; 0)) 9021;;;;;; 0))
8947;;; Generated autoloads from erc/erc-lang.el 9022;;; Generated autoloads from erc/erc-lang.el
8948(push (purecopy (quote (erc-lang 1 0 0))) package--builtin-versions) 9023(push (purecopy '(erc-lang 1 0 0)) package--builtin-versions)
8949;;;*** 9024;;;***
8950 9025
8951;;;### (autoloads nil "erc-list" "erc/erc-list.el" (20884 7264 412929 9026;;;### (autoloads nil "erc-list" "erc/erc-list.el" (21013 58662 278539
8952;;;;;; 442000)) 9027;;;;;; 0))
8953;;; Generated autoloads from erc/erc-list.el 9028;;; Generated autoloads from erc/erc-list.el
8954(push (purecopy (quote (erc-list 0 1))) package--builtin-versions) (autoload 'erc-list-mode "erc-list") 9029(push (purecopy '(erc-list 0 1)) package--builtin-versions) (autoload 'erc-list-mode "erc-list")
8955 9030
8956;;;*** 9031;;;***
8957 9032
@@ -9069,8 +9144,8 @@ Interactively select a server to connect to using `erc-server-alist'.
9069 9144
9070;;;*** 9145;;;***
9071 9146
9072;;;### (autoloads nil "erc-notify" "erc/erc-notify.el" (20891 18859 9147;;;### (autoloads nil "erc-notify" "erc/erc-notify.el" (21013 58662
9073;;;;;; 893295 0)) 9148;;;;;; 278539 0))
9074;;; Generated autoloads from erc/erc-notify.el 9149;;; Generated autoloads from erc/erc-notify.el
9075 (autoload 'erc-notify-mode "erc-notify" nil t) 9150 (autoload 'erc-notify-mode "erc-notify" nil t)
9076 9151
@@ -9167,8 +9242,8 @@ This will add a speedbar major display mode.
9167 9242
9168;;;*** 9243;;;***
9169 9244
9170;;;### (autoloads nil "erc-track" "erc/erc-track.el" (20709 26818 9245;;;### (autoloads nil "erc-track" "erc/erc-track.el" (21013 58662
9171;;;;;; 907104 0)) 9246;;;;;; 278539 0))
9172;;; Generated autoloads from erc/erc-track.el 9247;;; Generated autoloads from erc/erc-track.el
9173 9248
9174(defvar erc-track-minor-mode nil "\ 9249(defvar erc-track-minor-mode nil "\
@@ -9225,7 +9300,7 @@ Add a file to `erc-xdcc-files'.
9225 9300
9226;;;*** 9301;;;***
9227 9302
9228;;;### (autoloads nil "ert" "emacs-lisp/ert.el" (20834 39208 838628 9303;;;### (autoloads nil "ert" "emacs-lisp/ert.el" (20998 4934 952905
9229;;;;;; 0)) 9304;;;;;; 0))
9230;;; Generated autoloads from emacs-lisp/ert.el 9305;;; Generated autoloads from emacs-lisp/ert.el
9231 9306
@@ -9304,8 +9379,8 @@ Kill all test buffers that are still live.
9304 9379
9305;;;*** 9380;;;***
9306 9381
9307;;;### (autoloads nil "esh-mode" "eshell/esh-mode.el" (20911 4138 9382;;;### (autoloads nil "esh-mode" "eshell/esh-mode.el" (20992 52525
9308;;;;;; 279475 0)) 9383;;;;;; 458637 0))
9309;;; Generated autoloads from eshell/esh-mode.el 9384;;; Generated autoloads from eshell/esh-mode.el
9310 9385
9311(autoload 'eshell-mode "esh-mode" "\ 9386(autoload 'eshell-mode "esh-mode" "\
@@ -9320,7 +9395,7 @@ Emacs shell interactive mode.
9320;;;### (autoloads nil "eshell" "eshell/eshell.el" (20893 60586 188550 9395;;;### (autoloads nil "eshell" "eshell/eshell.el" (20893 60586 188550
9321;;;;;; 0)) 9396;;;;;; 0))
9322;;; Generated autoloads from eshell/eshell.el 9397;;; Generated autoloads from eshell/eshell.el
9323(push (purecopy (quote (eshell 2 4 2))) package--builtin-versions) 9398(push (purecopy '(eshell 2 4 2)) package--builtin-versions)
9324(autoload 'eshell "eshell" "\ 9399(autoload 'eshell "eshell" "\
9325Create an interactive Eshell buffer. 9400Create an interactive Eshell buffer.
9326The buffer used for Eshell sessions is determined by the value of 9401The buffer used for Eshell sessions is determined by the value of
@@ -9352,7 +9427,7 @@ corresponding to a successful execution.
9352 9427
9353;;;*** 9428;;;***
9354 9429
9355;;;### (autoloads nil "etags" "progmodes/etags.el" (20731 53823 676680 9430;;;### (autoloads nil "etags" "progmodes/etags.el" (20992 52525 458637
9356;;;;;; 0)) 9431;;;;;; 0))
9357;;; Generated autoloads from progmodes/etags.el 9432;;; Generated autoloads from progmodes/etags.el
9358 9433
@@ -9975,7 +10050,7 @@ fourth arg NOSEP non-nil inhibits this.
9975 10050
9976;;;*** 10051;;;***
9977 10052
9978;;;### (autoloads nil "eww" "net/eww.el" (20941 25255 50698 0)) 10053;;;### (autoloads nil "eww" "net/eww.el" (21022 41153 91581 355000))
9979;;; Generated autoloads from net/eww.el 10054;;; Generated autoloads from net/eww.el
9980 10055
9981(autoload 'eww "eww" "\ 10056(autoload 'eww "eww" "\
@@ -10088,7 +10163,7 @@ This is used only in conjunction with `expand-add-abbrevs'.
10088 10163
10089;;;*** 10164;;;***
10090 10165
10091;;;### (autoloads nil "f90" "progmodes/f90.el" (20886 939 575794 10166;;;### (autoloads nil "f90" "progmodes/f90.el" (20992 52525 458637
10092;;;;;; 0)) 10167;;;;;; 0))
10093;;; Generated autoloads from progmodes/f90.el 10168;;; Generated autoloads from progmodes/f90.el
10094 10169
@@ -10318,10 +10393,10 @@ Besides the choice of face, it is the same as `buffer-face-mode'.
10318 10393
10319;;;*** 10394;;;***
10320 10395
10321;;;### (autoloads nil "feedmail" "mail/feedmail.el" (20891 18859 10396;;;### (autoloads nil "feedmail" "mail/feedmail.el" (21002 1963 769129
10322;;;;;; 893295 0)) 10397;;;;;; 0))
10323;;; Generated autoloads from mail/feedmail.el 10398;;; Generated autoloads from mail/feedmail.el
10324(push (purecopy (quote (feedmail 11))) package--builtin-versions) 10399(push (purecopy '(feedmail 11)) package--builtin-versions)
10325(autoload 'feedmail-send-it "feedmail" "\ 10400(autoload 'feedmail-send-it "feedmail" "\
10326Send the current mail buffer using the Feedmail package. 10401Send the current mail buffer using the Feedmail package.
10327This is a suitable value for `send-mail-function'. It can be used 10402This is a suitable value for `send-mail-function'. It can be used
@@ -10372,7 +10447,7 @@ you can set `feedmail-queue-reminder-alist' to nil.
10372 10447
10373;;;*** 10448;;;***
10374 10449
10375;;;### (autoloads nil "ffap" "ffap.el" (20752 26669 524456 0)) 10450;;;### (autoloads nil "ffap" "ffap.el" (20998 4934 952905 0))
10376;;; Generated autoloads from ffap.el 10451;;; Generated autoloads from ffap.el
10377 10452
10378(autoload 'ffap-next "ffap" "\ 10453(autoload 'ffap-next "ffap" "\
@@ -10435,7 +10510,7 @@ Evaluate the forms in variable `ffap-bindings'.
10435 10510
10436;;;*** 10511;;;***
10437 10512
10438;;;### (autoloads nil "filecache" "filecache.el" (20709 26818 907104 10513;;;### (autoloads nil "filecache" "filecache.el" (20998 4934 952905
10439;;;;;; 0)) 10514;;;;;; 0))
10440;;; Generated autoloads from filecache.el 10515;;; Generated autoloads from filecache.el
10441 10516
@@ -10493,6 +10568,19 @@ the name is considered already unique; only the second substitution
10493 10568
10494;;;*** 10569;;;***
10495 10570
10571;;;### (autoloads nil "filenotify" "filenotify.el" (20999 25770 522517
10572;;;;;; 0))
10573;;; Generated autoloads from filenotify.el
10574
10575(autoload 'file-notify-handle-event "filenotify" "\
10576Handle file system monitoring event.
10577If EVENT is a filewatch event, call its callback.
10578Otherwise, signal a `file-notify-error'.
10579
10580\(fn EVENT)" t nil)
10581
10582;;;***
10583
10496;;;### (autoloads nil "files-x" "files-x.el" (20938 49065 383398 10584;;;### (autoloads nil "files-x" "files-x.el" (20938 49065 383398
10497;;;;;; 0)) 10585;;;;;; 0))
10498;;; Generated autoloads from files-x.el 10586;;; Generated autoloads from files-x.el
@@ -10559,7 +10647,7 @@ Copy directory-local variables to the -*- line.
10559 10647
10560;;;*** 10648;;;***
10561 10649
10562;;;### (autoloads nil "filesets" "filesets.el" (20791 9657 561026 10650;;;### (autoloads nil "filesets" "filesets.el" (20999 25770 522517
10563;;;;;; 0)) 10651;;;;;; 0))
10564;;; Generated autoloads from filesets.el 10652;;; Generated autoloads from filesets.el
10565 10653
@@ -10574,7 +10662,7 @@ Set up hooks, load the cache file -- if existing -- and build the menu.
10574;;;### (autoloads nil "find-cmd" "find-cmd.el" (20709 26818 907104 10662;;;### (autoloads nil "find-cmd" "find-cmd.el" (20709 26818 907104
10575;;;;;; 0)) 10663;;;;;; 0))
10576;;; Generated autoloads from find-cmd.el 10664;;; Generated autoloads from find-cmd.el
10577(push (purecopy (quote (find-cmd 0 6))) package--builtin-versions) 10665(push (purecopy '(find-cmd 0 6)) package--builtin-versions)
10578(autoload 'find-cmd "find-cmd" "\ 10666(autoload 'find-cmd "find-cmd" "\
10579Initiate the building of a find command. 10667Initiate the building of a find command.
10580For example: 10668For example:
@@ -10630,7 +10718,7 @@ use in place of \"-ls\" as the final argument.
10630 10718
10631;;;*** 10719;;;***
10632 10720
10633;;;### (autoloads nil "find-file" "find-file.el" (20872 54440 171355 10721;;;### (autoloads nil "find-file" "find-file.el" (20999 25770 522517
10634;;;;;; 0)) 10722;;;;;; 0))
10635;;; Generated autoloads from find-file.el 10723;;; Generated autoloads from find-file.el
10636 10724
@@ -10880,7 +10968,7 @@ Define some key bindings for the find-function family of functions.
10880 10968
10881;;;*** 10969;;;***
10882 10970
10883;;;### (autoloads nil "find-lisp" "find-lisp.el" (20709 26818 907104 10971;;;### (autoloads nil "find-lisp" "find-lisp.el" (20993 35788 926781
10884;;;;;; 0)) 10972;;;;;; 0))
10885;;; Generated autoloads from find-lisp.el 10973;;; Generated autoloads from find-lisp.el
10886 10974
@@ -10895,7 +10983,7 @@ Find all subdirectories of DIR.
10895\(fn DIR)" t nil) 10983\(fn DIR)" t nil)
10896 10984
10897(autoload 'find-lisp-find-dired-filter "find-lisp" "\ 10985(autoload 'find-lisp-find-dired-filter "find-lisp" "\
10898Change the filter on a find-lisp-find-dired buffer to REGEXP. 10986Change the filter on a `find-lisp-find-dired' buffer to REGEXP.
10899 10987
10900\(fn REGEXP)" t nil) 10988\(fn REGEXP)" t nil)
10901 10989
@@ -10903,7 +10991,7 @@ Change the filter on a find-lisp-find-dired buffer to REGEXP.
10903 10991
10904;;;### (autoloads nil "finder" "finder.el" (20925 37032 237257 0)) 10992;;;### (autoloads nil "finder" "finder.el" (20925 37032 237257 0))
10905;;; Generated autoloads from finder.el 10993;;; Generated autoloads from finder.el
10906(push (purecopy (quote (finder 1 0))) package--builtin-versions) 10994(push (purecopy '(finder 1 0)) package--builtin-versions)
10907(autoload 'finder-list-keywords "finder" "\ 10995(autoload 'finder-list-keywords "finder" "\
10908Display descriptions of the keywords in the Finder buffer. 10996Display descriptions of the keywords in the Finder buffer.
10909 10997
@@ -10960,10 +11048,10 @@ to get the effect of a C-q.
10960 11048
10961;;;*** 11049;;;***
10962 11050
10963;;;### (autoloads nil "flymake" "progmodes/flymake.el" (20932 61699 11051;;;### (autoloads nil "flymake" "progmodes/flymake.el" (21019 11047
10964;;;;;; 522706 0)) 11052;;;;;; 84796 0))
10965;;; Generated autoloads from progmodes/flymake.el 11053;;; Generated autoloads from progmodes/flymake.el
10966(push (purecopy (quote (flymake 0 3))) package--builtin-versions) 11054(push (purecopy '(flymake 0 3)) package--builtin-versions)
10967(autoload 'flymake-mode "flymake" "\ 11055(autoload 'flymake-mode "flymake" "\
10968Toggle on-the-fly syntax checking. 11056Toggle on-the-fly syntax checking.
10969With a prefix argument ARG, enable the mode if ARG is positive, 11057With a prefix argument ARG, enable the mode if ARG is positive,
@@ -11063,10 +11151,10 @@ Flyspell whole buffer.
11063;;;### (autoloads nil "foldout" "foldout.el" (20709 26818 907104 11151;;;### (autoloads nil "foldout" "foldout.el" (20709 26818 907104
11064;;;;;; 0)) 11152;;;;;; 0))
11065;;; Generated autoloads from foldout.el 11153;;; Generated autoloads from foldout.el
11066(push (purecopy (quote (foldout 1 10))) package--builtin-versions) 11154(push (purecopy '(foldout 1 10)) package--builtin-versions)
11067;;;*** 11155;;;***
11068 11156
11069;;;### (autoloads nil "follow" "follow.el" (20709 26818 907104 0)) 11157;;;### (autoloads nil "follow" "follow.el" (21005 64551 555603 0))
11070;;; Generated autoloads from follow.el 11158;;; Generated autoloads from follow.el
11071 11159
11072(autoload 'turn-on-follow-mode "follow" "\ 11160(autoload 'turn-on-follow-mode "follow" "\
@@ -11137,7 +11225,7 @@ selected if the original window is the first one in the frame.
11137;;;### (autoloads nil "footnote" "mail/footnote.el" (20709 26818 11225;;;### (autoloads nil "footnote" "mail/footnote.el" (20709 26818
11138;;;;;; 907104 0)) 11226;;;;;; 907104 0))
11139;;; Generated autoloads from mail/footnote.el 11227;;; Generated autoloads from mail/footnote.el
11140(push (purecopy (quote (footnote 0 19))) package--builtin-versions) 11228(push (purecopy '(footnote 0 19)) package--builtin-versions)
11141(autoload 'footnote-mode "footnote" "\ 11229(autoload 'footnote-mode "footnote" "\
11142Toggle Footnote mode. 11230Toggle Footnote mode.
11143With a prefix argument ARG, enable Footnote mode if ARG is 11231With a prefix argument ARG, enable Footnote mode if ARG is
@@ -11153,7 +11241,7 @@ play around with the following keys:
11153 11241
11154;;;*** 11242;;;***
11155 11243
11156;;;### (autoloads nil "forms" "forms.el" (20709 26818 907104 0)) 11244;;;### (autoloads nil "forms" "forms.el" (20999 25770 522517 0))
11157;;; Generated autoloads from forms.el 11245;;; Generated autoloads from forms.el
11158 11246
11159(autoload 'forms-mode "forms" "\ 11247(autoload 'forms-mode "forms" "\
@@ -11189,8 +11277,8 @@ Visit a file in Forms mode in other window.
11189 11277
11190;;;*** 11278;;;***
11191 11279
11192;;;### (autoloads nil "fortran" "progmodes/fortran.el" (20709 26818 11280;;;### (autoloads nil "fortran" "progmodes/fortran.el" (20992 52525
11193;;;;;; 907104 0)) 11281;;;;;; 458637 0))
11194;;; Generated autoloads from progmodes/fortran.el 11282;;; Generated autoloads from progmodes/fortran.el
11195 11283
11196(autoload 'fortran-mode "fortran" "\ 11284(autoload 'fortran-mode "fortran" "\
@@ -11316,14 +11404,175 @@ and choose the directory as the fortune-file.
11316 11404
11317;;;*** 11405;;;***
11318 11406
11407;;;### (autoloads nil "frameset" "frameset.el" (21005 64551 555603
11408;;;;;; 0))
11409;;; Generated autoloads from frameset.el
11410
11411(defvar frameset-session-filter-alist '((name . :never) (left . frameset-filter-iconified) (minibuffer . frameset-filter-minibuffer) (top . frameset-filter-iconified)) "\
11412Minimum set of parameters to filter for live (on-session) framesets.
11413DO NOT MODIFY. See `frameset-filter-alist' for a full description.")
11414
11415(defvar frameset-persistent-filter-alist (nconc '((background-color . frameset-filter-sanitize-color) (buffer-list . :never) (buffer-predicate . :never) (buried-buffer-list . :never) (font . frameset-filter-shelve-param) (foreground-color . frameset-filter-sanitize-color) (fullscreen . frameset-filter-shelve-param) (GUI:font . frameset-filter-unshelve-param) (GUI:fullscreen . frameset-filter-unshelve-param) (GUI:height . frameset-filter-unshelve-param) (GUI:width . frameset-filter-unshelve-param) (height . frameset-filter-shelve-param) (outer-window-id . :never) (parent-id . :never) (tty . frameset-filter-tty-to-GUI) (tty-type . frameset-filter-tty-to-GUI) (width . frameset-filter-shelve-param) (window-id . :never) (window-system . :never)) frameset-session-filter-alist) "\
11416Parameters to filter for persistent framesets.
11417DO NOT MODIFY. See `frameset-filter-alist' for a full description.")
11418
11419(defvar frameset-filter-alist frameset-persistent-filter-alist "\
11420Alist of frame parameters and filtering functions.
11421
11422This alist is the default value of the FILTERS argument of
11423`frameset-save' and `frameset-restore' (which see).
11424
11425Initially, `frameset-filter-alist' is set to, and shares the value of,
11426`frameset-persistent-filter-alist'. You can override any item in
11427this alist by `push'ing a new item onto it. If, for some reason, you
11428intend to modify existing values, do
11429
11430 (setq frameset-filter-alist (copy-tree frameset-filter-alist))
11431
11432before changing anything.
11433
11434On saving, PARAMETERS is the parameter alist of each frame processed,
11435and FILTERED is the parameter alist that gets saved to the frameset.
11436
11437On restoring, PARAMETERS is the parameter alist extracted from the
11438frameset, and FILTERED is the resulting frame parameter alist used
11439to restore the frame.
11440
11441Elements of `frameset-filter-alist' are conses (PARAM . ACTION),
11442where PARAM is a parameter name (a symbol identifying a frame
11443parameter), and ACTION can be:
11444
11445 nil The parameter is copied to FILTERED.
11446 :never The parameter is never copied to FILTERED.
11447 :save The parameter is copied only when saving the frame.
11448 :restore The parameter is copied only when restoring the frame.
11449 FILTER A filter function.
11450
11451FILTER can be a symbol FILTER-FUN, or a list (FILTER-FUN ARGS...).
11452FILTER-FUN is invoked with
11453
11454 (apply FILTER-FUN CURRENT FILTERED PARAMETERS SAVING ARGS)
11455
11456where
11457
11458 CURRENT A cons (PARAM . VALUE), where PARAM is the one being
11459 filtered and VALUE is its current value.
11460 FILTERED The resulting alist (so far).
11461 PARAMETERS The complete alist of parameters being filtered,
11462 SAVING Non-nil if filtering before saving state, nil if filtering
11463 before restoring it.
11464 ARGS Any additional arguments specified in the ACTION.
11465
11466FILTER-FUN is allowed to modify items in FILTERED, but no other arguments.
11467It must return:
11468 nil Skip CURRENT (do not add it to FILTERED).
11469 t Add CURRENT to FILTERED as is.
11470 (NEW-PARAM . NEW-VALUE) Add this to FILTERED instead of CURRENT.
11471
11472Frame parameters not on this alist are passed intact, as if they were
11473defined with ACTION = nil.")
11474
11475(autoload 'frameset-frame-id "frameset" "\
11476Return the frame id of FRAME, if it has one; else, return nil.
11477A frame id is a string that uniquely identifies a frame.
11478It is persistent across `frameset-save' / `frameset-restore'
11479invocations, and once assigned is never changed unless the same
11480frame is duplicated (via `frameset-restore'), in which case the
11481newest frame keeps the id and the old frame's is set to nil.
11482
11483\(fn FRAME)" nil nil)
11484
11485(autoload 'frameset-frame-id-equal-p "frameset" "\
11486Return non-nil if FRAME's id matches ID.
11487
11488\(fn FRAME ID)" nil nil)
11489
11490(autoload 'frameset-frame-with-id "frameset" "\
11491Return the live frame with id ID, if exists; else nil.
11492If FRAME-LIST is a list of frames, check these frames only.
11493If nil, check all live frames.
11494
11495\(fn ID &optional FRAME-LIST)" nil nil)
11496
11497(autoload 'frameset-save "frameset" "\
11498Return a frameset for FRAME-LIST, a list of frames.
11499Dead frames and non-frame objects are silently removed from the list.
11500If nil, FRAME-LIST defaults to the output of `frame-list' (all live frames).
11501APP, NAME and DESCRIPTION are optional data; see the docstring of the
11502`frameset' defstruct for details.
11503FILTERS is an alist of parameter filters; if nil, the value of the variable
11504`frameset-filter-alist' is used instead.
11505PREDICATE is a predicate function, which must return non-nil for frames that
11506should be saved; if PREDICATE is nil, all frames from FRAME-LIST are saved.
11507PROPERTIES is a user-defined property list to add to the frameset.
11508
11509\(fn FRAME-LIST &key APP NAME DESCRIPTION FILTERS PREDICATE PROPERTIES)" nil nil)
11510
11511(autoload 'frameset-restore "frameset" "\
11512Restore a FRAMESET into the current display(s).
11513
11514PREDICATE is a function called with two arguments, the parameter alist
11515and the window-state of the frame being restored, in that order (see
11516the docstring of the `frameset' defstruct for additional details).
11517If PREDICATE returns nil, the frame described by that parameter alist
11518and window-state is not restored.
11519
11520FILTERS is an alist of parameter filters; if nil, the value of
11521`frameset-filter-alist' is used instead.
11522
11523REUSE-FRAMES selects the policy to use to reuse frames when restoring:
11524 t Reuse existing frames if possible, and delete those not reused.
11525 nil Restore frameset in new frames and delete existing frames.
11526 :keep Restore frameset in new frames and keep the existing ones.
11527 LIST A list of frames to reuse; only these are reused (if possible).
11528 Remaining frames in this list are deleted; other frames not
11529 included on the list are left untouched.
11530
11531FORCE-DISPLAY can be:
11532 t Frames are restored in the current display.
11533 nil Frames are restored, if possible, in their original displays.
11534 :delete Frames in other displays are deleted instead of restored.
11535 PRED A function called with two arguments, the parameter alist and
11536 the window state (in that order). It must return t, nil or
11537 `:delete', as above but affecting only the frame that will
11538 be created from that parameter alist.
11539
11540FORCE-ONSCREEN can be:
11541 t Force onscreen only those frames that are fully offscreen.
11542 nil Do not force any frame back onscreen.
11543 :all Force onscreen any frame fully or partially offscreen.
11544 PRED A function called with three arguments,
11545 - the live frame just restored,
11546 - a list (LEFT TOP WIDTH HEIGHT), describing the frame,
11547 - a list (LEFT TOP WIDTH HEIGHT), describing the workarea.
11548 It must return non-nil to force the frame onscreen, nil otherwise.
11549
11550Note the timing and scope of the operations described above: REUSE-FRAMES
11551affects existing frames; PREDICATE, FILTERS and FORCE-DISPLAY affect the frame
11552being restored before that happens; and FORCE-ONSCREEN affects the frame once
11553it has been restored.
11554
11555All keyword parameters default to nil.
11556
11557\(fn FRAMESET &key PREDICATE FILTERS REUSE-FRAMES FORCE-DISPLAY FORCE-ONSCREEN)" nil nil)
11558
11559(autoload 'frameset-to-register "frameset" "\
11560Store the current frameset in register REGISTER.
11561Use \\[jump-to-register] to restore the frameset.
11562Argument is a character, naming the register.
11563
11564\(fn REGISTER &optional ARG)" t nil)
11565
11566;;;***
11567
11319;;;### (autoloads nil "gamegrid" "play/gamegrid.el" (20752 26925 11568;;;### (autoloads nil "gamegrid" "play/gamegrid.el" (20752 26925
11320;;;;;; 124734 677000)) 11569;;;;;; 124734 677000))
11321;;; Generated autoloads from play/gamegrid.el 11570;;; Generated autoloads from play/gamegrid.el
11322(push (purecopy (quote (gamegrid 1 2))) package--builtin-versions) 11571(push (purecopy '(gamegrid 1 2)) package--builtin-versions)
11323;;;*** 11572;;;***
11324 11573
11325;;;### (autoloads nil "gdb-mi" "progmodes/gdb-mi.el" (20932 61687 11574;;;### (autoloads nil "gdb-mi" "progmodes/gdb-mi.el" (20992 52525
11326;;;;;; 205708 148000)) 11575;;;;;; 458637 0))
11327;;; Generated autoloads from progmodes/gdb-mi.el 11576;;; Generated autoloads from progmodes/gdb-mi.el
11328 11577
11329(defvar gdb-enable-debug nil "\ 11578(defvar gdb-enable-debug nil "\
@@ -11551,9 +11800,9 @@ DEFAULT-MAP specifies the default key map for ICON-LIST.
11551 11800
11552;;;*** 11801;;;***
11553 11802
11554;;;### (autoloads nil "gnus" "gnus/gnus.el" (20901 54695 989166 0)) 11803;;;### (autoloads nil "gnus" "gnus/gnus.el" (21002 1963 769129 0))
11555;;; Generated autoloads from gnus/gnus.el 11804;;; Generated autoloads from gnus/gnus.el
11556(push (purecopy (quote (gnus 5 13))) package--builtin-versions)(when (fboundp 'custom-autoload) 11805(push (purecopy '(gnus 5 13)) package--builtin-versions)(when (fboundp 'custom-autoload)
11557 (custom-autoload 'gnus-select-method "gnus")) 11806 (custom-autoload 'gnus-select-method "gnus"))
11558 11807
11559(autoload 'gnus-slave-no-server "gnus" "\ 11808(autoload 'gnus-slave-no-server "gnus" "\
@@ -11691,8 +11940,8 @@ If CLEAN, obsolete (ignore).
11691 11940
11692;;;*** 11941;;;***
11693 11942
11694;;;### (autoloads nil "gnus-art" "gnus/gnus-art.el" (20941 25255 11943;;;### (autoloads nil "gnus-art" "gnus/gnus-art.el" (20977 54298
11695;;;;;; 50698 0)) 11944;;;;;; 858063 0))
11696;;; Generated autoloads from gnus/gnus-art.el 11945;;; Generated autoloads from gnus/gnus-art.el
11697 11946
11698(autoload 'gnus-article-prepare-display "gnus-art" "\ 11947(autoload 'gnus-article-prepare-display "gnus-art" "\
@@ -11768,8 +12017,8 @@ supported.
11768 12017
11769;;;*** 12018;;;***
11770 12019
11771;;;### (autoloads nil "gnus-delay" "gnus/gnus-delay.el" (20791 9657 12020;;;### (autoloads nil "gnus-delay" "gnus/gnus-delay.el" (20988 22031
11772;;;;;; 561026 0)) 12021;;;;;; 837044 0))
11773;;; Generated autoloads from gnus/gnus-delay.el 12022;;; Generated autoloads from gnus/gnus-delay.el
11774 12023
11775(autoload 'gnus-delay-article "gnus-delay" "\ 12024(autoload 'gnus-delay-article "gnus-delay" "\
@@ -11905,8 +12154,8 @@ If gravatars are already displayed, remove them.
11905 12154
11906;;;*** 12155;;;***
11907 12156
11908;;;### (autoloads nil "gnus-group" "gnus/gnus-group.el" (20929 34089 12157;;;### (autoloads nil "gnus-group" "gnus/gnus-group.el" (20988 22031
11909;;;;;; 117790 0)) 12158;;;;;; 837044 0))
11910;;; Generated autoloads from gnus/gnus-group.el 12159;;; Generated autoloads from gnus/gnus-group.el
11911 12160
11912(autoload 'gnus-fetch-group "gnus-group" "\ 12161(autoload 'gnus-fetch-group "gnus-group" "\
@@ -12078,8 +12327,8 @@ Calling (gnus-group-split-fancy nil nil \"mail.others\") returns:
12078 12327
12079;;;*** 12328;;;***
12080 12329
12081;;;### (autoloads nil "gnus-msg" "gnus/gnus-msg.el" (20858 21542 12330;;;### (autoloads nil "gnus-msg" "gnus/gnus-msg.el" (20974 22577
12082;;;;;; 723007 0)) 12331;;;;;; 548213 0))
12083;;; Generated autoloads from gnus/gnus-msg.el 12332;;; Generated autoloads from gnus/gnus-msg.el
12084 12333
12085(autoload 'gnus-msg-mail "gnus-msg" "\ 12334(autoload 'gnus-msg-mail "gnus-msg" "\
@@ -12214,8 +12463,8 @@ Add NUM into sorted LIST by side effect.
12214 12463
12215;;;*** 12464;;;***
12216 12465
12217;;;### (autoloads nil "gnus-registry" "gnus/gnus-registry.el" (20779 12466;;;### (autoloads nil "gnus-registry" "gnus/gnus-registry.el" (20955
12218;;;;;; 18487 859617 0)) 12467;;;;;; 58152 201869 0))
12219;;; Generated autoloads from gnus/gnus-registry.el 12468;;; Generated autoloads from gnus/gnus-registry.el
12220 12469
12221(autoload 'gnus-registry-initialize "gnus-registry" "\ 12470(autoload 'gnus-registry-initialize "gnus-registry" "\
@@ -12269,8 +12518,8 @@ Update the format specification near point.
12269 12518
12270;;;*** 12519;;;***
12271 12520
12272;;;### (autoloads nil "gnus-start" "gnus/gnus-start.el" (20763 30266 12521;;;### (autoloads nil "gnus-start" "gnus/gnus-start.el" (20986 60038
12273;;;;;; 231060 0)) 12522;;;;;; 720063 0))
12274;;; Generated autoloads from gnus/gnus-start.el 12523;;; Generated autoloads from gnus/gnus-start.el
12275 12524
12276(autoload 'gnus-declare-backend "gnus-start" "\ 12525(autoload 'gnus-declare-backend "gnus-start" "\
@@ -12280,8 +12529,8 @@ Declare back end NAME with ABILITIES as a Gnus back end.
12280 12529
12281;;;*** 12530;;;***
12282 12531
12283;;;### (autoloads nil "gnus-sum" "gnus/gnus-sum.el" (20901 54695 12532;;;### (autoloads nil "gnus-sum" "gnus/gnus-sum.el" (20984 58408
12284;;;;;; 989166 0)) 12533;;;;;; 354075 0))
12285;;; Generated autoloads from gnus/gnus-sum.el 12534;;; Generated autoloads from gnus/gnus-sum.el
12286 12535
12287(autoload 'gnus-summary-bookmark-jump "gnus-sum" "\ 12536(autoload 'gnus-summary-bookmark-jump "gnus-sum" "\
@@ -12319,7 +12568,7 @@ Add the window configuration CONF to `gnus-buffer-configuration'.
12319 12568
12320;;;*** 12569;;;***
12321 12570
12322;;;### (autoloads nil "gnutls" "net/gnutls.el" (20709 26818 907104 12571;;;### (autoloads nil "gnutls" "net/gnutls.el" (20998 4934 952905
12323;;;;;; 0)) 12572;;;;;; 0))
12324;;; Generated autoloads from net/gnutls.el 12573;;; Generated autoloads from net/gnutls.el
12325 12574
@@ -12336,7 +12585,7 @@ A value of nil says to use the default GnuTLS value.")
12336 12585
12337;;;*** 12586;;;***
12338 12587
12339;;;### (autoloads nil "gomoku" "play/gomoku.el" (20709 26818 907104 12588;;;### (autoloads nil "gomoku" "play/gomoku.el" (20992 52525 458637
12340;;;;;; 0)) 12589;;;;;; 0))
12341;;; Generated autoloads from play/gomoku.el 12590;;; Generated autoloads from play/gomoku.el
12342 12591
@@ -12688,7 +12937,7 @@ it if ARG is omitted or nil.
12688 12937
12689;;;*** 12938;;;***
12690 12939
12691;;;### (autoloads nil "gv" "emacs-lisp/gv.el" (20709 26818 907104 12940;;;### (autoloads nil "gv" "emacs-lisp/gv.el" (21002 1963 769129
12692;;;;;; 0)) 12941;;;;;; 0))
12693;;; Generated autoloads from emacs-lisp/gv.el 12942;;; Generated autoloads from emacs-lisp/gv.el
12694 12943
@@ -13085,7 +13334,7 @@ Produce a texinfo buffer with sorted doc-strings from the DOC file.
13085 13334
13086;;;*** 13335;;;***
13087 13336
13088;;;### (autoloads nil "help-macro" "help-macro.el" (20709 26818 907104 13337;;;### (autoloads nil "help-macro" "help-macro.el" (20992 52525 458637
13089;;;;;; 0)) 13338;;;;;; 0))
13090;;; Generated autoloads from help-macro.el 13339;;; Generated autoloads from help-macro.el
13091 13340
@@ -13100,7 +13349,7 @@ gives the window that lists the options.")
13100 13349
13101;;;*** 13350;;;***
13102 13351
13103;;;### (autoloads nil "help-mode" "help-mode.el" (20920 19111 869400 13352;;;### (autoloads nil "help-mode" "help-mode.el" (20999 25770 522517
13104;;;;;; 0)) 13353;;;;;; 0))
13105;;; Generated autoloads from help-mode.el 13354;;; Generated autoloads from help-mode.el
13106 13355
@@ -13200,8 +13449,8 @@ BOOKMARK is a bookmark name or a bookmark record.
13200 13449
13201;;;*** 13450;;;***
13202 13451
13203;;;### (autoloads nil "helper" "emacs-lisp/helper.el" (20709 26818 13452;;;### (autoloads nil "helper" "emacs-lisp/helper.el" (20992 52525
13204;;;;;; 907104 0)) 13453;;;;;; 458637 0))
13205;;; Generated autoloads from emacs-lisp/helper.el 13454;;; Generated autoloads from emacs-lisp/helper.el
13206 13455
13207(autoload 'Helper-describe-bindings "helper" "\ 13456(autoload 'Helper-describe-bindings "helper" "\
@@ -13588,7 +13837,7 @@ Unconditionally turn off `hs-minor-mode'.
13588 13837
13589;;;*** 13838;;;***
13590 13839
13591;;;### (autoloads nil "hilit-chg" "hilit-chg.el" (20709 26818 907104 13840;;;### (autoloads nil "hilit-chg" "hilit-chg.el" (20992 52525 458637
13592;;;;;; 0)) 13841;;;;;; 0))
13593;;; Generated autoloads from hilit-chg.el 13842;;; Generated autoloads from hilit-chg.el
13594 13843
@@ -13720,10 +13969,10 @@ See `highlight-changes-mode' for more information on Highlight-Changes mode.
13720 13969
13721;;;*** 13970;;;***
13722 13971
13723;;;### (autoloads nil "hippie-exp" "hippie-exp.el" (20709 26818 907104 13972;;;### (autoloads nil "hippie-exp" "hippie-exp.el" (20992 52525 458637
13724;;;;;; 0)) 13973;;;;;; 0))
13725;;; Generated autoloads from hippie-exp.el 13974;;; Generated autoloads from hippie-exp.el
13726(push (purecopy (quote (hippie-exp 1 6))) package--builtin-versions) 13975(push (purecopy '(hippie-exp 1 6)) package--builtin-versions)
13727(defvar hippie-expand-try-functions-list '(try-complete-file-name-partially try-complete-file-name try-expand-all-abbrevs try-expand-list try-expand-line try-expand-dabbrev try-expand-dabbrev-all-buffers try-expand-dabbrev-from-kill try-complete-lisp-symbol-partially try-complete-lisp-symbol) "\ 13976(defvar hippie-expand-try-functions-list '(try-complete-file-name-partially try-complete-file-name try-expand-all-abbrevs try-expand-list try-expand-line try-expand-dabbrev try-expand-dabbrev-all-buffers try-expand-dabbrev-from-kill try-complete-lisp-symbol-partially try-complete-lisp-symbol) "\
13728The list of expansion functions tried in order by `hippie-expand'. 13977The list of expansion functions tried in order by `hippie-expand'.
13729To change the behavior of `hippie-expand', remove, change the order of, 13978To change the behavior of `hippie-expand', remove, change the order of,
@@ -13752,7 +14001,7 @@ argument VERBOSE non-nil makes the function verbose.
13752 14001
13753;;;*** 14002;;;***
13754 14003
13755;;;### (autoloads nil "hl-line" "hl-line.el" (20709 26818 907104 14004;;;### (autoloads nil "hl-line" "hl-line.el" (20992 52525 458637
13756;;;;;; 0)) 14005;;;;;; 0))
13757;;; Generated autoloads from hl-line.el 14006;;; Generated autoloads from hl-line.el
13758 14007
@@ -13965,7 +14214,7 @@ Convert HTML to plain text in the current buffer.
13965;;;### (autoloads nil "htmlfontify" "htmlfontify.el" (20938 49065 14214;;;### (autoloads nil "htmlfontify" "htmlfontify.el" (20938 49065
13966;;;;;; 383398 0)) 14215;;;;;; 383398 0))
13967;;; Generated autoloads from htmlfontify.el 14216;;; Generated autoloads from htmlfontify.el
13968(push (purecopy (quote (htmlfontify 0 21))) package--builtin-versions) 14217(push (purecopy '(htmlfontify 0 21)) package--builtin-versions)
13969(autoload 'htmlfontify-buffer "htmlfontify" "\ 14218(autoload 'htmlfontify-buffer "htmlfontify" "\
13970Create a new buffer, named for the current buffer + a .html extension, 14219Create a new buffer, named for the current buffer + a .html extension,
13971containing an inline CSS-stylesheet and formatted CSS-markup HTML 14220containing an inline CSS-stylesheet and formatted CSS-markup HTML
@@ -14084,8 +14333,8 @@ bound to the current value of the filter.
14084 14333
14085;;;*** 14334;;;***
14086 14335
14087;;;### (autoloads nil "ibuffer" "ibuffer.el" (20921 40206 193565 14336;;;### (autoloads nil "ibuffer" "ibuffer.el" (20999 25770 522517
14088;;;;;; 167000)) 14337;;;;;; 0))
14089;;; Generated autoloads from ibuffer.el 14338;;; Generated autoloads from ibuffer.el
14090 14339
14091(autoload 'ibuffer-list-buffers "ibuffer" "\ 14340(autoload 'ibuffer-list-buffers "ibuffer" "\
@@ -14127,7 +14376,7 @@ FORMATS is the value to use for `ibuffer-formats'.
14127;;;### (autoloads nil "icalendar" "calendar/icalendar.el" (20709 14376;;;### (autoloads nil "icalendar" "calendar/icalendar.el" (20709
14128;;;;;; 26818 907104 0)) 14377;;;;;; 26818 907104 0))
14129;;; Generated autoloads from calendar/icalendar.el 14378;;; Generated autoloads from calendar/icalendar.el
14130(push (purecopy (quote (icalendar 0 19))) package--builtin-versions) 14379(push (purecopy '(icalendar 0 19)) package--builtin-versions)
14131(autoload 'icalendar-export-file "icalendar" "\ 14380(autoload 'icalendar-export-file "icalendar" "\
14132Export diary file to iCalendar format. 14381Export diary file to iCalendar format.
14133All diary entries in the file DIARY-FILENAME are converted to iCalendar 14382All diary entries in the file DIARY-FILENAME are converted to iCalendar
@@ -14177,7 +14426,7 @@ buffer `*icalendar-errors*'.
14177 14426
14178;;;*** 14427;;;***
14179 14428
14180;;;### (autoloads nil "icomplete" "icomplete.el" (20766 59066 666084 14429;;;### (autoloads nil "icomplete" "icomplete.el" (20992 52525 458637
14181;;;;;; 0)) 14430;;;;;; 0))
14182;;; Generated autoloads from icomplete.el 14431;;; Generated autoloads from icomplete.el
14183 14432
@@ -14270,7 +14519,7 @@ See also the variable `idlwave-shell-prompt-pattern'.
14270;;;### (autoloads nil "idlwave" "progmodes/idlwave.el" (20929 34089 14519;;;### (autoloads nil "idlwave" "progmodes/idlwave.el" (20929 34089
14271;;;;;; 117790 0)) 14520;;;;;; 117790 0))
14272;;; Generated autoloads from progmodes/idlwave.el 14521;;; Generated autoloads from progmodes/idlwave.el
14273(push (purecopy (quote (idlwave 6 1 22))) package--builtin-versions) 14522(push (purecopy '(idlwave 6 1 22)) package--builtin-versions)
14274(autoload 'idlwave-mode "idlwave" "\ 14523(autoload 'idlwave-mode "idlwave" "\
14275Major mode for editing IDL source files (version 6.1_em22). 14524Major mode for editing IDL source files (version 6.1_em22).
14276 14525
@@ -14395,17 +14644,17 @@ The main features of this mode are
14395 14644
14396;;;*** 14645;;;***
14397 14646
14398;;;### (autoloads nil "ido" "ido.el" (20937 28198 475168 0)) 14647;;;### (autoloads nil "ido" "ido.el" (20996 49577 892030 0))
14399;;; Generated autoloads from ido.el 14648;;; Generated autoloads from ido.el
14400 14649
14401(defvar ido-mode nil "\ 14650(defvar ido-mode nil "\
14402Determines for which functional group (buffer and files) ido behavior 14651Determines for which buffer/file Ido should be enabled.
14403should be enabled. The following values are possible: 14652The following values are possible:
14404- `buffer': Turn only on ido buffer behavior (switching, killing, 14653- `buffer': Turn only on ido buffer behavior (switching, killing,
14405 displaying...) 14654 displaying...)
14406- `file': Turn only on ido file behavior (finding, writing, inserting...) 14655- `file': Turn only on ido file behavior (finding, writing, inserting...)
14407- `both': Turn on ido buffer and file behavior. 14656- `both': Turn on ido buffer and file behavior.
14408- `nil': Turn off any ido switching. 14657- nil: Turn off any ido switching.
14409 14658
14410Setting this variable directly does not take effect; 14659Setting this variable directly does not take effect;
14411use either \\[customize] or the function `ido-mode'.") 14660use either \\[customize] or the function `ido-mode'.")
@@ -14681,7 +14930,7 @@ the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'.
14681 14930
14682;;;*** 14931;;;***
14683 14932
14684;;;### (autoloads nil "image" "image.el" (20903 10024 645978 0)) 14933;;;### (autoloads nil "image" "image.el" (21005 64551 555603 0))
14685;;; Generated autoloads from image.el 14934;;; Generated autoloads from image.el
14686 14935
14687(autoload 'image-type-from-data "image" "\ 14936(autoload 'image-type-from-data "image" "\
@@ -14874,10 +15123,10 @@ If Emacs is compiled without ImageMagick support, this does nothing.
14874 15123
14875;;;*** 15124;;;***
14876 15125
14877;;;### (autoloads nil "image-dired" "image-dired.el" (20921 39978 15126;;;### (autoloads nil "image-dired" "image-dired.el" (20971 46377
14878;;;;;; 248467 0)) 15127;;;;;; 737658 0))
14879;;; Generated autoloads from image-dired.el 15128;;; Generated autoloads from image-dired.el
14880(push (purecopy (quote (image-dired 0 4 11))) package--builtin-versions) 15129(push (purecopy '(image-dired 0 4 11)) package--builtin-versions)
14881(autoload 'image-dired-dired-toggle-marked-thumbs "image-dired" "\ 15130(autoload 'image-dired-dired-toggle-marked-thumbs "image-dired" "\
14882Toggle thumbnails in front of file names in the dired buffer. 15131Toggle thumbnails in front of file names in the dired buffer.
14883If no marked file could be found, insert or hide thumbnails on the 15132If no marked file could be found, insert or hide thumbnails on the
@@ -15074,7 +15323,7 @@ An image file is one whose name has an extension in
15074 15323
15075;;;*** 15324;;;***
15076 15325
15077;;;### (autoloads nil "image-mode" "image-mode.el" (20899 12965 791908 15326;;;### (autoloads nil "image-mode" "image-mode.el" (21005 64551 555603
15078;;;;;; 0)) 15327;;;;;; 0))
15079;;; Generated autoloads from image-mode.el 15328;;; Generated autoloads from image-mode.el
15080 15329
@@ -15083,6 +15332,9 @@ Major mode for image files.
15083You can use \\<image-mode-map>\\[image-toggle-display] 15332You can use \\<image-mode-map>\\[image-toggle-display]
15084to toggle between display as an image and display as text. 15333to toggle between display as an image and display as text.
15085 15334
15335Key bindings:
15336\\{image-mode-map}
15337
15086\(fn)" t nil) 15338\(fn)" t nil)
15087 15339
15088(autoload 'image-minor-mode "image-mode" "\ 15340(autoload 'image-minor-mode "image-mode" "\
@@ -15307,7 +15559,7 @@ of `inferior-lisp-program'). Runs the hooks from
15307 15559
15308;;;*** 15560;;;***
15309 15561
15310;;;### (autoloads nil "info" "info.el" (20940 4391 641153 0)) 15562;;;### (autoloads nil "info" "info.el" (20992 52525 458637 0))
15311;;; Generated autoloads from info.el 15563;;; Generated autoloads from info.el
15312 15564
15313(defcustom Info-default-directory-list (let* ((config-dir (file-name-as-directory (or (and (featurep 'ns) (let ((dir (expand-file-name "../info" data-directory))) (if (file-directory-p dir) dir))) configure-info-directory))) (prefixes (prune-directory-list '("/usr/local/" "/usr/" "/opt/" "/"))) (suffixes '("share/" "" "gnu/" "gnu/lib/" "gnu/lib/emacs/" "emacs/" "lib/" "lib/emacs/")) (standard-info-dirs (apply #'nconc (mapcar (lambda (pfx) (let ((dirs (mapcar (lambda (sfx) (concat pfx sfx "info/")) suffixes))) (prune-directory-list dirs))) prefixes))) (dirs (if (member config-dir standard-info-dirs) (nconc standard-info-dirs (list config-dir)) (cons config-dir standard-info-dirs)))) (if (not (eq system-type 'windows-nt)) dirs (let* ((instdir (file-name-directory invocation-directory)) (dir1 (expand-file-name "../info/" instdir)) (dir2 (expand-file-name "../../../info/" instdir))) (cond ((file-exists-p dir1) (append dirs (list dir1))) ((file-exists-p dir2) (append dirs (list dir2))) (t dirs))))) "\ 15565(defcustom Info-default-directory-list (let* ((config-dir (file-name-as-directory (or (and (featurep 'ns) (let ((dir (expand-file-name "../info" data-directory))) (if (file-directory-p dir) dir))) configure-info-directory))) (prefixes (prune-directory-list '("/usr/local/" "/usr/" "/opt/" "/"))) (suffixes '("share/" "" "gnu/" "gnu/lib/" "gnu/lib/emacs/" "emacs/" "lib/" "lib/emacs/")) (standard-info-dirs (apply #'nconc (mapcar (lambda (pfx) (let ((dirs (mapcar (lambda (sfx) (concat pfx sfx "info/")) suffixes))) (prune-directory-list dirs))) prefixes))) (dirs (if (member config-dir standard-info-dirs) (nconc standard-info-dirs (list config-dir)) (cons config-dir standard-info-dirs)))) (if (not (eq system-type 'windows-nt)) dirs (let* ((instdir (file-name-directory invocation-directory)) (dir1 (expand-file-name "../info/" instdir)) (dir2 (expand-file-name "../../../info/" instdir))) (cond ((file-exists-p dir1) (append dirs (list dir1))) ((file-exists-p dir2) (append dirs (list dir2))) (t dirs))))) "\
@@ -15566,10 +15818,10 @@ Perform completion on file preceding point.
15566 15818
15567;;;*** 15819;;;***
15568 15820
15569;;;### (autoloads nil "info-xref" "info-xref.el" (20938 49065 383398 15821;;;### (autoloads nil "info-xref" "info-xref.el" (20947 64044 876888
15570;;;;;; 0)) 15822;;;;;; 0))
15571;;; Generated autoloads from info-xref.el 15823;;; Generated autoloads from info-xref.el
15572(push (purecopy (quote (info-xref 3))) package--builtin-versions) 15824(push (purecopy '(info-xref 3)) package--builtin-versions)
15573(autoload 'info-xref-check "info-xref" "\ 15825(autoload 'info-xref-check "info-xref" "\
15574Check external references in FILENAME, an info document. 15826Check external references in FILENAME, an info document.
15575Interactively from an `Info-mode' or `texinfo-mode' buffer the 15827Interactively from an `Info-mode' or `texinfo-mode' buffer the
@@ -15698,7 +15950,7 @@ For example, invoke \"emacs -batch -f batch-info-validate $info/ ~/*.info\"
15698;;;### (autoloads nil "inversion" "cedet/inversion.el" (20745 310 15950;;;### (autoloads nil "inversion" "cedet/inversion.el" (20745 310
15699;;;;;; 425822 0)) 15951;;;;;; 425822 0))
15700;;; Generated autoloads from cedet/inversion.el 15952;;; Generated autoloads from cedet/inversion.el
15701(push (purecopy (quote (inversion 1 3))) package--builtin-versions) 15953(push (purecopy '(inversion 1 3)) package--builtin-versions)
15702(autoload 'inversion-require-emacs "inversion" "\ 15954(autoload 'inversion-require-emacs "inversion" "\
15703Declare that you need either EMACS-VER, XEMACS-VER or SXEMACS-ver. 15955Declare that you need either EMACS-VER, XEMACS-VER or SXEMACS-ver.
15704Only checks one based on which kind of Emacs is being run. 15956Only checks one based on which kind of Emacs is being run.
@@ -15731,7 +15983,7 @@ Toggle input method in interactive search.
15731;;;### (autoloads nil "isearchb" "isearchb.el" (20709 26818 907104 15983;;;### (autoloads nil "isearchb" "isearchb.el" (20709 26818 907104
15732;;;;;; 0)) 15984;;;;;; 0))
15733;;; Generated autoloads from isearchb.el 15985;;; Generated autoloads from isearchb.el
15734(push (purecopy (quote (isearchb 1 5))) package--builtin-versions) 15986(push (purecopy '(isearchb 1 5)) package--builtin-versions)
15735(autoload 'isearchb-activate "isearchb" "\ 15987(autoload 'isearchb-activate "isearchb" "\
15736Active isearchb mode for subsequent alphanumeric keystrokes. 15988Active isearchb mode for subsequent alphanumeric keystrokes.
15737Executing this command again will terminate the search; or, if 15989Executing this command again will terminate the search; or, if
@@ -15841,8 +16093,8 @@ Add submenus to the File menu, to convert to and from various formats.
15841 16093
15842;;;*** 16094;;;***
15843 16095
15844;;;### (autoloads nil "ispell" "textmodes/ispell.el" (20847 51240 16096;;;### (autoloads nil "ispell" "textmodes/ispell.el" (20992 52525
15845;;;;;; 240216 0)) 16097;;;;;; 458637 0))
15846;;; Generated autoloads from textmodes/ispell.el 16098;;; Generated autoloads from textmodes/ispell.el
15847 16099
15848(put 'ispell-check-comments 'safe-local-variable (lambda (a) (memq a '(nil t exclusive)))) 16100(put 'ispell-check-comments 'safe-local-variable (lambda (a) (memq a '(nil t exclusive))))
@@ -16179,7 +16431,7 @@ If non-nil, second arg INITIAL-INPUT is a string to insert before reading.
16179 16431
16180;;;*** 16432;;;***
16181 16433
16182;;;### (autoloads nil "jka-compr" "jka-compr.el" (20759 33211 414988 16434;;;### (autoloads nil "jka-compr" "jka-compr.el" (20998 4934 952905
16183;;;;;; 0)) 16435;;;;;; 0))
16184;;; Generated autoloads from jka-compr.el 16436;;; Generated autoloads from jka-compr.el
16185 16437
@@ -16203,10 +16455,9 @@ by `jka-compr-installed'.
16203 16455
16204;;;*** 16456;;;***
16205 16457
16206;;;### (autoloads nil "js" "progmodes/js.el" (20895 15912 444844 16458;;;### (autoloads nil "js" "progmodes/js.el" (20998 4934 952905 0))
16207;;;;;; 0))
16208;;; Generated autoloads from progmodes/js.el 16459;;; Generated autoloads from progmodes/js.el
16209(push (purecopy (quote (js 9))) package--builtin-versions) 16460(push (purecopy '(js 9)) package--builtin-versions)
16210(autoload 'js-mode "js" "\ 16461(autoload 'js-mode "js" "\
16211Major mode for editing JavaScript. 16462Major mode for editing JavaScript.
16212 16463
@@ -16215,9 +16466,9 @@ Major mode for editing JavaScript.
16215 16466
16216;;;*** 16467;;;***
16217 16468
16218;;;### (autoloads nil "json" "json.el" (20709 26818 907104 0)) 16469;;;### (autoloads nil "json" "json.el" (20998 4934 952905 0))
16219;;; Generated autoloads from json.el 16470;;; Generated autoloads from json.el
16220(push (purecopy (quote (json 1 4))) package--builtin-versions) 16471(push (purecopy '(json 1 4)) package--builtin-versions)
16221;;;*** 16472;;;***
16222 16473
16223;;;### (autoloads nil "keypad" "emulation/keypad.el" (20709 26818 16474;;;### (autoloads nil "keypad" "emulation/keypad.el" (20709 26818
@@ -16298,7 +16549,7 @@ the context of text formatting.
16298 16549
16299;;;*** 16550;;;***
16300 16551
16301;;;### (autoloads nil "kkc" "international/kkc.el" (20799 169 640767 16552;;;### (autoloads nil "kkc" "international/kkc.el" (20998 4934 952905
16302;;;;;; 0)) 16553;;;;;; 0))
16303;;; Generated autoloads from international/kkc.el 16554;;; Generated autoloads from international/kkc.el
16304 16555
@@ -16447,8 +16698,8 @@ The kind of Korean keyboard for Korean input method.
16447 16698
16448;;;*** 16699;;;***
16449 16700
16450;;;### (autoloads nil "landmark" "play/landmark.el" (20709 26818 16701;;;### (autoloads nil "landmark" "play/landmark.el" (20992 52525
16451;;;;;; 907104 0)) 16702;;;;;; 458637 0))
16452;;; Generated autoloads from play/landmark.el 16703;;; Generated autoloads from play/landmark.el
16453 16704
16454(defalias 'landmark-repeat 'landmark-test-run) 16705(defalias 'landmark-repeat 'landmark-test-run)
@@ -16601,7 +16852,7 @@ A major mode to edit GNU ld script files
16601 16852
16602;;;*** 16853;;;***
16603 16854
16604;;;### (autoloads nil "life" "play/life.el" (20709 26818 907104 0)) 16855;;;### (autoloads nil "life" "play/life.el" (20998 4934 952905 0))
16605;;; Generated autoloads from play/life.el 16856;;; Generated autoloads from play/life.el
16606 16857
16607(autoload 'life "life" "\ 16858(autoload 'life "life" "\
@@ -16616,7 +16867,7 @@ generations (this defaults to 1).
16616 16867
16617;;;### (autoloads nil "linum" "linum.el" (20709 26818 907104 0)) 16868;;;### (autoloads nil "linum" "linum.el" (20709 26818 907104 0))
16618;;; Generated autoloads from linum.el 16869;;; Generated autoloads from linum.el
16619(push (purecopy (quote (linum 0 9 24))) package--builtin-versions) 16870(push (purecopy '(linum 0 9 24)) package--builtin-versions)
16620(autoload 'linum-mode "linum" "\ 16871(autoload 'linum-mode "linum" "\
16621Toggle display of line numbers in the left margin (Linum mode). 16872Toggle display of line numbers in the left margin (Linum mode).
16622With a prefix argument ARG, enable Linum mode if ARG is positive, 16873With a prefix argument ARG, enable Linum mode if ARG is positive,
@@ -16766,7 +17017,7 @@ done. Otherwise, it uses the current buffer.
16766 17017
16767;;;*** 17018;;;***
16768 17019
16769;;;### (autoloads nil "log-view" "vc/log-view.el" (20918 63784 852859 17020;;;### (autoloads nil "log-view" "vc/log-view.el" (20986 13739 89657
16770;;;;;; 0)) 17021;;;;;; 0))
16771;;; Generated autoloads from vc/log-view.el 17022;;; Generated autoloads from vc/log-view.el
16772 17023
@@ -16777,7 +17028,7 @@ Major mode for browsing CVS log output.
16777 17028
16778;;;*** 17029;;;***
16779 17030
16780;;;### (autoloads nil "lpr" "lpr.el" (20878 6823 881439 0)) 17031;;;### (autoloads nil "lpr" "lpr.el" (20975 43430 521692 0))
16781;;; Generated autoloads from lpr.el 17032;;; Generated autoloads from lpr.el
16782 17033
16783(defvar lpr-windows-system (memq system-type '(ms-dos windows-nt)) "\ 17034(defvar lpr-windows-system (memq system-type '(ms-dos windows-nt)) "\
@@ -17184,8 +17435,8 @@ double-quotes.
17184 17435
17185;;;*** 17436;;;***
17186 17437
17187;;;### (autoloads nil "mailalias" "mail/mailalias.el" (20709 26818 17438;;;### (autoloads nil "mailalias" "mail/mailalias.el" (20970 25513
17188;;;;;; 907104 0)) 17439;;;;;; 362767 0))
17189;;; Generated autoloads from mail/mailalias.el 17440;;; Generated autoloads from mail/mailalias.el
17190 17441
17191(defvar mail-complete-style 'angles "\ 17442(defvar mail-complete-style 'angles "\
@@ -17437,7 +17688,7 @@ Default bookmark handler for Man buffers.
17437 17688
17438;;;### (autoloads nil "master" "master.el" (20884 7264 912957 506000)) 17689;;;### (autoloads nil "master" "master.el" (20884 7264 912957 506000))
17439;;; Generated autoloads from master.el 17690;;; Generated autoloads from master.el
17440(push (purecopy (quote (master 1 0 2))) package--builtin-versions) 17691(push (purecopy '(master 1 0 2)) package--builtin-versions)
17441(autoload 'master-mode "master" "\ 17692(autoload 'master-mode "master" "\
17442Toggle Master mode. 17693Toggle Master mode.
17443With a prefix argument ARG, enable Master mode if ARG is 17694With a prefix argument ARG, enable Master mode if ARG is
@@ -17487,10 +17738,10 @@ recursion depth in the minibuffer prompt. This is only useful if
17487 17738
17488;;;### (autoloads nil "md4" "md4.el" (20709 26818 907104 0)) 17739;;;### (autoloads nil "md4" "md4.el" (20709 26818 907104 0))
17489;;; Generated autoloads from md4.el 17740;;; Generated autoloads from md4.el
17490(push (purecopy (quote (md4 1 0))) package--builtin-versions) 17741(push (purecopy '(md4 1 0)) package--builtin-versions)
17491;;;*** 17742;;;***
17492 17743
17493;;;### (autoloads nil "message" "gnus/message.el" (20889 63525 775294 17744;;;### (autoloads nil "message" "gnus/message.el" (20986 60038 720063
17494;;;;;; 0)) 17745;;;;;; 0))
17495;;; Generated autoloads from gnus/message.el 17746;;; Generated autoloads from gnus/message.el
17496 17747
@@ -17659,7 +17910,7 @@ which specify the range to operate on.
17659;;;### (autoloads nil "meta-mode" "progmodes/meta-mode.el" (20874 17910;;;### (autoloads nil "meta-mode" "progmodes/meta-mode.el" (20874
17660;;;;;; 62962 290468 0)) 17911;;;;;; 62962 290468 0))
17661;;; Generated autoloads from progmodes/meta-mode.el 17912;;; Generated autoloads from progmodes/meta-mode.el
17662(push (purecopy (quote (meta-mode 1 0))) package--builtin-versions) 17913(push (purecopy '(meta-mode 1 0)) package--builtin-versions)
17663(autoload 'metafont-mode "meta-mode" "\ 17914(autoload 'metafont-mode "meta-mode" "\
17664Major mode for editing Metafont sources. 17915Major mode for editing Metafont sources.
17665 17916
@@ -17807,9 +18058,9 @@ delete the draft message.
17807 18058
17808;;;*** 18059;;;***
17809 18060
17810;;;### (autoloads nil "mh-e" "mh-e/mh-e.el" (20874 65006 672942 217000)) 18061;;;### (autoloads nil "mh-e" "mh-e/mh-e.el" (20987 34598 970563 0))
17811;;; Generated autoloads from mh-e/mh-e.el 18062;;; Generated autoloads from mh-e/mh-e.el
17812(push (purecopy (quote (mh-e 8 5))) package--builtin-versions) 18063(push (purecopy '(mh-e 8 5)) package--builtin-versions)
17813(put 'mh-progs 'risky-local-variable t) 18064(put 'mh-progs 'risky-local-variable t)
17814 18065
17815(put 'mh-lib 'risky-local-variable t) 18066(put 'mh-lib 'risky-local-variable t)
@@ -18072,10 +18323,10 @@ whose file names match the specified wildcard.
18072 18323
18073;;;*** 18324;;;***
18074 18325
18075;;;### (autoloads nil "mixal-mode" "progmodes/mixal-mode.el" (20709 18326;;;### (autoloads nil "mixal-mode" "progmodes/mixal-mode.el" (21002
18076;;;;;; 26818 907104 0)) 18327;;;;;; 1963 769129 0))
18077;;; Generated autoloads from progmodes/mixal-mode.el 18328;;; Generated autoloads from progmodes/mixal-mode.el
18078(push (purecopy (quote (mixal-mode 0 1))) package--builtin-versions) 18329(push (purecopy '(mixal-mode 0 1)) package--builtin-versions)
18079(autoload 'mixal-mode "mixal-mode" "\ 18330(autoload 'mixal-mode "mixal-mode" "\
18080Major mode for the mixal asm language. 18331Major mode for the mixal asm language.
18081 18332
@@ -18205,7 +18456,7 @@ body) or \"attachment\" (separate from the body).
18205 18456
18206;;;*** 18457;;;***
18207 18458
18208;;;### (autoloads nil "mml2015" "gnus/mml2015.el" (20922 60838 997229 18459;;;### (autoloads nil "mml2015" "gnus/mml2015.el" (20986 60038 720063
18209;;;;;; 0)) 18460;;;;;; 0))
18210;;; Generated autoloads from gnus/mml2015.el 18461;;; Generated autoloads from gnus/mml2015.el
18211 18462
@@ -18314,7 +18565,7 @@ Convert NATO phonetic alphabet in region to ordinary ASCII text.
18314 18565
18315;;;*** 18566;;;***
18316 18567
18317;;;### (autoloads nil "mouse-drag" "mouse-drag.el" (20709 26818 907104 18568;;;### (autoloads nil "mouse-drag" "mouse-drag.el" (20992 52525 458637
18318;;;;;; 0)) 18569;;;;;; 0))
18319;;; Generated autoloads from mouse-drag.el 18570;;; Generated autoloads from mouse-drag.el
18320 18571
@@ -18362,7 +18613,7 @@ To test this function, evaluate:
18362 18613
18363;;;*** 18614;;;***
18364 18615
18365;;;### (autoloads nil "mpc" "mpc.el" (20838 36262 626321 0)) 18616;;;### (autoloads nil "mpc" "mpc.el" (20998 4934 952905 0))
18366;;; Generated autoloads from mpc.el 18617;;; Generated autoloads from mpc.el
18367 18618
18368(autoload 'mpc "mpc" "\ 18619(autoload 'mpc "mpc" "\
@@ -18382,7 +18633,7 @@ Multiplication puzzle with GNU Emacs.
18382 18633
18383;;;*** 18634;;;***
18384 18635
18385;;;### (autoloads nil "msb" "msb.el" (20709 26818 907104 0)) 18636;;;### (autoloads nil "msb" "msb.el" (20999 25770 522517 0))
18386;;; Generated autoloads from msb.el 18637;;; Generated autoloads from msb.el
18387 18638
18388(defvar msb-mode nil "\ 18639(defvar msb-mode nil "\
@@ -18540,8 +18791,8 @@ The default is 20. If LIMIT is negative, do not limit the listing.
18540 18791
18541;;;*** 18792;;;***
18542 18793
18543;;;### (autoloads nil "mule-util" "international/mule-util.el" (20826 18794;;;### (autoloads nil "mule-util" "international/mule-util.el" (20991
18544;;;;;; 45095 436233 0)) 18795;;;;;; 31656 363459 0))
18545;;; Generated autoloads from international/mule-util.el 18796;;; Generated autoloads from international/mule-util.el
18546 18797
18547(defsubst string-to-list (string) "\ 18798(defsubst string-to-list (string) "\
@@ -18672,92 +18923,6 @@ per-character basis, this may not be accurate.
18672 18923
18673;;;*** 18924;;;***
18674 18925
18675;;;### (autoloads nil "nadvice" "emacs-lisp/nadvice.el" (20940 4391
18676;;;;;; 641153 0))
18677;;; Generated autoloads from emacs-lisp/nadvice.el
18678
18679(autoload 'advice--remove-function "nadvice" "\
18680
18681
18682\(fn FLIST FUNCTION)" nil nil)
18683
18684(autoload 'advice--buffer-local "nadvice" "\
18685Buffer-local value of VAR, presumed to contain a function.
18686
18687\(fn VAR)" nil nil)
18688
18689(autoload 'add-function "nadvice" "\
18690Add a piece of advice on the function stored at PLACE.
18691FUNCTION describes the code to add. WHERE describes where to add it.
18692WHERE can be explained by showing the resulting new function, as the
18693result of combining FUNCTION and the previous value of PLACE, which we
18694call OLDFUN here:
18695`:before' (lambda (&rest r) (apply FUNCTION r) (apply OLDFUN r))
18696`:after' (lambda (&rest r) (prog1 (apply OLDFUN r) (apply FUNCTION r)))
18697`:around' (lambda (&rest r) (apply FUNCTION OLDFUN r))
18698`:override' (lambda (&rest r) (apply FUNCTION r))
18699`:before-while' (lambda (&rest r) (and (apply FUNCTION r) (apply OLDFUN r)))
18700`:before-until' (lambda (&rest r) (or (apply FUNCTION r) (apply OLDFUN r)))
18701`:after-while' (lambda (&rest r) (and (apply OLDFUN r) (apply FUNCTION r)))
18702`:after-until' (lambda (&rest r) (or (apply OLDFUN r) (apply FUNCTION r)))
18703`:filter-args' (lambda (&rest r) (apply OLDFUN (funcall FUNCTION r)))
18704`:filter-return'(lambda (&rest r) (funcall FUNCTION (apply OLDFUN r)))
18705If FUNCTION was already added, do nothing.
18706PROPS is an alist of additional properties, among which the following have
18707a special meaning:
18708- `name': a string or symbol. It can be used to refer to this piece of advice.
18709
18710If PLACE is a simple variable, only its global value will be affected.
18711Use (local 'VAR) if you want to apply FUNCTION to VAR buffer-locally.
18712
18713If one of FUNCTION or OLDFUN is interactive, then the resulting function
18714is also interactive. There are 3 cases:
18715- FUNCTION is not interactive: the interactive spec of OLDFUN is used.
18716- The interactive spec of FUNCTION is itself a function: it should take one
18717 argument (the interactive spec of OLDFUN, which it can pass to
18718 `advice-eval-interactive-spec') and return the list of arguments to use.
18719- Else, use the interactive spec of FUNCTION and ignore the one of OLDFUN.
18720
18721\(fn WHERE PLACE FUNCTION &optional PROPS)" nil t)
18722
18723(autoload 'advice--add-function "nadvice" "\
18724
18725
18726\(fn WHERE REF FUNCTION PROPS)" nil nil)
18727
18728(autoload 'remove-function "nadvice" "\
18729Remove the FUNCTION piece of advice from PLACE.
18730If FUNCTION was not added to PLACE, do nothing.
18731Instead of FUNCTION being the actual function, it can also be the `name'
18732of the piece of advice.
18733
18734\(fn PLACE FUNCTION)" nil t)
18735
18736(autoload 'advice-add "nadvice" "\
18737Like `add-function' but for the function named SYMBOL.
18738Contrary to `add-function', this will properly handle the cases where SYMBOL
18739is defined as a macro, alias, command, ...
18740
18741\(fn SYMBOL WHERE FUNCTION &optional PROPS)" nil nil)
18742
18743(autoload 'advice-remove "nadvice" "\
18744Like `remove-function' but for the function named SYMBOL.
18745Contrary to `remove-function', this also works when SYMBOL is a macro
18746or an autoload and it preserves `fboundp'.
18747Instead of the actual function to remove, FUNCTION can also be the `name'
18748of the piece of advice.
18749
18750\(fn SYMBOL FUNCTION)" nil nil)
18751
18752(autoload 'advice-member-p "nadvice" "\
18753Return non-nil if ADVICE has been added to FUNCTION-NAME.
18754Instead of ADVICE being the actual function, it can also be the `name'
18755of the piece of advice.
18756
18757\(fn ADVICE FUNCTION-NAME)" nil nil)
18758
18759;;;***
18760
18761;;;### (autoloads nil "net-utils" "net/net-utils.el" (20903 10024 18926;;;### (autoloads nil "net-utils" "net/net-utils.el" (20903 10024
18762;;;;;; 645978 0)) 18927;;;;;; 645978 0))
18763;;; Generated autoloads from net/net-utils.el 18928;;; Generated autoloads from net/net-utils.el
@@ -18866,8 +19031,8 @@ listed in the PORTS list.
18866 19031
18867;;;*** 19032;;;***
18868 19033
18869;;;### (autoloads nil "network-stream" "net/network-stream.el" (20770 19034;;;### (autoloads nil "network-stream" "net/network-stream.el" (20984
18870;;;;;; 3512 176098 0)) 19035;;;;;; 58408 354075 0))
18871;;; Generated autoloads from net/network-stream.el 19036;;; Generated autoloads from net/network-stream.el
18872 19037
18873(autoload 'open-network-stream "network-stream" "\ 19038(autoload 'open-network-stream "network-stream" "\
@@ -18948,6 +19113,9 @@ values:
18948:use-starttls-if-possible is a boolean that says to do opportunistic 19113:use-starttls-if-possible is a boolean that says to do opportunistic
18949STARTTLS upgrades even if Emacs doesn't have built-in TLS functionality. 19114STARTTLS upgrades even if Emacs doesn't have built-in TLS functionality.
18950 19115
19116:nogreeting is a boolean that can be used to inhibit waiting for
19117a greeting from the server.
19118
18951:nowait is a boolean that says the connection should be made 19119:nowait is a boolean that says the connection should be made
18952 asynchronously, if possible. 19120 asynchronously, if possible.
18953 19121
@@ -18980,7 +19148,7 @@ Run `newsticker-start-hook' if newsticker was not running already.
18980;;;*** 19148;;;***
18981 19149
18982;;;### (autoloads nil "newst-plainview" "net/newst-plainview.el" 19150;;;### (autoloads nil "newst-plainview" "net/newst-plainview.el"
18983;;;;;; (20762 9398 526093 0)) 19151;;;;;; (20992 52525 458637 0))
18984;;; Generated autoloads from net/newst-plainview.el 19152;;; Generated autoloads from net/newst-plainview.el
18985 19153
18986(autoload 'newsticker-plainview "newst-plainview" "\ 19154(autoload 'newsticker-plainview "newst-plainview" "\
@@ -19036,7 +19204,7 @@ Start newsticker treeview.
19036;;;### (autoloads nil "newsticker" "net/newsticker.el" (20709 26818 19204;;;### (autoloads nil "newsticker" "net/newsticker.el" (20709 26818
19037;;;;;; 907104 0)) 19205;;;;;; 907104 0))
19038;;; Generated autoloads from net/newsticker.el 19206;;; Generated autoloads from net/newsticker.el
19039(push (purecopy (quote (newsticker 1 99))) package--builtin-versions) 19207(push (purecopy '(newsticker 1 99)) package--builtin-versions)
19040;;;*** 19208;;;***
19041 19209
19042;;;### (autoloads nil "nndiary" "gnus/nndiary.el" (20709 26818 907104 19210;;;### (autoloads nil "nndiary" "gnus/nndiary.el" (20709 26818 907104
@@ -19080,10 +19248,10 @@ This command does not work if you use short group names.
19080;;;### (autoloads nil "nnmairix" "gnus/nnmairix.el" (20709 26818 19248;;;### (autoloads nil "nnmairix" "gnus/nnmairix.el" (20709 26818
19081;;;;;; 907104 0)) 19249;;;;;; 907104 0))
19082;;; Generated autoloads from gnus/nnmairix.el 19250;;; Generated autoloads from gnus/nnmairix.el
19083(push (purecopy (quote (nnmairix 0 6))) package--builtin-versions) 19251(push (purecopy '(nnmairix 0 6)) package--builtin-versions)
19084;;;*** 19252;;;***
19085 19253
19086;;;### (autoloads nil "nnml" "gnus/nnml.el" (20709 26818 907104 0)) 19254;;;### (autoloads nil "nnml" "gnus/nnml.el" (20955 58152 201869 0))
19087;;; Generated autoloads from gnus/nnml.el 19255;;; Generated autoloads from gnus/nnml.el
19088 19256
19089(autoload 'nnml-generate-nov-databases "nnml" "\ 19257(autoload 'nnml-generate-nov-databases "nnml" "\
@@ -19142,7 +19310,7 @@ closing requests for requests that are used in matched pairs.
19142 19310
19143;;;### (autoloads nil "ntlm" "net/ntlm.el" (20709 26818 907104 0)) 19311;;;### (autoloads nil "ntlm" "net/ntlm.el" (20709 26818 907104 0))
19144;;; Generated autoloads from net/ntlm.el 19312;;; Generated autoloads from net/ntlm.el
19145(push (purecopy (quote (ntlm 1 0))) package--builtin-versions) 19313(push (purecopy '(ntlm 1 0)) package--builtin-versions)
19146;;;*** 19314;;;***
19147 19315
19148;;;### (autoloads nil "nxml-glyph" "nxml/nxml-glyph.el" (20709 26818 19316;;;### (autoloads nil "nxml-glyph" "nxml/nxml-glyph.el" (20709 26818
@@ -19987,10 +20155,10 @@ See the command `outline-mode' for more information on this mode.
19987 20155
19988;;;*** 20156;;;***
19989 20157
19990;;;### (autoloads nil "package" "emacs-lisp/package.el" (20938 49065 20158;;;### (autoloads nil "package" "emacs-lisp/package.el" (21022 27213
19991;;;;;; 383398 0)) 20159;;;;;; 317995 0))
19992;;; Generated autoloads from emacs-lisp/package.el 20160;;; Generated autoloads from emacs-lisp/package.el
19993(push (purecopy (quote (package 1 0 1))) package--builtin-versions) 20161(push (purecopy '(package 1 0 1)) package--builtin-versions)
19994(defvar package-enable-at-startup t "\ 20162(defvar package-enable-at-startup t "\
19995Whether to activate installed packages when Emacs starts. 20163Whether to activate installed packages when Emacs starts.
19996If non-nil, packages are activated after reading the init file 20164If non-nil, packages are activated after reading the init file
@@ -20169,8 +20337,8 @@ Check if KEY is in the cache.
20169 20337
20170;;;*** 20338;;;***
20171 20339
20172;;;### (autoloads nil "pcase" "emacs-lisp/pcase.el" (20717 20920 20340;;;### (autoloads nil "pcase" "emacs-lisp/pcase.el" (20991 31656
20173;;;;;; 410005 0)) 20341;;;;;; 363459 0))
20174;;; Generated autoloads from emacs-lisp/pcase.el 20342;;; Generated autoloads from emacs-lisp/pcase.el
20175 20343
20176(autoload 'pcase "pcase" "\ 20344(autoload 'pcase "pcase" "\
@@ -20436,7 +20604,7 @@ Setup `shell-mode' to use pcomplete.
20436 20604
20437;;;*** 20605;;;***
20438 20606
20439;;;### (autoloads nil "pcvs" "vc/pcvs.el" (20717 20920 410005 0)) 20607;;;### (autoloads nil "pcvs" "vc/pcvs.el" (20983 37555 279226 0))
20440;;; Generated autoloads from vc/pcvs.el 20608;;; Generated autoloads from vc/pcvs.el
20441 20609
20442(autoload 'cvs-checkout "pcvs" "\ 20610(autoload 'cvs-checkout "pcvs" "\
@@ -20717,7 +20885,7 @@ Use streaming commands.
20717 20885
20718;;;*** 20886;;;***
20719 20887
20720;;;### (autoloads nil "pp" "emacs-lisp/pp.el" (20709 26818 907104 20888;;;### (autoloads nil "pp" "emacs-lisp/pp.el" (21013 58662 278539
20721;;;;;; 0)) 20889;;;;;; 0))
20722;;; Generated autoloads from emacs-lisp/pp.el 20890;;; Generated autoloads from emacs-lisp/pp.el
20723 20891
@@ -20768,10 +20936,10 @@ Ignores leading comment characters.
20768 20936
20769;;;*** 20937;;;***
20770 20938
20771;;;### (autoloads nil "printing" "printing.el" (20891 44219 680764 20939;;;### (autoloads nil "printing" "printing.el" (20975 43430 521692
20772;;;;;; 0)) 20940;;;;;; 0))
20773;;; Generated autoloads from printing.el 20941;;; Generated autoloads from printing.el
20774(push (purecopy (quote (printing 6 9 3))) package--builtin-versions) 20942(push (purecopy '(printing 6 9 3)) package--builtin-versions)
20775(autoload 'pr-interface "printing" "\ 20943(autoload 'pr-interface "printing" "\
20776Activate the printing interface buffer. 20944Activate the printing interface buffer.
20777 20945
@@ -21453,7 +21621,7 @@ The default value is '(\"/usr/local/share/emacs/fonts/bdf\").")
21453;;;### (autoloads nil "ps-mode" "progmodes/ps-mode.el" (20777 63161 21621;;;### (autoloads nil "ps-mode" "progmodes/ps-mode.el" (20777 63161
21454;;;;;; 848428 0)) 21622;;;;;; 848428 0))
21455;;; Generated autoloads from progmodes/ps-mode.el 21623;;; Generated autoloads from progmodes/ps-mode.el
21456(push (purecopy (quote (ps-mode 1 1 9))) package--builtin-versions) 21624(push (purecopy '(ps-mode 1 1 9)) package--builtin-versions)
21457(autoload 'ps-mode "ps-mode" "\ 21625(autoload 'ps-mode "ps-mode" "\
21458Major mode for editing PostScript with GNU Emacs. 21626Major mode for editing PostScript with GNU Emacs.
21459 21627
@@ -21497,10 +21665,10 @@ Typing \\<ps-run-mode-map>\\[ps-run-goto-error] when the cursor is at the number
21497 21665
21498;;;*** 21666;;;***
21499 21667
21500;;;### (autoloads nil "ps-print" "ps-print.el" (20874 65006 672942 21668;;;### (autoloads nil "ps-print" "ps-print.el" (20975 43430 521692
21501;;;;;; 217000)) 21669;;;;;; 0))
21502;;; Generated autoloads from ps-print.el 21670;;; Generated autoloads from ps-print.el
21503(push (purecopy (quote (ps-print 7 3 5))) package--builtin-versions) 21671(push (purecopy '(ps-print 7 3 5)) package--builtin-versions)
21504(defvar ps-page-dimensions-database (purecopy (list (list 'a4 (/ (* 72 21.0) 2.54) (/ (* 72 29.7) 2.54) "A4") (list 'a3 (/ (* 72 29.7) 2.54) (/ (* 72 42.0) 2.54) "A3") (list 'letter (* 72 8.5) (* 72 11.0) "Letter") (list 'legal (* 72 8.5) (* 72 14.0) "Legal") (list 'letter-small (* 72 7.68) (* 72 10.16) "LetterSmall") (list 'tabloid (* 72 11.0) (* 72 17.0) "Tabloid") (list 'ledger (* 72 17.0) (* 72 11.0) "Ledger") (list 'statement (* 72 5.5) (* 72 8.5) "Statement") (list 'executive (* 72 7.5) (* 72 10.0) "Executive") (list 'a4small (* 72 7.47) (* 72 10.85) "A4Small") (list 'b4 (* 72 10.125) (* 72 14.33) "B4") (list 'b5 (* 72 7.16) (* 72 10.125) "B5") '(addresslarge 236.0 99.0 "AddressLarge") '(addresssmall 236.0 68.0 "AddressSmall") '(cuthanging13 90.0 222.0 "CutHanging13") '(cuthanging15 90.0 114.0 "CutHanging15") '(diskette 181.0 136.0 "Diskette") '(eurofilefolder 139.0 112.0 "EuropeanFilefolder") '(eurofoldernarrow 526.0 107.0 "EuroFolderNarrow") '(eurofolderwide 526.0 136.0 "EuroFolderWide") '(euronamebadge 189.0 108.0 "EuroNameBadge") '(euronamebadgelarge 223.0 136.0 "EuroNameBadgeLarge") '(filefolder 230.0 37.0 "FileFolder") '(jewelry 76.0 136.0 "Jewelry") '(mediabadge 180.0 136.0 "MediaBadge") '(multipurpose 126.0 68.0 "MultiPurpose") '(retaillabel 90.0 104.0 "RetailLabel") '(shipping 271.0 136.0 "Shipping") '(slide35mm 26.0 104.0 "Slide35mm") '(spine8mm 187.0 26.0 "Spine8mm") '(topcoated 425.19685 136.0 "TopCoatedPaper") '(topcoatedpaper 396.0 136.0 "TopcoatedPaper150") '(vhsface 205.0 127.0 "VHSFace") '(vhsspine 400.0 50.0 "VHSSpine") '(zipdisk 156.0 136.0 "ZipDisk"))) "\ 21672(defvar ps-page-dimensions-database (purecopy (list (list 'a4 (/ (* 72 21.0) 2.54) (/ (* 72 29.7) 2.54) "A4") (list 'a3 (/ (* 72 29.7) 2.54) (/ (* 72 42.0) 2.54) "A3") (list 'letter (* 72 8.5) (* 72 11.0) "Letter") (list 'legal (* 72 8.5) (* 72 14.0) "Legal") (list 'letter-small (* 72 7.68) (* 72 10.16) "LetterSmall") (list 'tabloid (* 72 11.0) (* 72 17.0) "Tabloid") (list 'ledger (* 72 17.0) (* 72 11.0) "Ledger") (list 'statement (* 72 5.5) (* 72 8.5) "Statement") (list 'executive (* 72 7.5) (* 72 10.0) "Executive") (list 'a4small (* 72 7.47) (* 72 10.85) "A4Small") (list 'b4 (* 72 10.125) (* 72 14.33) "B4") (list 'b5 (* 72 7.16) (* 72 10.125) "B5") '(addresslarge 236.0 99.0 "AddressLarge") '(addresssmall 236.0 68.0 "AddressSmall") '(cuthanging13 90.0 222.0 "CutHanging13") '(cuthanging15 90.0 114.0 "CutHanging15") '(diskette 181.0 136.0 "Diskette") '(eurofilefolder 139.0 112.0 "EuropeanFilefolder") '(eurofoldernarrow 526.0 107.0 "EuroFolderNarrow") '(eurofolderwide 526.0 136.0 "EuroFolderWide") '(euronamebadge 189.0 108.0 "EuroNameBadge") '(euronamebadgelarge 223.0 136.0 "EuroNameBadgeLarge") '(filefolder 230.0 37.0 "FileFolder") '(jewelry 76.0 136.0 "Jewelry") '(mediabadge 180.0 136.0 "MediaBadge") '(multipurpose 126.0 68.0 "MultiPurpose") '(retaillabel 90.0 104.0 "RetailLabel") '(shipping 271.0 136.0 "Shipping") '(slide35mm 26.0 104.0 "Slide35mm") '(spine8mm 187.0 26.0 "Spine8mm") '(topcoated 425.19685 136.0 "TopCoatedPaper") '(topcoatedpaper 396.0 136.0 "TopcoatedPaper150") '(vhsface 205.0 127.0 "VHSFace") '(vhsspine 400.0 50.0 "VHSSpine") '(zipdisk 156.0 136.0 "ZipDisk"))) "\
21505List associating a symbolic paper type to its width, height and doc media. 21673List associating a symbolic paper type to its width, height and doc media.
21506See `ps-paper-type'.") 21674See `ps-paper-type'.")
@@ -21697,13 +21865,13 @@ If EXTENSION is any other symbol, it is ignored.
21697;;;### (autoloads nil "pulse" "cedet/pulse.el" (20709 26818 907104 21865;;;### (autoloads nil "pulse" "cedet/pulse.el" (20709 26818 907104
21698;;;;;; 0)) 21866;;;;;; 0))
21699;;; Generated autoloads from cedet/pulse.el 21867;;; Generated autoloads from cedet/pulse.el
21700(push (purecopy (quote (pulse 1 0))) package--builtin-versions) 21868(push (purecopy '(pulse 1 0)) package--builtin-versions)
21701;;;*** 21869;;;***
21702 21870
21703;;;### (autoloads nil "python" "progmodes/python.el" (20928 13222 21871;;;### (autoloads nil "python" "progmodes/python.el" (21020 31917
21704;;;;;; 500272 0)) 21872;;;;;; 145164 0))
21705;;; Generated autoloads from progmodes/python.el 21873;;; Generated autoloads from progmodes/python.el
21706(push (purecopy (quote (python 0 24 2))) package--builtin-versions) 21874(push (purecopy '(python 0 24 2)) package--builtin-versions)
21707(add-to-list 'auto-mode-alist (cons (purecopy "\\.py\\'") 'python-mode)) 21875(add-to-list 'auto-mode-alist (cons (purecopy "\\.py\\'") 'python-mode))
21708 21876
21709(add-to-list 'interpreter-mode-alist (cons (purecopy "python") 'python-mode)) 21877(add-to-list 'interpreter-mode-alist (cons (purecopy "python") 'python-mode))
@@ -21755,8 +21923,8 @@ them into characters should be done separately.
21755 21923
21756;;;*** 21924;;;***
21757 21925
21758;;;### (autoloads nil "quail" "international/quail.el" (20709 26818 21926;;;### (autoloads nil "quail" "international/quail.el" (20998 4934
21759;;;;;; 907104 0)) 21927;;;;;; 952905 0))
21760;;; Generated autoloads from international/quail.el 21928;;; Generated autoloads from international/quail.el
21761 21929
21762(autoload 'quail-title "quail" "\ 21930(autoload 'quail-title "quail" "\
@@ -22057,7 +22225,8 @@ Display `quickurl-list' as a formatted list using `quickurl-list-mode'.
22057 22225
22058;;;*** 22226;;;***
22059 22227
22060;;;### (autoloads nil "rcirc" "net/rcirc.el" (20770 3512 176098 0)) 22228;;;### (autoloads nil "rcirc" "net/rcirc.el" (20992 52525 458637
22229;;;;;; 0))
22061;;; Generated autoloads from net/rcirc.el 22230;;; Generated autoloads from net/rcirc.el
22062 22231
22063(autoload 'rcirc "rcirc" "\ 22232(autoload 'rcirc "rcirc" "\
@@ -22107,8 +22276,8 @@ See \\[compile].
22107 22276
22108;;;*** 22277;;;***
22109 22278
22110;;;### (autoloads nil "re-builder" "emacs-lisp/re-builder.el" (20709 22279;;;### (autoloads nil "re-builder" "emacs-lisp/re-builder.el" (20984
22111;;;;;; 26818 907104 0)) 22280;;;;;; 58408 354075 0))
22112;;; Generated autoloads from emacs-lisp/re-builder.el 22281;;; Generated autoloads from emacs-lisp/re-builder.el
22113 22282
22114(defalias 'regexp-builder 're-builder) 22283(defalias 'regexp-builder 're-builder)
@@ -22494,13 +22663,13 @@ This means the number of non-shy regexp grouping constructs
22494;;;### (autoloads nil "regi" "emacs-lisp/regi.el" (20709 26818 907104 22663;;;### (autoloads nil "regi" "emacs-lisp/regi.el" (20709 26818 907104
22495;;;;;; 0)) 22664;;;;;; 0))
22496;;; Generated autoloads from emacs-lisp/regi.el 22665;;; Generated autoloads from emacs-lisp/regi.el
22497(push (purecopy (quote (regi 1 8))) package--builtin-versions) 22666(push (purecopy '(regi 1 8)) package--builtin-versions)
22498;;;*** 22667;;;***
22499 22668
22500;;;### (autoloads nil "remember" "textmodes/remember.el" (20945 22315 22669;;;### (autoloads nil "remember" "textmodes/remember.el" (20945 22315
22501;;;;;; 8369 0)) 22670;;;;;; 8369 0))
22502;;; Generated autoloads from textmodes/remember.el 22671;;; Generated autoloads from textmodes/remember.el
22503(push (purecopy (quote (remember 2 0))) package--builtin-versions) 22672(push (purecopy '(remember 2 0)) package--builtin-versions)
22504(autoload 'remember "remember" "\ 22673(autoload 'remember "remember" "\
22505Remember an arbitrary piece of data. 22674Remember an arbitrary piece of data.
22506INITIAL is the text to initially place in the *Remember* buffer, 22675INITIAL is the text to initially place in the *Remember* buffer,
@@ -22557,7 +22726,7 @@ preserve across Emacs restarts. The notes will be stored in the
22557 22726
22558;;;### (autoloads nil "repeat" "repeat.el" (20709 26818 907104 0)) 22727;;;### (autoloads nil "repeat" "repeat.el" (20709 26818 907104 0))
22559;;; Generated autoloads from repeat.el 22728;;; Generated autoloads from repeat.el
22560(push (purecopy (quote (repeat 0 51))) package--builtin-versions) 22729(push (purecopy '(repeat 0 51)) package--builtin-versions)
22561(autoload 'repeat "repeat" "\ 22730(autoload 'repeat "repeat" "\
22562Repeat most recently executed command. 22731Repeat most recently executed command.
22563If REPEAT-ARG is non-nil (interactively, with a prefix argument), 22732If REPEAT-ARG is non-nil (interactively, with a prefix argument),
@@ -22609,7 +22778,7 @@ mail-sending package is used for editing and sending the message.
22609 22778
22610;;;*** 22779;;;***
22611 22780
22612;;;### (autoloads nil "reposition" "reposition.el" (20709 26818 907104 22781;;;### (autoloads nil "reposition" "reposition.el" (20992 52525 458637
22613;;;;;; 0)) 22782;;;;;; 0))
22614;;; Generated autoloads from reposition.el 22783;;; Generated autoloads from reposition.el
22615 22784
@@ -22732,7 +22901,7 @@ variable.
22732 22901
22733;;;*** 22902;;;***
22734 22903
22735;;;### (autoloads nil "rmail" "mail/rmail.el" (20892 39729 858825 22904;;;### (autoloads nil "rmail" "mail/rmail.el" (20992 52525 458637
22736;;;;;; 0)) 22905;;;;;; 0))
22737;;; Generated autoloads from mail/rmail.el 22906;;; Generated autoloads from mail/rmail.el
22738 22907
@@ -22995,8 +23164,8 @@ than appending to it. Deletes the message after writing if
22995 23164
22996;;;*** 23165;;;***
22997 23166
22998;;;### (autoloads nil "rng-cmpct" "nxml/rng-cmpct.el" (20709 26818 23167;;;### (autoloads nil "rng-cmpct" "nxml/rng-cmpct.el" (20998 4934
22999;;;;;; 907104 0)) 23168;;;;;; 952905 0))
23000;;; Generated autoloads from nxml/rng-cmpct.el 23169;;; Generated autoloads from nxml/rng-cmpct.el
23001 23170
23002(autoload 'rng-c-load-schema "rng-cmpct" "\ 23171(autoload 'rng-c-load-schema "rng-cmpct" "\
@@ -23112,7 +23281,7 @@ Start using robin package NAME, which is a string.
23112 23281
23113;;;*** 23282;;;***
23114 23283
23115;;;### (autoloads nil "rot13" "rot13.el" (20709 26818 907104 0)) 23284;;;### (autoloads nil "rot13" "rot13.el" (20992 52525 458637 0))
23116;;; Generated autoloads from rot13.el 23285;;; Generated autoloads from rot13.el
23117 23286
23118(autoload 'rot13 "rot13" "\ 23287(autoload 'rot13 "rot13" "\
@@ -23180,10 +23349,10 @@ for modes derived from Text mode, like Mail mode.
23180 23349
23181;;;*** 23350;;;***
23182 23351
23183;;;### (autoloads nil "ruby-mode" "progmodes/ruby-mode.el" (20944 23352;;;### (autoloads nil "ruby-mode" "progmodes/ruby-mode.el" (21024
23184;;;;;; 1446 914400 0)) 23353;;;;;; 28968 738399 0))
23185;;; Generated autoloads from progmodes/ruby-mode.el 23354;;; Generated autoloads from progmodes/ruby-mode.el
23186(push (purecopy (quote (ruby-mode 1 2))) package--builtin-versions) 23355(push (purecopy '(ruby-mode 1 2)) package--builtin-versions)
23187(autoload 'ruby-mode "ruby-mode" "\ 23356(autoload 'ruby-mode "ruby-mode" "\
23188Major mode for editing Ruby scripts. 23357Major mode for editing Ruby scripts.
23189\\[ruby-indent-line] properly indents subexpressions of multi-line 23358\\[ruby-indent-line] properly indents subexpressions of multi-line
@@ -23205,7 +23374,7 @@ The variable `ruby-indent-level' controls the amount of indentation.
23205;;;### (autoloads nil "ruler-mode" "ruler-mode.el" (20791 9657 561026 23374;;;### (autoloads nil "ruler-mode" "ruler-mode.el" (20791 9657 561026
23206;;;;;; 0)) 23375;;;;;; 0))
23207;;; Generated autoloads from ruler-mode.el 23376;;; Generated autoloads from ruler-mode.el
23208(push (purecopy (quote (ruler-mode 1 6))) package--builtin-versions) 23377(push (purecopy '(ruler-mode 1 6)) package--builtin-versions)
23209(defvar ruler-mode nil "\ 23378(defvar ruler-mode nil "\
23210Non-nil if Ruler mode is enabled. 23379Non-nil if Ruler mode is enabled.
23211Use the command `ruler-mode' to change this variable.") 23380Use the command `ruler-mode' to change this variable.")
@@ -23535,13 +23704,13 @@ enclosed in `(and ...)'.
23535;;;### (autoloads nil "sasl-ntlm" "net/sasl-ntlm.el" (20709 26818 23704;;;### (autoloads nil "sasl-ntlm" "net/sasl-ntlm.el" (20709 26818
23536;;;;;; 907104 0)) 23705;;;;;; 907104 0))
23537;;; Generated autoloads from net/sasl-ntlm.el 23706;;; Generated autoloads from net/sasl-ntlm.el
23538(push (purecopy (quote (sasl 1 0))) package--builtin-versions) 23707(push (purecopy '(sasl 1 0)) package--builtin-versions)
23539;;;*** 23708;;;***
23540 23709
23541;;;### (autoloads nil "savehist" "savehist.el" (20709 26818 907104 23710;;;### (autoloads nil "savehist" "savehist.el" (20709 26818 907104
23542;;;;;; 0)) 23711;;;;;; 0))
23543;;; Generated autoloads from savehist.el 23712;;; Generated autoloads from savehist.el
23544(push (purecopy (quote (savehist 24))) package--builtin-versions) 23713(push (purecopy '(savehist 24)) package--builtin-versions)
23545(defvar savehist-mode nil "\ 23714(defvar savehist-mode nil "\
23546Non-nil if Savehist mode is enabled. 23715Non-nil if Savehist mode is enabled.
23547See the command `savehist-mode' for a description of this minor mode. 23716See the command `savehist-mode' for a description of this minor mode.
@@ -23680,7 +23849,7 @@ vertically fixed relative to window boundaries during scrolling.
23680;;;### (autoloads nil "semantic" "cedet/semantic.el" (20908 27948 23849;;;### (autoloads nil "semantic" "cedet/semantic.el" (20908 27948
23681;;;;;; 216644 0)) 23850;;;;;; 216644 0))
23682;;; Generated autoloads from cedet/semantic.el 23851;;; Generated autoloads from cedet/semantic.el
23683(push (purecopy (quote (semantic 2 2))) package--builtin-versions) 23852(push (purecopy '(semantic 2 2)) package--builtin-versions)
23684(defvar semantic-default-submodes '(global-semantic-idle-scheduler-mode global-semanticdb-minor-mode) "\ 23853(defvar semantic-default-submodes '(global-semantic-idle-scheduler-mode global-semanticdb-minor-mode) "\
23685List of auxiliary Semantic minor modes enabled by `semantic-mode'. 23854List of auxiliary Semantic minor modes enabled by `semantic-mode'.
23686The possible elements of this list include the following: 23855The possible elements of this list include the following:
@@ -23756,8 +23925,8 @@ Major mode for editing Wisent grammars.
23756 23925
23757;;;*** 23926;;;***
23758 23927
23759;;;### (autoloads nil "sendmail" "mail/sendmail.el" (20723 59703 23928;;;### (autoloads nil "sendmail" "mail/sendmail.el" (21002 1963 769129
23760;;;;;; 12265 0)) 23929;;;;;; 0))
23761;;; Generated autoloads from mail/sendmail.el 23930;;; Generated autoloads from mail/sendmail.el
23762 23931
23763(defvar mail-from-style 'default "\ 23932(defvar mail-from-style 'default "\
@@ -24038,7 +24207,7 @@ Like `mail' command, but display mail buffer in another frame.
24038 24207
24039;;;*** 24208;;;***
24040 24209
24041;;;### (autoloads nil "server" "server.el" (20763 30266 231060 0)) 24210;;;### (autoloads nil "server" "server.el" (20992 52525 458637 0))
24042;;; Generated autoloads from server.el 24211;;; Generated autoloads from server.el
24043 24212
24044(put 'server-host 'risky-local-variable t) 24213(put 'server-host 'risky-local-variable t)
@@ -24105,7 +24274,7 @@ only these files will be asked to be saved.
24105 24274
24106;;;*** 24275;;;***
24107 24276
24108;;;### (autoloads nil "ses" "ses.el" (20709 26818 907104 0)) 24277;;;### (autoloads nil "ses" "ses.el" (20999 25770 522517 0))
24109;;; Generated autoloads from ses.el 24278;;; Generated autoloads from ses.el
24110 24279
24111(autoload 'ses-mode "ses" "\ 24280(autoload 'ses-mode "ses" "\
@@ -24189,10 +24358,10 @@ To work around that, do:
24189 24358
24190;;;*** 24359;;;***
24191 24360
24192;;;### (autoloads nil "sh-script" "progmodes/sh-script.el" (20850 24361;;;### (autoloads nil "sh-script" "progmodes/sh-script.el" (21022
24193;;;;;; 27430 515630 0)) 24362;;;;;; 40320 762131 34000))
24194;;; Generated autoloads from progmodes/sh-script.el 24363;;; Generated autoloads from progmodes/sh-script.el
24195(push (purecopy (quote (sh-script 2 0 6))) package--builtin-versions)(put 'sh-shell 'safe-local-variable 'symbolp) 24364(push (purecopy '(sh-script 2 0 6)) package--builtin-versions)(put 'sh-shell 'safe-local-variable 'symbolp)
24196 24365
24197(autoload 'sh-mode "sh-script" "\ 24366(autoload 'sh-mode "sh-script" "\
24198Major mode for editing shell scripts. 24367Major mode for editing shell scripts.
@@ -24303,7 +24472,7 @@ function, `load-path-shadows-find'.
24303 24472
24304;;;*** 24473;;;***
24305 24474
24306;;;### (autoloads nil "shadowfile" "shadowfile.el" (20799 169 640767 24475;;;### (autoloads nil "shadowfile" "shadowfile.el" (20959 55207 940876
24307;;;;;; 0)) 24476;;;;;; 0))
24308;;; Generated autoloads from shadowfile.el 24477;;; Generated autoloads from shadowfile.el
24309 24478
@@ -24342,7 +24511,7 @@ Set up file shadowing.
24342 24511
24343;;;*** 24512;;;***
24344 24513
24345;;;### (autoloads nil "shell" "shell.el" (20884 7264 912957 506000)) 24514;;;### (autoloads nil "shell" "shell.el" (20992 52525 458637 0))
24346;;; Generated autoloads from shell.el 24515;;; Generated autoloads from shell.el
24347 24516
24348(defvar shell-dumb-shell-regexp (purecopy "cmd\\(proxy\\)?\\.exe") "\ 24517(defvar shell-dumb-shell-regexp (purecopy "cmd\\(proxy\\)?\\.exe") "\
@@ -24390,7 +24559,7 @@ Otherwise, one argument `-i' is passed to the shell.
24390 24559
24391;;;*** 24560;;;***
24392 24561
24393;;;### (autoloads nil "shr" "net/shr.el" (20944 31824 211965 0)) 24562;;;### (autoloads nil "shr" "net/shr.el" (21007 19880 17663 0))
24394;;; Generated autoloads from net/shr.el 24563;;; Generated autoloads from net/shr.el
24395 24564
24396(autoload 'shr-insert-document "shr" "\ 24565(autoload 'shr-insert-document "shr" "\
@@ -24605,8 +24774,8 @@ symmetrical ones, and the same character twice for the others.
24605 24774
24606;;;*** 24775;;;***
24607 24776
24608;;;### (autoloads nil "smerge-mode" "vc/smerge-mode.el" (20709 26818 24777;;;### (autoloads nil "smerge-mode" "vc/smerge-mode.el" (21022 27213
24609;;;;;; 907104 0)) 24778;;;;;; 317995 0))
24610;;; Generated autoloads from vc/smerge-mode.el 24779;;; Generated autoloads from vc/smerge-mode.el
24611 24780
24612(autoload 'smerge-ediff "smerge-mode" "\ 24781(autoload 'smerge-ediff "smerge-mode" "\
@@ -25047,7 +25216,7 @@ Spam reports will be queued with the method used when
25047 25216
25048;;;*** 25217;;;***
25049 25218
25050;;;### (autoloads nil "speedbar" "speedbar.el" (20892 39729 858825 25219;;;### (autoloads nil "speedbar" "speedbar.el" (21024 28968 738399
25051;;;;;; 0)) 25220;;;;;; 0))
25052;;; Generated autoloads from speedbar.el 25221;;; Generated autoloads from speedbar.el
25053 25222
@@ -25088,10 +25257,10 @@ Return a vector containing the lines from `spook-phrases-file'.
25088 25257
25089;;;*** 25258;;;***
25090 25259
25091;;;### (autoloads nil "sql" "progmodes/sql.el" (20878 6823 881439 25260;;;### (autoloads nil "sql" "progmodes/sql.el" (20975 10147 44538
25092;;;;;; 0)) 25261;;;;;; 0))
25093;;; Generated autoloads from progmodes/sql.el 25262;;; Generated autoloads from progmodes/sql.el
25094(push (purecopy (quote (sql 3 2))) package--builtin-versions) 25263(push (purecopy '(sql 3 3)) package--builtin-versions)
25095(autoload 'sql-add-product-keywords "sql" "\ 25264(autoload 'sql-add-product-keywords "sql" "\
25096Add highlighting KEYWORDS for SQL PRODUCT. 25265Add highlighting KEYWORDS for SQL PRODUCT.
25097 25266
@@ -25554,7 +25723,7 @@ buffer.
25554;;;### (autoloads nil "srecode" "cedet/srecode.el" (20748 62911 684442 25723;;;### (autoloads nil "srecode" "cedet/srecode.el" (20748 62911 684442
25555;;;;;; 0)) 25724;;;;;; 0))
25556;;; Generated autoloads from cedet/srecode.el 25725;;; Generated autoloads from cedet/srecode.el
25557(push (purecopy (quote (srecode 1 2))) package--builtin-versions) 25726(push (purecopy '(srecode 1 2)) package--builtin-versions)
25558;;;*** 25727;;;***
25559 25728
25560;;;### (autoloads nil "srecode/srt-mode" "cedet/srecode/srt-mode.el" 25729;;;### (autoloads nil "srecode/srt-mode" "cedet/srecode/srt-mode.el"
@@ -25728,8 +25897,8 @@ Studlify-case the current buffer.
25728 25897
25729;;;*** 25898;;;***
25730 25899
25731;;;### (autoloads nil "subword" "progmodes/subword.el" (20886 47777 25900;;;### (autoloads nil "subword" "progmodes/subword.el" (20974 22577
25732;;;;;; 83668 440000)) 25901;;;;;; 548213 0))
25733;;; Generated autoloads from progmodes/subword.el 25902;;; Generated autoloads from progmodes/subword.el
25734 25903
25735(autoload 'subword-mode "subword" "\ 25904(autoload 'subword-mode "subword" "\
@@ -25885,7 +26054,7 @@ It relies on the `gpm' daemon being activated.
25885 26054
25886;;;*** 26055;;;***
25887 26056
25888;;;### (autoloads nil "tabify" "tabify.el" (20928 13222 500272 0)) 26057;;;### (autoloads nil "tabify" "tabify.el" (20999 25770 522517 0))
25889;;; Generated autoloads from tabify.el 26058;;; Generated autoloads from tabify.el
25890 26059
25891(autoload 'untabify "tabify" "\ 26060(autoload 'untabify "tabify" "\
@@ -26507,7 +26676,7 @@ converts a table into plain text without frames. It is a companion to
26507 26676
26508;;;*** 26677;;;***
26509 26678
26510;;;### (autoloads nil "talk" "talk.el" (20709 26818 907104 0)) 26679;;;### (autoloads nil "talk" "talk.el" (20992 52525 458637 0))
26511;;; Generated autoloads from talk.el 26680;;; Generated autoloads from talk.el
26512 26681
26513(autoload 'talk-connect "talk" "\ 26682(autoload 'talk-connect "talk" "\
@@ -26677,7 +26846,7 @@ Start coverage on function under point.
26677;;;### (autoloads nil "tetris" "play/tetris.el" (20874 65006 672942 26846;;;### (autoloads nil "tetris" "play/tetris.el" (20874 65006 672942
26678;;;;;; 217000)) 26847;;;;;; 217000))
26679;;; Generated autoloads from play/tetris.el 26848;;; Generated autoloads from play/tetris.el
26680(push (purecopy (quote (tetris 2 1))) package--builtin-versions) 26849(push (purecopy '(tetris 2 1)) package--builtin-versions)
26681(autoload 'tetris "tetris" "\ 26850(autoload 'tetris "tetris" "\
26682Play the Tetris game. 26851Play the Tetris game.
26683Shapes drop from the top of the screen, and the user has to move and 26852Shapes drop from the top of the screen, and the user has to move and
@@ -27154,7 +27323,7 @@ Compose Thai characters in the current buffer.
27154 27323
27155;;;*** 27324;;;***
27156 27325
27157;;;### (autoloads nil "thingatpt" "thingatpt.el" (20874 62962 290468 27326;;;### (autoloads nil "thingatpt" "thingatpt.el" (20999 25770 522517
27158;;;;;; 0)) 27327;;;;;; 0))
27159;;; Generated autoloads from thingatpt.el 27328;;; Generated autoloads from thingatpt.el
27160 27329
@@ -27219,7 +27388,7 @@ Return the Lisp list at point, or nil if none is found.
27219 27388
27220;;;*** 27389;;;***
27221 27390
27222;;;### (autoloads nil "thumbs" "thumbs.el" (20709 26818 907104 0)) 27391;;;### (autoloads nil "thumbs" "thumbs.el" (20958 59019 473587 89000))
27223;;; Generated autoloads from thumbs.el 27392;;; Generated autoloads from thumbs.el
27224 27393
27225(autoload 'thumbs-find-thumb "thumbs" "\ 27394(autoload 'thumbs-find-thumb "thumbs" "\
@@ -27330,7 +27499,7 @@ See also docstring of the function tibetan-compose-region.
27330;;;### (autoloads nil "tildify" "textmodes/tildify.el" (20791 9657 27499;;;### (autoloads nil "tildify" "textmodes/tildify.el" (20791 9657
27331;;;;;; 561026 0)) 27500;;;;;; 561026 0))
27332;;; Generated autoloads from textmodes/tildify.el 27501;;; Generated autoloads from textmodes/tildify.el
27333(push (purecopy (quote (tildify 4 5))) package--builtin-versions) 27502(push (purecopy '(tildify 4 5)) package--builtin-versions)
27334(autoload 'tildify-region "tildify" "\ 27503(autoload 'tildify-region "tildify" "\
27335Add hard spaces in the region between BEG and END. 27504Add hard spaces in the region between BEG and END.
27336See variables `tildify-pattern-alist', `tildify-string-alist', and 27505See variables `tildify-pattern-alist', `tildify-string-alist', and
@@ -27351,7 +27520,7 @@ This function performs no refilling of the changed text.
27351 27520
27352;;;*** 27521;;;***
27353 27522
27354;;;### (autoloads nil "time" "time.el" (20709 26818 907104 0)) 27523;;;### (autoloads nil "time" "time.el" (20998 4934 952905 0))
27355;;; Generated autoloads from time.el 27524;;; Generated autoloads from time.el
27356 27525
27357(defvar display-time-day-and-date nil "\ 27526(defvar display-time-day-and-date nil "\
@@ -27566,10 +27735,19 @@ With ARG, turn time stamping on if and only if arg is positive.
27566 27735
27567;;;*** 27736;;;***
27568 27737
27569;;;### (autoloads nil "timeclock" "calendar/timeclock.el" (20799 27738;;;### (autoloads nil "timeclock" "calendar/timeclock.el" (21013
27570;;;;;; 169 640767 0)) 27739;;;;;; 58662 278539 0))
27571;;; Generated autoloads from calendar/timeclock.el 27740;;; Generated autoloads from calendar/timeclock.el
27572(push (purecopy (quote (timeclock 2 6 1))) package--builtin-versions) 27741(push (purecopy '(timeclock 2 6 1)) package--builtin-versions)
27742(defvar timeclock-mode-line-display nil "\
27743Non-nil if Timeclock-Mode-Line-Display mode is enabled.
27744See the command `timeclock-mode-line-display' for a description of this minor mode.
27745Setting this variable directly does not take effect;
27746either customize it (see the info node `Easy Customization')
27747or call the function `timeclock-mode-line-display'.")
27748
27749(custom-autoload 'timeclock-mode-line-display "timeclock" nil)
27750
27573(autoload 'timeclock-mode-line-display "timeclock" "\ 27751(autoload 'timeclock-mode-line-display "timeclock" "\
27574Toggle display of the amount of time left today in the mode line. 27752Toggle display of the amount of time left today in the mode line.
27575If `timeclock-use-display-time' is non-nil (the default), then 27753If `timeclock-use-display-time' is non-nil (the default), then
@@ -27727,8 +27905,8 @@ Its value should be an event that has a binding in MENU.
27727 27905
27728;;;*** 27906;;;***
27729 27907
27730;;;### (autoloads nil "todo-mode" "calendar/todo-mode.el" (20944 27908;;;### (autoloads nil "todo-mode" "calendar/todo-mode.el" (20982
27731;;;;;; 31824 211965 0)) 27909;;;;;; 16679 447285 0))
27732;;; Generated autoloads from calendar/todo-mode.el 27910;;; Generated autoloads from calendar/todo-mode.el
27733 27911
27734(autoload 'todo-show "todo-mode" "\ 27912(autoload 'todo-show "todo-mode" "\
@@ -27770,7 +27948,7 @@ and done items are always shown on visiting a category.
27770Invoking this command in Todo Archive mode visits the 27948Invoking this command in Todo Archive mode visits the
27771corresponding todo file, displaying the corresponding category. 27949corresponding todo file, displaying the corresponding category.
27772 27950
27773\(fn &optional SOLICIT-FILE)" t nil) 27951\(fn &optional SOLICIT-FILE INTERACTIVE)" t nil)
27774 27952
27775;;;*** 27953;;;***
27776 27954
@@ -27848,7 +28026,7 @@ holds a keymap.
27848;;;### (autoloads nil "tpu-edt" "emulation/tpu-edt.el" (20884 7264 28026;;;### (autoloads nil "tpu-edt" "emulation/tpu-edt.el" (20884 7264
27849;;;;;; 412929 442000)) 28027;;;;;; 412929 442000))
27850;;; Generated autoloads from emulation/tpu-edt.el 28028;;; Generated autoloads from emulation/tpu-edt.el
27851(push (purecopy (quote (tpu-edt 4 5))) package--builtin-versions) 28029(push (purecopy '(tpu-edt 4 5)) package--builtin-versions)
27852(defvar tpu-edt-mode nil "\ 28030(defvar tpu-edt-mode nil "\
27853Non-nil if Tpu-Edt mode is enabled. 28031Non-nil if Tpu-Edt mode is enabled.
27854See the command `tpu-edt-mode' for a description of this minor mode. 28032See the command `tpu-edt-mode' for a description of this minor mode.
@@ -27963,7 +28141,7 @@ changing the window configuration.
27963 28141
27964;;;*** 28142;;;***
27965 28143
27966;;;### (autoloads nil "tramp" "net/tramp.el" (20854 24486 190633 28144;;;### (autoloads nil "tramp" "net/tramp.el" (21024 28968 738399
27967;;;;;; 0)) 28145;;;;;; 0))
27968;;; Generated autoloads from net/tramp.el 28146;;; Generated autoloads from net/tramp.el
27969 28147
@@ -28096,8 +28274,8 @@ Discard Tramp from loading remote files.
28096 28274
28097;;;*** 28275;;;***
28098 28276
28099;;;### (autoloads nil "tramp-ftp" "net/tramp-ftp.el" (20709 26818 28277;;;### (autoloads nil "tramp-ftp" "net/tramp-ftp.el" (21008 40741
28100;;;;;; 907104 0)) 28278;;;;;; 120196 0))
28101;;; Generated autoloads from net/tramp-ftp.el 28279;;; Generated autoloads from net/tramp-ftp.el
28102 28280
28103(autoload 'tramp-ftp-enable-ange-ftp "tramp-ftp" "\ 28281(autoload 'tramp-ftp-enable-ange-ftp "tramp-ftp" "\
@@ -28107,7 +28285,7 @@ Discard Tramp from loading remote files.
28107 28285
28108;;;*** 28286;;;***
28109 28287
28110;;;### (autoloads nil "tutorial" "tutorial.el" (20760 54070 584283 28288;;;### (autoloads nil "tutorial" "tutorial.el" (20999 25770 522517
28111;;;;;; 0)) 28289;;;;;; 0))
28112;;; Generated autoloads from tutorial.el 28290;;; Generated autoloads from tutorial.el
28113 28291
@@ -28645,8 +28823,8 @@ Might do a non-blocking connection; use `process-status' to check.
28645 28823
28646;;;*** 28824;;;***
28647 28825
28648;;;### (autoloads nil "url-handlers" "url/url-handlers.el" (20892 28826;;;### (autoloads nil "url-handlers" "url/url-handlers.el" (20984
28649;;;;;; 39729 858825 0)) 28827;;;;;; 58408 354075 0))
28650;;; Generated autoloads from url/url-handlers.el 28828;;; Generated autoloads from url/url-handlers.el
28651 28829
28652(defvar url-handler-mode nil "\ 28830(defvar url-handler-mode nil "\
@@ -28700,8 +28878,8 @@ accessible.
28700 28878
28701;;;*** 28879;;;***
28702 28880
28703;;;### (autoloads nil "url-http" "url/url-http.el" (20766 59628 334727 28881;;;### (autoloads nil "url-http" "url/url-http.el" (21004 43695 993272
28704;;;;;; 618000)) 28882;;;;;; 0))
28705;;; Generated autoloads from url/url-http.el 28883;;; Generated autoloads from url/url-http.el
28706 (autoload 'url-default-expander "url-expand") 28884 (autoload 'url-default-expander "url-expand")
28707 28885
@@ -29095,7 +29273,7 @@ This uses `url-current-object', set locally to the buffer.
29095 29273
29096;;;*** 29274;;;***
29097 29275
29098;;;### (autoloads nil "userlock" "userlock.el" (20709 26818 907104 29276;;;### (autoloads nil "userlock" "userlock.el" (20998 4934 952905
29099;;;;;; 0)) 29277;;;;;; 0))
29100;;; Generated autoloads from userlock.el 29278;;; Generated autoloads from userlock.el
29101 29279
@@ -29185,7 +29363,7 @@ If FILE-NAME is non-nil, save the result to FILE-NAME.
29185 29363
29186;;;*** 29364;;;***
29187 29365
29188;;;### (autoloads nil "vc" "vc/vc.el" (20919 46844 767888 0)) 29366;;;### (autoloads nil "vc" "vc/vc.el" (20992 52525 458637 0))
29189;;; Generated autoloads from vc/vc.el 29367;;; Generated autoloads from vc/vc.el
29190 29368
29191(defvar vc-checkout-hook nil "\ 29369(defvar vc-checkout-hook nil "\
@@ -29515,7 +29693,7 @@ mode-specific menu. `vc-annotate-color-map' and
29515 29693
29516;;;*** 29694;;;***
29517 29695
29518;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (20900 33838 319219 29696;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (20990 10793 424093
29519;;;;;; 0)) 29697;;;;;; 0))
29520;;; Generated autoloads from vc/vc-bzr.el 29698;;; Generated autoloads from vc/vc-bzr.el
29521 29699
@@ -29532,7 +29710,7 @@ Name of the format file in a .bzr directory.")
29532 29710
29533;;;*** 29711;;;***
29534 29712
29535;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (20921 39978 248467 29713;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (20983 37555 279226
29536;;;;;; 0)) 29714;;;;;; 0))
29537;;; Generated autoloads from vc/vc-cvs.el 29715;;; Generated autoloads from vc/vc-cvs.el
29538(defun vc-cvs-registered (f) 29716(defun vc-cvs-registered (f)
@@ -29544,7 +29722,7 @@ Name of the format file in a .bzr directory.")
29544 29722
29545;;;*** 29723;;;***
29546 29724
29547;;;### (autoloads nil "vc-dir" "vc/vc-dir.el" (20900 33838 319219 29725;;;### (autoloads nil "vc-dir" "vc/vc-dir.el" (20990 10793 424093
29548;;;;;; 0)) 29726;;;;;; 0))
29549;;; Generated autoloads from vc/vc-dir.el 29727;;; Generated autoloads from vc/vc-dir.el
29550 29728
@@ -29593,7 +29771,7 @@ case, and the process object in the asynchronous case.
29593 29771
29594;;;*** 29772;;;***
29595 29773
29596;;;### (autoloads nil "vc-git" "vc/vc-git.el" (20900 33838 319219 29774;;;### (autoloads nil "vc-git" "vc/vc-git.el" (20990 10793 424093
29597;;;;;; 0)) 29775;;;;;; 0))
29598;;; Generated autoloads from vc/vc-git.el 29776;;; Generated autoloads from vc/vc-git.el
29599 (defun vc-git-registered (file) 29777 (defun vc-git-registered (file)
@@ -29605,7 +29783,7 @@ case, and the process object in the asynchronous case.
29605 29783
29606;;;*** 29784;;;***
29607 29785
29608;;;### (autoloads nil "vc-hg" "vc/vc-hg.el" (20900 33838 319219 0)) 29786;;;### (autoloads nil "vc-hg" "vc/vc-hg.el" (20990 10793 424093 0))
29609;;; Generated autoloads from vc/vc-hg.el 29787;;; Generated autoloads from vc/vc-hg.el
29610 (defun vc-hg-registered (file) 29788 (defun vc-hg-registered (file)
29611 "Return non-nil if FILE is registered with hg." 29789 "Return non-nil if FILE is registered with hg."
@@ -29666,7 +29844,7 @@ find any project directory." (let ((project-dir (getenv "PROJECTDIR")) dirs dir)
29666 29844
29667;;;*** 29845;;;***
29668 29846
29669;;;### (autoloads nil "vc-svn" "vc/vc-svn.el" (20900 33838 319219 29847;;;### (autoloads nil "vc-svn" "vc/vc-svn.el" (20990 10793 424093
29670;;;;;; 0)) 29848;;;;;; 0))
29671;;; Generated autoloads from vc/vc-svn.el 29849;;; Generated autoloads from vc/vc-svn.el
29672 (defun vc-svn-registered (f) 29850 (defun vc-svn-registered (f)
@@ -29683,7 +29861,7 @@ find any project directory." (let ((project-dir (getenv "PROJECTDIR")) dirs dir)
29683;;;### (autoloads nil "vera-mode" "progmodes/vera-mode.el" (20893 29861;;;### (autoloads nil "vera-mode" "progmodes/vera-mode.el" (20893
29684;;;;;; 60586 188550 0)) 29862;;;;;; 60586 188550 0))
29685;;; Generated autoloads from progmodes/vera-mode.el 29863;;; Generated autoloads from progmodes/vera-mode.el
29686(push (purecopy (quote (vera-mode 2 28))) package--builtin-versions) (add-to-list 'auto-mode-alist (cons (purecopy "\\.vr[hi]?\\'") 'vera-mode)) 29864(push (purecopy '(vera-mode 2 28)) package--builtin-versions) (add-to-list 'auto-mode-alist (cons (purecopy "\\.vr[hi]?\\'") 'vera-mode))
29687 29865
29688(autoload 'vera-mode "vera-mode" "\ 29866(autoload 'vera-mode "vera-mode" "\
29689Major mode for editing Vera code. 29867Major mode for editing Vera code.
@@ -29739,7 +29917,7 @@ Key bindings:
29739;;;*** 29917;;;***
29740 29918
29741;;;### (autoloads nil "verilog-mode" "progmodes/verilog-mode.el" 29919;;;### (autoloads nil "verilog-mode" "progmodes/verilog-mode.el"
29742;;;;;; (20885 2819 449152 0)) 29920;;;;;; (20992 52525 458637 0))
29743;;; Generated autoloads from progmodes/verilog-mode.el 29921;;; Generated autoloads from progmodes/verilog-mode.el
29744 29922
29745(autoload 'verilog-mode "verilog-mode" "\ 29923(autoload 'verilog-mode "verilog-mode" "\
@@ -30530,7 +30708,7 @@ Convert Vietnamese characters of the current buffer to `VIQR' mnemonics.
30530 30708
30531;;;*** 30709;;;***
30532 30710
30533;;;### (autoloads nil "view" "view.el" (20762 9398 526093 0)) 30711;;;### (autoloads nil "view" "view.el" (20999 25770 522517 0))
30534;;; Generated autoloads from view.el 30712;;; Generated autoloads from view.el
30535 30713
30536(defvar view-remove-frame-by-deleting t "\ 30714(defvar view-remove-frame-by-deleting t "\
@@ -30802,10 +30980,10 @@ Turn on VIP emulation of VI.
30802 30980
30803;;;*** 30981;;;***
30804 30982
30805;;;### (autoloads nil "viper" "emulation/viper.el" (20799 169 640767 30983;;;### (autoloads nil "viper" "emulation/viper.el" (20954 37295 781599
30806;;;;;; 0)) 30984;;;;;; 0))
30807;;; Generated autoloads from emulation/viper.el 30985;;; Generated autoloads from emulation/viper.el
30808(push (purecopy (quote (viper 3 14 1))) package--builtin-versions) 30986(push (purecopy '(viper 3 14 1)) package--builtin-versions)
30809(autoload 'toggle-viper-mode "viper" "\ 30987(autoload 'toggle-viper-mode "viper" "\
30810Toggle Viper on/off. 30988Toggle Viper on/off.
30811If Viper is enabled, turn it off. Otherwise, turn it on. 30989If Viper is enabled, turn it off. Otherwise, turn it on.
@@ -30909,9 +31087,9 @@ this is equivalent to `display-warning', using
30909 31087
30910;;;*** 31088;;;***
30911 31089
30912;;;### (autoloads nil "wdired" "wdired.el" (20900 33838 319219 0)) 31090;;;### (autoloads nil "wdired" "wdired.el" (20992 52525 458637 0))
30913;;; Generated autoloads from wdired.el 31091;;; Generated autoloads from wdired.el
30914(push (purecopy (quote (wdired 2 0))) package--builtin-versions) 31092(push (purecopy '(wdired 2 0)) package--builtin-versions)
30915(autoload 'wdired-change-to-wdired-mode "wdired" "\ 31093(autoload 'wdired-change-to-wdired-mode "wdired" "\
30916Put a Dired buffer in Writable Dired (WDired) mode. 31094Put a Dired buffer in Writable Dired (WDired) mode.
30917\\<wdired-mode-map> 31095\\<wdired-mode-map>
@@ -30974,10 +31152,10 @@ in certain major modes.
30974 31152
30975;;;*** 31153;;;***
30976 31154
30977;;;### (autoloads nil "whitespace" "whitespace.el" (20874 65007 172950 31155;;;### (autoloads nil "whitespace" "whitespace.el" (20986 60038 720063
30978;;;;;; 7000)) 31156;;;;;; 0))
30979;;; Generated autoloads from whitespace.el 31157;;; Generated autoloads from whitespace.el
30980(push (purecopy (quote (whitespace 13 2 2))) package--builtin-versions) 31158(push (purecopy '(whitespace 13 2 2)) package--builtin-versions)
30981(autoload 'whitespace-mode "whitespace" "\ 31159(autoload 'whitespace-mode "whitespace" "\
30982Toggle whitespace visualization (Whitespace mode). 31160Toggle whitespace visualization (Whitespace mode).
30983With a prefix argument ARG, enable Whitespace mode if ARG is 31161With a prefix argument ARG, enable Whitespace mode if ARG is
@@ -31402,7 +31580,7 @@ if ARG is omitted or nil.
31402 31580
31403;;;*** 31581;;;***
31404 31582
31405;;;### (autoloads nil "wid-edit" "wid-edit.el" (20945 22315 8369 31583;;;### (autoloads nil "wid-edit" "wid-edit.el" (20959 55207 940876
31406;;;;;; 0)) 31584;;;;;; 0))
31407;;; Generated autoloads from wid-edit.el 31585;;; Generated autoloads from wid-edit.el
31408 31586
@@ -31498,7 +31676,7 @@ Default MODIFIER is 'shift.
31498 31676
31499;;;*** 31677;;;***
31500 31678
31501;;;### (autoloads nil "winner" "winner.el" (20849 6570 598687 0)) 31679;;;### (autoloads nil "winner" "winner.el" (20992 52525 458637 0))
31502;;; Generated autoloads from winner.el 31680;;; Generated autoloads from winner.el
31503 31681
31504(defvar winner-mode nil "\ 31682(defvar winner-mode nil "\
@@ -31521,9 +31699,9 @@ the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'.
31521 31699
31522;;;*** 31700;;;***
31523 31701
31524;;;### (autoloads nil "woman" "woman.el" (20709 26818 907104 0)) 31702;;;### (autoloads nil "woman" "woman.el" (20999 25770 522517 0))
31525;;; Generated autoloads from woman.el 31703;;; Generated autoloads from woman.el
31526(push (purecopy (quote (woman 0 551))) package--builtin-versions) 31704(push (purecopy '(woman 0 551)) package--builtin-versions)
31527(defvar woman-locale nil "\ 31705(defvar woman-locale nil "\
31528String specifying a manual page locale, or nil. 31706String specifying a manual page locale, or nil.
31529If a manual page is available in the specified locale 31707If a manual page is available in the specified locale
@@ -31572,7 +31750,7 @@ Default bookmark handler for Woman buffers.
31572;;;### (autoloads nil "ws-mode" "emulation/ws-mode.el" (20709 26818 31750;;;### (autoloads nil "ws-mode" "emulation/ws-mode.el" (20709 26818
31573;;;;;; 907104 0)) 31751;;;;;; 907104 0))
31574;;; Generated autoloads from emulation/ws-mode.el 31752;;; Generated autoloads from emulation/ws-mode.el
31575(push (purecopy (quote (ws-mode 0 7))) package--builtin-versions) 31753(push (purecopy '(ws-mode 0 7)) package--builtin-versions)
31576(autoload 'wordstar-mode "ws-mode" "\ 31754(autoload 'wordstar-mode "ws-mode" "\
31577Major mode with WordStar-like key bindings. 31755Major mode with WordStar-like key bindings.
31578 31756
@@ -31682,7 +31860,7 @@ The key bindings are:
31682 31860
31683;;;*** 31861;;;***
31684 31862
31685;;;### (autoloads nil "xml" "xml.el" (20766 6456 368550 0)) 31863;;;### (autoloads nil "xml" "xml.el" (21002 1963 769129 0))
31686;;; Generated autoloads from xml.el 31864;;; Generated autoloads from xml.el
31687 31865
31688(autoload 'xml-parse-file "xml" "\ 31866(autoload 'xml-parse-file "xml" "\
@@ -31738,7 +31916,7 @@ Both features can be combined by providing a cons cell
31738 31916
31739;;;*** 31917;;;***
31740 31918
31741;;;### (autoloads nil "xmltok" "nxml/xmltok.el" (20884 6711 386198 31919;;;### (autoloads nil "xmltok" "nxml/xmltok.el" (20998 4934 952905
31742;;;;;; 0)) 31920;;;;;; 0))
31743;;; Generated autoloads from nxml/xmltok.el 31921;;; Generated autoloads from nxml/xmltok.el
31744 31922
@@ -31802,7 +31980,7 @@ Extract file name from an yenc header.
31802 31980
31803;;;*** 31981;;;***
31804 31982
31805;;;### (autoloads nil "zone" "play/zone.el" (20709 26818 907104 0)) 31983;;;### (autoloads nil "zone" "play/zone.el" (20992 52525 458637 0))
31806;;; Generated autoloads from play/zone.el 31984;;; Generated autoloads from play/zone.el
31807 31985
31808(autoload 'zone "zone" "\ 31986(autoload 'zone "zone" "\
@@ -31818,45 +31996,44 @@ Zone out, completely.
31818;;;;;; "calc/calc-fin.el" "calc/calc-forms.el" "calc/calc-frac.el" 31996;;;;;; "calc/calc-fin.el" "calc/calc-forms.el" "calc/calc-frac.el"
31819;;;;;; "calc/calc-funcs.el" "calc/calc-graph.el" "calc/calc-help.el" 31997;;;;;; "calc/calc-funcs.el" "calc/calc-graph.el" "calc/calc-help.el"
31820;;;;;; "calc/calc-incom.el" "calc/calc-keypd.el" "calc/calc-lang.el" 31998;;;;;; "calc/calc-incom.el" "calc/calc-keypd.el" "calc/calc-lang.el"
31821;;;;;; "calc/calc-loaddefs.el" "calc/calc-macs.el" "calc/calc-map.el" 31999;;;;;; "calc/calc-macs.el" "calc/calc-map.el" "calc/calc-math.el"
31822;;;;;; "calc/calc-math.el" "calc/calc-menu.el" "calc/calc-misc.el" 32000;;;;;; "calc/calc-menu.el" "calc/calc-misc.el" "calc/calc-mode.el"
31823;;;;;; "calc/calc-mode.el" "calc/calc-mtx.el" "calc/calc-nlfit.el" 32001;;;;;; "calc/calc-mtx.el" "calc/calc-nlfit.el" "calc/calc-poly.el"
31824;;;;;; "calc/calc-poly.el" "calc/calc-prog.el" "calc/calc-rewr.el" 32002;;;;;; "calc/calc-prog.el" "calc/calc-rewr.el" "calc/calc-rules.el"
31825;;;;;; "calc/calc-rules.el" "calc/calc-sel.el" "calc/calc-stat.el" 32003;;;;;; "calc/calc-sel.el" "calc/calc-stat.el" "calc/calc-store.el"
31826;;;;;; "calc/calc-store.el" "calc/calc-stuff.el" "calc/calc-trail.el" 32004;;;;;; "calc/calc-stuff.el" "calc/calc-trail.el" "calc/calc-units.el"
31827;;;;;; "calc/calc-units.el" "calc/calc-vec.el" "calc/calc-yank.el" 32005;;;;;; "calc/calc-vec.el" "calc/calc-yank.el" "calc/calcalg2.el"
31828;;;;;; "calc/calcalg2.el" "calc/calcalg3.el" "calc/calccomp.el" 32006;;;;;; "calc/calcalg3.el" "calc/calccomp.el" "calc/calcsel2.el"
31829;;;;;; "calc/calcsel2.el" "calendar/cal-bahai.el" "calendar/cal-coptic.el" 32007;;;;;; "calendar/cal-bahai.el" "calendar/cal-coptic.el" "calendar/cal-french.el"
31830;;;;;; "calendar/cal-french.el" "calendar/cal-html.el" "calendar/cal-islam.el" 32008;;;;;; "calendar/cal-html.el" "calendar/cal-islam.el" "calendar/cal-iso.el"
31831;;;;;; "calendar/cal-iso.el" "calendar/cal-julian.el" "calendar/cal-loaddefs.el" 32009;;;;;; "calendar/cal-julian.el" "calendar/cal-loaddefs.el" "calendar/cal-mayan.el"
31832;;;;;; "calendar/cal-mayan.el" "calendar/cal-menu.el" "calendar/cal-move.el" 32010;;;;;; "calendar/cal-menu.el" "calendar/cal-move.el" "calendar/cal-persia.el"
31833;;;;;; "calendar/cal-persia.el" "calendar/cal-tex.el" "calendar/cal-x.el" 32011;;;;;; "calendar/cal-tex.el" "calendar/cal-x.el" "calendar/diary-loaddefs.el"
31834;;;;;; "calendar/diary-loaddefs.el" "calendar/hol-loaddefs.el" "cdl.el" 32012;;;;;; "calendar/hol-loaddefs.el" "cdl.el" "cedet/cedet-cscope.el"
31835;;;;;; "cedet/cedet-cscope.el" "cedet/cedet-files.el" "cedet/cedet-global.el" 32013;;;;;; "cedet/cedet-files.el" "cedet/cedet-global.el" "cedet/cedet-idutils.el"
31836;;;;;; "cedet/cedet-idutils.el" "cedet/ede/auto.el" "cedet/ede/autoconf-edit.el" 32014;;;;;; "cedet/ede/auto.el" "cedet/ede/autoconf-edit.el" "cedet/ede/base.el"
31837;;;;;; "cedet/ede/base.el" "cedet/ede/cpp-root.el" "cedet/ede/custom.el" 32015;;;;;; "cedet/ede/cpp-root.el" "cedet/ede/custom.el" "cedet/ede/emacs.el"
31838;;;;;; "cedet/ede/emacs.el" "cedet/ede/files.el" "cedet/ede/generic.el" 32016;;;;;; "cedet/ede/files.el" "cedet/ede/generic.el" "cedet/ede/linux.el"
31839;;;;;; "cedet/ede/linux.el" "cedet/ede/loaddefs.el" "cedet/ede/locate.el" 32017;;;;;; "cedet/ede/locate.el" "cedet/ede/make.el" "cedet/ede/makefile-edit.el"
31840;;;;;; "cedet/ede/make.el" "cedet/ede/makefile-edit.el" "cedet/ede/pconf.el" 32018;;;;;; "cedet/ede/pconf.el" "cedet/ede/pmake.el" "cedet/ede/proj-archive.el"
31841;;;;;; "cedet/ede/pmake.el" "cedet/ede/proj-archive.el" "cedet/ede/proj-aux.el" 32019;;;;;; "cedet/ede/proj-aux.el" "cedet/ede/proj-comp.el" "cedet/ede/proj-elisp.el"
31842;;;;;; "cedet/ede/proj-comp.el" "cedet/ede/proj-elisp.el" "cedet/ede/proj-info.el" 32020;;;;;; "cedet/ede/proj-info.el" "cedet/ede/proj-misc.el" "cedet/ede/proj-obj.el"
31843;;;;;; "cedet/ede/proj-misc.el" "cedet/ede/proj-obj.el" "cedet/ede/proj-prog.el" 32021;;;;;; "cedet/ede/proj-prog.el" "cedet/ede/proj-scheme.el" "cedet/ede/proj-shared.el"
31844;;;;;; "cedet/ede/proj-scheme.el" "cedet/ede/proj-shared.el" "cedet/ede/proj.el" 32022;;;;;; "cedet/ede/proj.el" "cedet/ede/shell.el" "cedet/ede/simple.el"
31845;;;;;; "cedet/ede/shell.el" "cedet/ede/simple.el" "cedet/ede/source.el" 32023;;;;;; "cedet/ede/source.el" "cedet/ede/speedbar.el" "cedet/ede/srecode.el"
31846;;;;;; "cedet/ede/speedbar.el" "cedet/ede/srecode.el" "cedet/ede/system.el" 32024;;;;;; "cedet/ede/system.el" "cedet/ede/util.el" "cedet/semantic/analyze.el"
31847;;;;;; "cedet/ede/util.el" "cedet/semantic/analyze.el" "cedet/semantic/analyze/complete.el" 32025;;;;;; "cedet/semantic/analyze/complete.el" "cedet/semantic/analyze/debug.el"
31848;;;;;; "cedet/semantic/analyze/debug.el" "cedet/semantic/analyze/fcn.el" 32026;;;;;; "cedet/semantic/analyze/fcn.el" "cedet/semantic/analyze/refs.el"
31849;;;;;; "cedet/semantic/analyze/refs.el" "cedet/semantic/bovine.el" 32027;;;;;; "cedet/semantic/bovine.el" "cedet/semantic/bovine/c-by.el"
31850;;;;;; "cedet/semantic/bovine/c-by.el" "cedet/semantic/bovine/c.el" 32028;;;;;; "cedet/semantic/bovine/c.el" "cedet/semantic/bovine/debug.el"
31851;;;;;; "cedet/semantic/bovine/debug.el" "cedet/semantic/bovine/el.el" 32029;;;;;; "cedet/semantic/bovine/el.el" "cedet/semantic/bovine/gcc.el"
31852;;;;;; "cedet/semantic/bovine/gcc.el" "cedet/semantic/bovine/make-by.el" 32030;;;;;; "cedet/semantic/bovine/make-by.el" "cedet/semantic/bovine/make.el"
31853;;;;;; "cedet/semantic/bovine/make.el" "cedet/semantic/bovine/scm-by.el" 32031;;;;;; "cedet/semantic/bovine/scm-by.el" "cedet/semantic/bovine/scm.el"
31854;;;;;; "cedet/semantic/bovine/scm.el" "cedet/semantic/chart.el" 32032;;;;;; "cedet/semantic/chart.el" "cedet/semantic/complete.el" "cedet/semantic/ctxt.el"
31855;;;;;; "cedet/semantic/complete.el" "cedet/semantic/ctxt.el" "cedet/semantic/db-debug.el" 32033;;;;;; "cedet/semantic/db-debug.el" "cedet/semantic/db-ebrowse.el"
31856;;;;;; "cedet/semantic/db-ebrowse.el" "cedet/semantic/db-el.el" 32034;;;;;; "cedet/semantic/db-el.el" "cedet/semantic/db-file.el" "cedet/semantic/db-find.el"
31857;;;;;; "cedet/semantic/db-file.el" "cedet/semantic/db-find.el" "cedet/semantic/db-global.el" 32035;;;;;; "cedet/semantic/db-global.el" "cedet/semantic/db-javascript.el"
31858;;;;;; "cedet/semantic/db-javascript.el" "cedet/semantic/db-mode.el" 32036;;;;;; "cedet/semantic/db-mode.el" "cedet/semantic/db-ref.el" "cedet/semantic/db-typecache.el"
31859;;;;;; "cedet/semantic/db-ref.el" "cedet/semantic/db-typecache.el"
31860;;;;;; "cedet/semantic/db.el" "cedet/semantic/debug.el" "cedet/semantic/decorate.el" 32037;;;;;; "cedet/semantic/db.el" "cedet/semantic/debug.el" "cedet/semantic/decorate.el"
31861;;;;;; "cedet/semantic/decorate/include.el" "cedet/semantic/decorate/mode.el" 32038;;;;;; "cedet/semantic/decorate/include.el" "cedet/semantic/decorate/mode.el"
31862;;;;;; "cedet/semantic/dep.el" "cedet/semantic/doc.el" "cedet/semantic/ede-grammar.el" 32039;;;;;; "cedet/semantic/dep.el" "cedet/semantic/doc.el" "cedet/semantic/ede-grammar.el"
@@ -31864,13 +32041,13 @@ Zone out, completely.
31864;;;;;; "cedet/semantic/fw.el" "cedet/semantic/grammar-wy.el" "cedet/semantic/grammar.el" 32041;;;;;; "cedet/semantic/fw.el" "cedet/semantic/grammar-wy.el" "cedet/semantic/grammar.el"
31865;;;;;; "cedet/semantic/html.el" "cedet/semantic/ia-sb.el" "cedet/semantic/ia.el" 32042;;;;;; "cedet/semantic/html.el" "cedet/semantic/ia-sb.el" "cedet/semantic/ia.el"
31866;;;;;; "cedet/semantic/idle.el" "cedet/semantic/imenu.el" "cedet/semantic/java.el" 32043;;;;;; "cedet/semantic/idle.el" "cedet/semantic/imenu.el" "cedet/semantic/java.el"
31867;;;;;; "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el" "cedet/semantic/loaddefs.el" 32044;;;;;; "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el" "cedet/semantic/mru-bookmark.el"
31868;;;;;; "cedet/semantic/mru-bookmark.el" "cedet/semantic/sb.el" "cedet/semantic/scope.el" 32045;;;;;; "cedet/semantic/sb.el" "cedet/semantic/scope.el" "cedet/semantic/senator.el"
31869;;;;;; "cedet/semantic/senator.el" "cedet/semantic/sort.el" "cedet/semantic/symref.el" 32046;;;;;; "cedet/semantic/sort.el" "cedet/semantic/symref.el" "cedet/semantic/symref/cscope.el"
31870;;;;;; "cedet/semantic/symref/cscope.el" "cedet/semantic/symref/filter.el" 32047;;;;;; "cedet/semantic/symref/filter.el" "cedet/semantic/symref/global.el"
31871;;;;;; "cedet/semantic/symref/global.el" "cedet/semantic/symref/grep.el" 32048;;;;;; "cedet/semantic/symref/grep.el" "cedet/semantic/symref/idutils.el"
31872;;;;;; "cedet/semantic/symref/idutils.el" "cedet/semantic/symref/list.el" 32049;;;;;; "cedet/semantic/symref/list.el" "cedet/semantic/tag-file.el"
31873;;;;;; "cedet/semantic/tag-file.el" "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el" 32050;;;;;; "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el"
31874;;;;;; "cedet/semantic/tag.el" "cedet/semantic/texi.el" "cedet/semantic/util-modes.el" 32051;;;;;; "cedet/semantic/tag.el" "cedet/semantic/texi.el" "cedet/semantic/util-modes.el"
31875;;;;;; "cedet/semantic/util.el" "cedet/semantic/wisent.el" "cedet/semantic/wisent/comp.el" 32052;;;;;; "cedet/semantic/util.el" "cedet/semantic/wisent.el" "cedet/semantic/wisent/comp.el"
31876;;;;;; "cedet/semantic/wisent/java-tags.el" "cedet/semantic/wisent/javascript.el" 32053;;;;;; "cedet/semantic/wisent/java-tags.el" "cedet/semantic/wisent/javascript.el"
@@ -31882,52 +32059,51 @@ Zone out, completely.
31882;;;;;; "cedet/srecode/el.el" "cedet/srecode/expandproto.el" "cedet/srecode/extract.el" 32059;;;;;; "cedet/srecode/el.el" "cedet/srecode/expandproto.el" "cedet/srecode/extract.el"
31883;;;;;; "cedet/srecode/fields.el" "cedet/srecode/filters.el" "cedet/srecode/find.el" 32060;;;;;; "cedet/srecode/fields.el" "cedet/srecode/filters.el" "cedet/srecode/find.el"
31884;;;;;; "cedet/srecode/getset.el" "cedet/srecode/insert.el" "cedet/srecode/java.el" 32061;;;;;; "cedet/srecode/getset.el" "cedet/srecode/insert.el" "cedet/srecode/java.el"
31885;;;;;; "cedet/srecode/loaddefs.el" "cedet/srecode/map.el" "cedet/srecode/mode.el" 32062;;;;;; "cedet/srecode/map.el" "cedet/srecode/mode.el" "cedet/srecode/semantic.el"
31886;;;;;; "cedet/srecode/semantic.el" "cedet/srecode/srt-wy.el" "cedet/srecode/srt.el" 32063;;;;;; "cedet/srecode/srt-wy.el" "cedet/srecode/srt.el" "cedet/srecode/table.el"
31887;;;;;; "cedet/srecode/table.el" "cedet/srecode/template.el" "cedet/srecode/texi.el" 32064;;;;;; "cedet/srecode/template.el" "cedet/srecode/texi.el" "cus-dep.el"
31888;;;;;; "cus-dep.el" "dframe.el" "dired-aux.el" "dired-x.el" "dos-fns.el" 32065;;;;;; "dframe.el" "dired-aux.el" "dired-x.el" "dos-fns.el" "dos-vars.el"
31889;;;;;; "dos-vars.el" "dos-w32.el" "dynamic-setting.el" "emacs-lisp/authors.el" 32066;;;;;; "dos-w32.el" "dynamic-setting.el" "emacs-lisp/authors.el"
31890;;;;;; "emacs-lisp/avl-tree.el" "emacs-lisp/bindat.el" "emacs-lisp/byte-opt.el" 32067;;;;;; "emacs-lisp/avl-tree.el" "emacs-lisp/bindat.el" "emacs-lisp/byte-opt.el"
31891;;;;;; "emacs-lisp/cl-extra.el" "emacs-lisp/cl-loaddefs.el" "emacs-lisp/cl-macs.el" 32068;;;;;; "emacs-lisp/cl-extra.el" "emacs-lisp/cl-macs.el" "emacs-lisp/cl-seq.el"
31892;;;;;; "emacs-lisp/cl-seq.el" "emacs-lisp/cl.el" "emacs-lisp/eieio-base.el" 32069;;;;;; "emacs-lisp/cl.el" "emacs-lisp/eieio-base.el" "emacs-lisp/eieio-datadebug.el"
31893;;;;;; "emacs-lisp/eieio-datadebug.el" "emacs-lisp/eieio-speedbar.el" 32070;;;;;; "emacs-lisp/eieio-speedbar.el" "emacs-lisp/find-gc.el" "emacs-lisp/gulp.el"
31894;;;;;; "emacs-lisp/find-gc.el" "emacs-lisp/gulp.el" "emacs-lisp/lisp-mnt.el" 32071;;;;;; "emacs-lisp/lisp-mnt.el" "emacs-lisp/package-x.el" "emacs-lisp/smie.el"
31895;;;;;; "emacs-lisp/package-x.el" "emacs-lisp/smie.el" "emacs-lisp/tcover-ses.el" 32072;;;;;; "emacs-lisp/tcover-ses.el" "emacs-lisp/tcover-unsafep.el"
31896;;;;;; "emacs-lisp/tcover-unsafep.el" "emulation/cua-gmrk.el" "emulation/cua-rect.el" 32073;;;;;; "emulation/cua-gmrk.el" "emulation/cua-rect.el" "emulation/edt-lk201.el"
31897;;;;;; "emulation/edt-lk201.el" "emulation/edt-mapper.el" "emulation/edt-pc.el" 32074;;;;;; "emulation/edt-mapper.el" "emulation/edt-pc.el" "emulation/edt-vt100.el"
31898;;;;;; "emulation/edt-vt100.el" "emulation/tpu-extras.el" "emulation/viper-cmd.el" 32075;;;;;; "emulation/tpu-extras.el" "emulation/viper-cmd.el" "emulation/viper-ex.el"
31899;;;;;; "emulation/viper-ex.el" "emulation/viper-init.el" "emulation/viper-keym.el" 32076;;;;;; "emulation/viper-init.el" "emulation/viper-keym.el" "emulation/viper-macs.el"
31900;;;;;; "emulation/viper-macs.el" "emulation/viper-mous.el" "emulation/viper-util.el" 32077;;;;;; "emulation/viper-mous.el" "emulation/viper-util.el" "erc/erc-backend.el"
31901;;;;;; "erc/erc-backend.el" "erc/erc-goodies.el" "erc/erc-ibuffer.el" 32078;;;;;; "erc/erc-goodies.el" "erc/erc-ibuffer.el" "eshell/em-alias.el"
31902;;;;;; "eshell/em-alias.el" "eshell/em-banner.el" "eshell/em-basic.el" 32079;;;;;; "eshell/em-banner.el" "eshell/em-basic.el" "eshell/em-cmpl.el"
31903;;;;;; "eshell/em-cmpl.el" "eshell/em-dirs.el" "eshell/em-glob.el" 32080;;;;;; "eshell/em-dirs.el" "eshell/em-glob.el" "eshell/em-hist.el"
31904;;;;;; "eshell/em-hist.el" "eshell/em-ls.el" "eshell/em-pred.el" 32081;;;;;; "eshell/em-ls.el" "eshell/em-pred.el" "eshell/em-prompt.el"
31905;;;;;; "eshell/em-prompt.el" "eshell/em-rebind.el" "eshell/em-script.el" 32082;;;;;; "eshell/em-rebind.el" "eshell/em-script.el" "eshell/em-smart.el"
31906;;;;;; "eshell/em-smart.el" "eshell/em-term.el" "eshell/em-tramp.el" 32083;;;;;; "eshell/em-term.el" "eshell/em-tramp.el" "eshell/em-unix.el"
31907;;;;;; "eshell/em-unix.el" "eshell/em-xtra.el" "eshell/esh-arg.el" 32084;;;;;; "eshell/em-xtra.el" "eshell/esh-arg.el" "eshell/esh-cmd.el"
31908;;;;;; "eshell/esh-cmd.el" "eshell/esh-ext.el" "eshell/esh-groups.el" 32085;;;;;; "eshell/esh-ext.el" "eshell/esh-io.el" "eshell/esh-module.el"
31909;;;;;; "eshell/esh-io.el" "eshell/esh-module.el" "eshell/esh-opt.el" 32086;;;;;; "eshell/esh-opt.el" "eshell/esh-proc.el" "eshell/esh-util.el"
31910;;;;;; "eshell/esh-proc.el" "eshell/esh-util.el" "eshell/esh-var.el" 32087;;;;;; "eshell/esh-var.el" "ezimage.el" "format-spec.el" "fringe.el"
31911;;;;;; "ezimage.el" "format-spec.el" "fringe.el" "generic-x.el" 32088;;;;;; "generic-x.el" "gnus/compface.el" "gnus/gnus-async.el" "gnus/gnus-bcklg.el"
31912;;;;;; "gnus/compface.el" "gnus/gnus-async.el" "gnus/gnus-bcklg.el"
31913;;;;;; "gnus/gnus-cite.el" "gnus/gnus-cus.el" "gnus/gnus-demon.el" 32089;;;;;; "gnus/gnus-cite.el" "gnus/gnus-cus.el" "gnus/gnus-demon.el"
31914;;;;;; "gnus/gnus-dup.el" "gnus/gnus-eform.el" "gnus/gnus-ems.el" 32090;;;;;; "gnus/gnus-dup.el" "gnus/gnus-eform.el" "gnus/gnus-ems.el"
31915;;;;;; "gnus/gnus-int.el" "gnus/gnus-logic.el" "gnus/gnus-mh.el" 32091;;;;;; "gnus/gnus-icalendar.el" "gnus/gnus-int.el" "gnus/gnus-logic.el"
31916;;;;;; "gnus/gnus-salt.el" "gnus/gnus-score.el" "gnus/gnus-setup.el" 32092;;;;;; "gnus/gnus-mh.el" "gnus/gnus-salt.el" "gnus/gnus-score.el"
31917;;;;;; "gnus/gnus-srvr.el" "gnus/gnus-topic.el" "gnus/gnus-undo.el" 32093;;;;;; "gnus/gnus-setup.el" "gnus/gnus-srvr.el" "gnus/gnus-topic.el"
31918;;;;;; "gnus/gnus-util.el" "gnus/gnus-uu.el" "gnus/gnus-vm.el" "gnus/gssapi.el" 32094;;;;;; "gnus/gnus-undo.el" "gnus/gnus-util.el" "gnus/gnus-uu.el"
31919;;;;;; "gnus/ietf-drums.el" "gnus/legacy-gnus-agent.el" "gnus/mail-parse.el" 32095;;;;;; "gnus/gnus-vm.el" "gnus/gssapi.el" "gnus/ietf-drums.el" "gnus/legacy-gnus-agent.el"
31920;;;;;; "gnus/mail-prsvr.el" "gnus/mail-source.el" "gnus/mailcap.el" 32096;;;;;; "gnus/mail-parse.el" "gnus/mail-prsvr.el" "gnus/mail-source.el"
31921;;;;;; "gnus/messcompat.el" "gnus/mm-archive.el" "gnus/mm-bodies.el" 32097;;;;;; "gnus/mailcap.el" "gnus/messcompat.el" "gnus/mm-archive.el"
31922;;;;;; "gnus/mm-decode.el" "gnus/mm-util.el" "gnus/mm-view.el" "gnus/mml-sec.el" 32098;;;;;; "gnus/mm-bodies.el" "gnus/mm-decode.el" "gnus/mm-util.el"
31923;;;;;; "gnus/mml-smime.el" "gnus/nnagent.el" "gnus/nnbabyl.el" "gnus/nndir.el" 32099;;;;;; "gnus/mm-view.el" "gnus/mml-sec.el" "gnus/mml-smime.el" "gnus/nnagent.el"
31924;;;;;; "gnus/nndraft.el" "gnus/nneething.el" "gnus/nngateway.el" 32100;;;;;; "gnus/nnbabyl.el" "gnus/nndir.el" "gnus/nndraft.el" "gnus/nneething.el"
31925;;;;;; "gnus/nnheader.el" "gnus/nnimap.el" "gnus/nnir.el" "gnus/nnmail.el" 32101;;;;;; "gnus/nngateway.el" "gnus/nnheader.el" "gnus/nnimap.el" "gnus/nnir.el"
31926;;;;;; "gnus/nnmaildir.el" "gnus/nnmbox.el" "gnus/nnmh.el" "gnus/nnnil.el" 32102;;;;;; "gnus/nnmail.el" "gnus/nnmaildir.el" "gnus/nnmbox.el" "gnus/nnmh.el"
31927;;;;;; "gnus/nnoo.el" "gnus/nnregistry.el" "gnus/nnrss.el" "gnus/nnspool.el" 32103;;;;;; "gnus/nnnil.el" "gnus/nnoo.el" "gnus/nnregistry.el" "gnus/nnrss.el"
31928;;;;;; "gnus/nntp.el" "gnus/nnvirtual.el" "gnus/nnweb.el" "gnus/registry.el" 32104;;;;;; "gnus/nnspool.el" "gnus/nntp.el" "gnus/nnvirtual.el" "gnus/nnweb.el"
31929;;;;;; "gnus/rfc1843.el" "gnus/rfc2045.el" "gnus/rfc2047.el" "gnus/rfc2104.el" 32105;;;;;; "gnus/registry.el" "gnus/rfc1843.el" "gnus/rfc2045.el" "gnus/rfc2047.el"
31930;;;;;; "gnus/rfc2231.el" "gnus/rtree.el" "gnus/sieve-manage.el" 32106;;;;;; "gnus/rfc2104.el" "gnus/rfc2231.el" "gnus/rtree.el" "gnus/sieve-manage.el"
31931;;;;;; "gnus/smime.el" "gnus/spam-stat.el" "gnus/spam-wash.el" "hex-util.el" 32107;;;;;; "gnus/smime.el" "gnus/spam-stat.el" "gnus/spam-wash.el" "hex-util.el"
31932;;;;;; "hfy-cmap.el" "ibuf-ext.el" "international/cp51932.el" "international/eucjp-ms.el" 32108;;;;;; "hfy-cmap.el" "ibuf-ext.el" "international/cp51932.el" "international/eucjp-ms.el"
31933;;;;;; "international/fontset.el" "international/iso-ascii.el" "international/ja-dic-cnv.el" 32109;;;;;; "international/fontset.el" "international/iso-ascii.el" "international/ja-dic-cnv.el"
@@ -32018,7 +32194,7 @@ Zone out, completely.
32018;;;;;; "vc/ediff-vers.el" "vc/ediff-wind.el" "vc/pcvs-info.el" "vc/pcvs-parse.el" 32194;;;;;; "vc/ediff-vers.el" "vc/ediff-wind.el" "vc/pcvs-info.el" "vc/pcvs-parse.el"
32019;;;;;; "vc/pcvs-util.el" "vc/vc-dav.el" "vcursor.el" "vt-control.el" 32195;;;;;; "vc/pcvs-util.el" "vc/vc-dav.el" "vcursor.el" "vt-control.el"
32020;;;;;; "vt100-led.el" "w32-common-fns.el" "w32-fns.el" "w32-vars.el" 32196;;;;;; "vt100-led.el" "w32-common-fns.el" "w32-fns.el" "w32-vars.el"
32021;;;;;; "x-dnd.el") (20945 22525 596830 318000)) 32197;;;;;; "x-dnd.el") (21027 5557 48411 587000))
32022 32198
32023;;;*** 32199;;;***
32024 32200
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index e07d28a54d0..c505a74c23d 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -38,7 +38,7 @@
38 38
39;;; Bugs: 39;;; Bugs:
40 40
41;; - completion-all-sorted-completions list all the completions, whereas 41;; - completion-all-sorted-completions lists all the completions, whereas
42;; it should only lists the ones that `try-completion' would consider. 42;; it should only lists the ones that `try-completion' would consider.
43;; E.g. it should honor completion-ignored-extensions. 43;; E.g. it should honor completion-ignored-extensions.
44;; - choose-completion can't automatically figure out the boundaries 44;; - choose-completion can't automatically figure out the boundaries
@@ -145,7 +145,7 @@ Like CL's `some'."
145 (let ((firsterror nil) 145 (let ((firsterror nil)
146 res) 146 res)
147 (while (and (not res) xs) 147 (while (and (not res) xs)
148 (condition-case err 148 (condition-case-unless-debug err
149 (setq res (funcall fun (pop xs))) 149 (setq res (funcall fun (pop xs)))
150 (error (unless firsterror (setq firsterror err)) nil))) 150 (error (unless firsterror (setq firsterror err)) nil)))
151 (or res 151 (or res
@@ -623,7 +623,8 @@ If ARGS are provided, then pass MESSAGE through `format'."
623 (message nil))) 623 (message nil)))
624 ;; Clear out any old echo-area message to make way for our new thing. 624 ;; Clear out any old echo-area message to make way for our new thing.
625 (message nil) 625 (message nil)
626 (setq message (if (and (null args) (string-match-p "\\` *\\[.+\\]\\'" message)) 626 (setq message (if (and (null args)
627 (string-match-p "\\` *\\[.+\\]\\'" message))
627 ;; Make sure we can put-text-property. 628 ;; Make sure we can put-text-property.
628 (copy-sequence message) 629 (copy-sequence message)
629 (concat " [" message "]"))) 630 (concat " [" message "]")))
@@ -651,7 +652,7 @@ If ARGS are provided, then pass MESSAGE through `format'."
651 "Return the user input in a minibuffer before point as a string. 652 "Return the user input in a minibuffer before point as a string.
652In Emacs-22, that was what completion commands operated on." 653In Emacs-22, that was what completion commands operated on."
653 (declare (obsolete nil "24.4")) 654 (declare (obsolete nil "24.4"))
654 (buffer-substring (field-beginning) (point))) 655 (buffer-substring (minibuffer-prompt-end) (point)))
655 656
656(defun delete-minibuffer-contents () 657(defun delete-minibuffer-contents ()
657 "Delete all user input in a minibuffer. 658 "Delete all user input in a minibuffer.
@@ -670,8 +671,7 @@ If the value is t the *Completion* buffer is displayed whenever completion
670is requested but cannot be done. 671is requested but cannot be done.
671If the value is `lazy', the *Completions* buffer is only displayed after 672If the value is `lazy', the *Completions* buffer is only displayed after
672the second failed attempt to complete." 673the second failed attempt to complete."
673 :type '(choice (const nil) (const t) (const lazy)) 674 :type '(choice (const nil) (const t) (const lazy)))
674 :group 'minibuffer)
675 675
676(defconst completion-styles-alist 676(defconst completion-styles-alist
677 '((emacs21 677 '((emacs21
@@ -750,7 +750,6 @@ The available styles are listed in `completion-styles-alist'.
750Note that `completion-category-overrides' may override these 750Note that `completion-category-overrides' may override these
751styles for specific categories, such as files, buffers, etc." 751styles for specific categories, such as files, buffers, etc."
752 :type completion--styles-type 752 :type completion--styles-type
753 :group 'minibuffer
754 :version "23.1") 753 :version "23.1")
755 754
756(defcustom completion-category-overrides 755(defcustom completion-category-overrides
@@ -880,7 +879,7 @@ Moves point to the end of the new text."
880 879
881(defcustom completion-cycle-threshold nil 880(defcustom completion-cycle-threshold nil
882 "Number of completion candidates below which cycling is used. 881 "Number of completion candidates below which cycling is used.
883Depending on this setting `minibuffer-complete' may use cycling, 882Depending on this setting `completion-in-region' may use cycling,
884like `minibuffer-force-complete'. 883like `minibuffer-force-complete'.
885If nil, cycling is never used. 884If nil, cycling is never used.
886If t, cycling is always used. 885If t, cycling is always used.
@@ -894,8 +893,7 @@ completion candidates than this number."
894 (over (assq 'cycle (cdr (assq cat completion-category-overrides))))) 893 (over (assq 'cycle (cdr (assq cat completion-category-overrides)))))
895 (if over (cdr over) completion-cycle-threshold))) 894 (if over (cdr over) completion-cycle-threshold)))
896 895
897(defvar completion-all-sorted-completions nil) 896(defvar-local completion-all-sorted-completions nil)
898(make-variable-buffer-local 'completion-all-sorted-completions)
899(defvar-local completion--all-sorted-completions-location nil) 897(defvar-local completion--all-sorted-completions-location nil)
900(defvar completion-cycling nil) 898(defvar completion-cycling nil)
901 899
@@ -906,8 +904,8 @@ completion candidates than this number."
906 (if completion-show-inline-help 904 (if completion-show-inline-help
907 (minibuffer-message msg))) 905 (minibuffer-message msg)))
908 906
909(defun completion--do-completion (&optional try-completion-function 907(defun completion--do-completion (beg end &optional
910 expect-exact) 908 try-completion-function expect-exact)
911 "Do the completion and return a summary of what happened. 909 "Do the completion and return a summary of what happened.
912M = completion was performed, the text was Modified. 910M = completion was performed, the text was Modified.
913C = there were available Completions. 911C = there were available Completions.
@@ -926,9 +924,7 @@ E = after completion we now have an Exact match.
926TRY-COMPLETION-FUNCTION is a function to use in place of `try-completion'. 924TRY-COMPLETION-FUNCTION is a function to use in place of `try-completion'.
927EXPECT-EXACT, if non-nil, means that there is no need to tell the user 925EXPECT-EXACT, if non-nil, means that there is no need to tell the user
928when the buffer's text is already an exact match." 926when the buffer's text is already an exact match."
929 (let* ((beg (field-beginning)) 927 (let* ((string (buffer-substring beg end))
930 (end (field-end))
931 (string (buffer-substring beg end))
932 (md (completion--field-metadata beg)) 928 (md (completion--field-metadata beg))
933 (comp (funcall (or try-completion-function 929 (comp (funcall (or try-completion-function
934 'completion-try-completion) 930 'completion-try-completion)
@@ -963,7 +959,8 @@ when the buffer's text is already an exact match."
963 (if unchanged 959 (if unchanged
964 (goto-char end) 960 (goto-char end)
965 ;; Insert in minibuffer the chars we got. 961 ;; Insert in minibuffer the chars we got.
966 (completion--replace beg end completion)) 962 (completion--replace beg end completion)
963 (setq end (+ beg (length completion))))
967 ;; Move point to its completion-mandated destination. 964 ;; Move point to its completion-mandated destination.
968 (forward-char (- comp-pos (length completion))) 965 (forward-char (- comp-pos (length completion)))
969 966
@@ -972,7 +969,8 @@ when the buffer's text is already an exact match."
972 ;; whether this is a unique completion or not, so try again using 969 ;; whether this is a unique completion or not, so try again using
973 ;; the real case (this shouldn't recurse again, because the next 970 ;; the real case (this shouldn't recurse again, because the next
974 ;; time try-completion will return either t or the exact string). 971 ;; time try-completion will return either t or the exact string).
975 (completion--do-completion try-completion-function expect-exact) 972 (completion--do-completion beg end
973 try-completion-function expect-exact)
976 974
977 ;; It did find a match. Do we match some possibility exactly now? 975 ;; It did find a match. Do we match some possibility exactly now?
978 (let* ((exact (test-completion completion 976 (let* ((exact (test-completion completion
@@ -995,7 +993,7 @@ when the buffer's text is already an exact match."
995 minibuffer-completion-predicate 993 minibuffer-completion-predicate
996 "")) 994 ""))
997 comp-pos))) 995 comp-pos)))
998 (completion-all-sorted-completions)))) 996 (completion-all-sorted-completions beg end))))
999 (completion--flush-all-sorted-completions) 997 (completion--flush-all-sorted-completions)
1000 (cond 998 (cond
1001 ((and (consp (cdr comps)) ;; There's something to cycle. 999 ((and (consp (cdr comps)) ;; There's something to cycle.
@@ -1006,8 +1004,8 @@ when the buffer's text is already an exact match."
1006 ;; Not more than completion-cycle-threshold remaining 1004 ;; Not more than completion-cycle-threshold remaining
1007 ;; completions: let's cycle. 1005 ;; completions: let's cycle.
1008 (setq completed t exact t) 1006 (setq completed t exact t)
1009 (completion--cache-all-sorted-completions comps) 1007 (completion--cache-all-sorted-completions beg end comps)
1010 (minibuffer-force-complete)) 1008 (minibuffer-force-complete beg end))
1011 (completed 1009 (completed
1012 ;; We could also decide to refresh the completions, 1010 ;; We could also decide to refresh the completions,
1013 ;; if they're displayed (and assuming there are 1011 ;; if they're displayed (and assuming there are
@@ -1024,14 +1022,14 @@ when the buffer's text is already an exact match."
1024 (if (pcase completion-auto-help 1022 (if (pcase completion-auto-help
1025 (`lazy (eq this-command last-command)) 1023 (`lazy (eq this-command last-command))
1026 (_ completion-auto-help)) 1024 (_ completion-auto-help))
1027 (minibuffer-completion-help) 1025 (minibuffer-completion-help beg end)
1028 (completion--message "Next char not unique"))) 1026 (completion--message "Next char not unique")))
1029 ;; If the last exact completion and this one were the same, it 1027 ;; If the last exact completion and this one were the same, it
1030 ;; means we've already given a "Complete, but not unique" message 1028 ;; means we've already given a "Complete, but not unique" message
1031 ;; and the user's hit TAB again, so now we give him help. 1029 ;; and the user's hit TAB again, so now we give him help.
1032 (t 1030 (t
1033 (if (and (eq this-command last-command) completion-auto-help) 1031 (if (and (eq this-command last-command) completion-auto-help)
1034 (minibuffer-completion-help)) 1032 (minibuffer-completion-help beg end))
1035 (completion--done completion 'exact 1033 (completion--done completion 'exact
1036 (unless expect-exact 1034 (unless expect-exact
1037 "Complete, but not unique")))) 1035 "Complete, but not unique"))))
@@ -1045,6 +1043,11 @@ If no characters can be completed, display a list of possible completions.
1045If you repeat this command after it displayed such a list, 1043If you repeat this command after it displayed such a list,
1046scroll the window of possible completions." 1044scroll the window of possible completions."
1047 (interactive) 1045 (interactive)
1046 (completion-in-region (minibuffer-prompt-end) (point-max)
1047 minibuffer-completion-table
1048 minibuffer-completion-predicate))
1049
1050(defun completion--in-region-1 (beg end)
1048 ;; If the previous command was not this, 1051 ;; If the previous command was not this,
1049 ;; mark the completion buffer obsolete. 1052 ;; mark the completion buffer obsolete.
1050 (setq this-command 'completion-at-point) 1053 (setq this-command 'completion-at-point)
@@ -1067,17 +1070,17 @@ scroll the window of possible completions."
1067 nil))) 1070 nil)))
1068 ;; If we're cycling, keep on cycling. 1071 ;; If we're cycling, keep on cycling.
1069 ((and completion-cycling completion-all-sorted-completions) 1072 ((and completion-cycling completion-all-sorted-completions)
1070 (minibuffer-force-complete) 1073 (minibuffer-force-complete beg end)
1071 t) 1074 t)
1072 (t (pcase (completion--do-completion) 1075 (t (pcase (completion--do-completion beg end)
1073 (#b000 nil) 1076 (#b000 nil)
1074 (_ t))))) 1077 (_ t)))))
1075 1078
1076(defun completion--cache-all-sorted-completions (comps) 1079(defun completion--cache-all-sorted-completions (beg end comps)
1077 (add-hook 'after-change-functions 1080 (add-hook 'after-change-functions
1078 'completion--flush-all-sorted-completions nil t) 1081 'completion--flush-all-sorted-completions nil t)
1079 (setq completion--all-sorted-completions-location 1082 (setq completion--all-sorted-completions-location
1080 (cons (copy-marker (field-beginning)) (copy-marker (field-end)))) 1083 (cons (copy-marker beg) (copy-marker end)))
1081 (setq completion-all-sorted-completions comps)) 1084 (setq completion-all-sorted-completions comps))
1082 1085
1083(defun completion--flush-all-sorted-completions (&optional start end _len) 1086(defun completion--flush-all-sorted-completions (&optional start end _len)
@@ -1097,10 +1100,10 @@ scroll the window of possible completions."
1097 (if (eq (car bounds) base) md-at-point 1100 (if (eq (car bounds) base) md-at-point
1098 (completion-metadata (substring string 0 base) table pred)))) 1101 (completion-metadata (substring string 0 base) table pred))))
1099 1102
1100(defun completion-all-sorted-completions () 1103(defun completion-all-sorted-completions (start end)
1101 (or completion-all-sorted-completions 1104 (or completion-all-sorted-completions
1102 (let* ((start (field-beginning)) 1105 (let* ((start (or start (minibuffer-prompt-end)))
1103 (end (field-end)) 1106 (end (or end (point-max)))
1104 (string (buffer-substring start end)) 1107 (string (buffer-substring start end))
1105 (md (completion--field-metadata start)) 1108 (md (completion--field-metadata start))
1106 (all (completion-all-completions 1109 (all (completion-all-completions
@@ -1138,18 +1141,20 @@ scroll the window of possible completions."
1138 ;; Cache the result. This is not just for speed, but also so that 1141 ;; Cache the result. This is not just for speed, but also so that
1139 ;; repeated calls to minibuffer-force-complete can cycle through 1142 ;; repeated calls to minibuffer-force-complete can cycle through
1140 ;; all possibilities. 1143 ;; all possibilities.
1141 (completion--cache-all-sorted-completions (nconc all base-size)))))) 1144 (completion--cache-all-sorted-completions
1145 start end (nconc all base-size))))))
1142 1146
1143(defun minibuffer-force-complete-and-exit () 1147(defun minibuffer-force-complete-and-exit ()
1144 "Complete the minibuffer with first of the matches and exit." 1148 "Complete the minibuffer with first of the matches and exit."
1145 (interactive) 1149 (interactive)
1146 (minibuffer-force-complete) 1150 (minibuffer-force-complete)
1147 (minibuffer--complete-and-exit 1151 (completion--complete-and-exit
1152 (minibuffer-prompt-end) (point-max) #'exit-minibuffer
1148 ;; If the previous completion completed to an element which fails 1153 ;; If the previous completion completed to an element which fails
1149 ;; test-completion, then we shouldn't exit, but that should be rare. 1154 ;; test-completion, then we shouldn't exit, but that should be rare.
1150 (lambda () (minibuffer-message "Incomplete")))) 1155 (lambda () (minibuffer-message "Incomplete"))))
1151 1156
1152(defun minibuffer-force-complete () 1157(defun minibuffer-force-complete (&optional start end)
1153 "Complete the minibuffer to an exact match. 1158 "Complete the minibuffer to an exact match.
1154Repeated uses step through the possible completions." 1159Repeated uses step through the possible completions."
1155 (interactive) 1160 (interactive)
@@ -1157,10 +1162,10 @@ Repeated uses step through the possible completions."
1157 ;; FIXME: Need to deal with the extra-size issue here as well. 1162 ;; FIXME: Need to deal with the extra-size issue here as well.
1158 ;; FIXME: ~/src/emacs/t<M-TAB>/lisp/minibuffer.el completes to 1163 ;; FIXME: ~/src/emacs/t<M-TAB>/lisp/minibuffer.el completes to
1159 ;; ~/src/emacs/trunk/ and throws away lisp/minibuffer.el. 1164 ;; ~/src/emacs/trunk/ and throws away lisp/minibuffer.el.
1160 (let* ((start (copy-marker (field-beginning))) 1165 (let* ((start (copy-marker (or start (minibuffer-prompt-end))))
1161 (end (field-end)) 1166 (end (or end (point-max)))
1162 ;; (md (completion--field-metadata start)) 1167 ;; (md (completion--field-metadata start))
1163 (all (completion-all-sorted-completions)) 1168 (all (completion-all-sorted-completions start end))
1164 (base (+ start (or (cdr (last all)) 0)))) 1169 (base (+ start (or (cdr (last all)) 0))))
1165 (cond 1170 (cond
1166 ((not (consp all)) 1171 ((not (consp all))
@@ -1173,10 +1178,11 @@ Repeated uses step through the possible completions."
1173 'finished (when done "Sole completion")))) 1178 'finished (when done "Sole completion"))))
1174 (t 1179 (t
1175 (completion--replace base end (car all)) 1180 (completion--replace base end (car all))
1181 (setq end (+ base (length (car all))))
1176 (completion--done (buffer-substring-no-properties start (point)) 'sole) 1182 (completion--done (buffer-substring-no-properties start (point)) 'sole)
1177 ;; Set cycling after modifying the buffer since the flush hook resets it. 1183 ;; Set cycling after modifying the buffer since the flush hook resets it.
1178 (setq completion-cycling t) 1184 (setq completion-cycling t)
1179 (setq this-command 'completion-at-point) ;For minibuffer-complete. 1185 (setq this-command 'completion-at-point) ;For completion-in-region.
1180 ;; If completing file names, (car all) may be a directory, so we'd now 1186 ;; If completing file names, (car all) may be a directory, so we'd now
1181 ;; have a new set of possible completions and might want to reset 1187 ;; have a new set of possible completions and might want to reset
1182 ;; completion-all-sorted-completions to nil, but we prefer not to, 1188 ;; completion-all-sorted-completions to nil, but we prefer not to,
@@ -1184,7 +1190,7 @@ Repeated uses step through the possible completions."
1184 ;; through the previous possible completions. 1190 ;; through the previous possible completions.
1185 (let ((last (last all))) 1191 (let ((last (last all)))
1186 (setcdr last (cons (car all) (cdr last))) 1192 (setcdr last (cons (car all) (cdr last)))
1187 (completion--cache-all-sorted-completions (cdr all))) 1193 (completion--cache-all-sorted-completions start end (cdr all)))
1188 ;; Make sure repeated uses cycle, even though completion--done might 1194 ;; Make sure repeated uses cycle, even though completion--done might
1189 ;; have added a space or something that moved us outside of the field. 1195 ;; have added a space or something that moved us outside of the field.
1190 ;; (bug#12221). 1196 ;; (bug#12221).
@@ -1223,27 +1229,32 @@ If `minibuffer-completion-confirm' is `confirm-after-completion',
1223 `minibuffer-confirm-exit-commands', and accept the input 1229 `minibuffer-confirm-exit-commands', and accept the input
1224 otherwise." 1230 otherwise."
1225 (interactive) 1231 (interactive)
1226 (minibuffer--complete-and-exit 1232 (completion-complete-and-exit (minibuffer-prompt-end) (point-max)
1233 #'exit-minibuffer))
1234
1235(defun completion-complete-and-exit (beg end exit-function)
1236 (completion--complete-and-exit
1237 beg end exit-function
1227 (lambda () 1238 (lambda ()
1228 (pcase (condition-case nil 1239 (pcase (condition-case nil
1229 (completion--do-completion nil 'expect-exact) 1240 (completion--do-completion beg end
1241 nil 'expect-exact)
1230 (error 1)) 1242 (error 1))
1231 ((or #b001 #b011) (exit-minibuffer)) 1243 ((or #b001 #b011) (funcall exit-function))
1232 (#b111 (if (not minibuffer-completion-confirm) 1244 (#b111 (if (not minibuffer-completion-confirm)
1233 (exit-minibuffer) 1245 (funcall exit-function)
1234 (minibuffer-message "Confirm") 1246 (minibuffer-message "Confirm")
1235 nil)) 1247 nil))
1236 (_ nil))))) 1248 (_ nil)))))
1237 1249
1238(defun minibuffer--complete-and-exit (completion-function) 1250(defun completion--complete-and-exit (beg end
1251 exit-function completion-function)
1239 "Exit from `require-match' minibuffer. 1252 "Exit from `require-match' minibuffer.
1240COMPLETION-FUNCTION is called if the current buffer's content does not 1253COMPLETION-FUNCTION is called if the current buffer's content does not
1241appear to be a match." 1254appear to be a match."
1242 (let ((beg (field-beginning))
1243 (end (field-end)))
1244 (cond 1255 (cond
1245 ;; Allow user to specify null string 1256 ;; Allow user to specify null string
1246 ((= beg end) (exit-minibuffer)) 1257 ((= beg end) (funcall exit-function))
1247 ((test-completion (buffer-substring beg end) 1258 ((test-completion (buffer-substring beg end)
1248 minibuffer-completion-table 1259 minibuffer-completion-table
1249 minibuffer-completion-predicate) 1260 minibuffer-completion-predicate)
@@ -1269,7 +1280,7 @@ appear to be a match."
1269 ;; that file. 1280 ;; that file.
1270 (= (length string) (length compl))) 1281 (= (length string) (length compl)))
1271 (completion--replace beg end compl)))) 1282 (completion--replace beg end compl))))
1272 (exit-minibuffer)) 1283 (funcall exit-function))
1273 1284
1274 ((memq minibuffer-completion-confirm '(confirm confirm-after-completion)) 1285 ((memq minibuffer-completion-confirm '(confirm confirm-after-completion))
1275 ;; The user is permitted to exit with an input that's rejected 1286 ;; The user is permitted to exit with an input that's rejected
@@ -1280,13 +1291,13 @@ appear to be a match."
1280 ;; catches most minibuffer typos). 1291 ;; catches most minibuffer typos).
1281 (and (eq minibuffer-completion-confirm 'confirm-after-completion) 1292 (and (eq minibuffer-completion-confirm 'confirm-after-completion)
1282 (not (memq last-command minibuffer-confirm-exit-commands)))) 1293 (not (memq last-command minibuffer-confirm-exit-commands))))
1283 (exit-minibuffer) 1294 (funcall exit-function)
1284 (minibuffer-message "Confirm") 1295 (minibuffer-message "Confirm")
1285 nil)) 1296 nil))
1286 1297
1287 (t 1298 (t
1288 ;; Call do-completion, but ignore errors. 1299 ;; Call do-completion, but ignore errors.
1289 (funcall completion-function))))) 1300 (funcall completion-function))))
1290 1301
1291(defun completion--try-word-completion (string table predicate point md) 1302(defun completion--try-word-completion (string table predicate point md)
1292 (let ((comp (completion-try-completion string table predicate point md))) 1303 (let ((comp (completion-try-completion string table predicate point md)))
@@ -1381,9 +1392,18 @@ After one word is completed as much as possible, a space or hyphen
1381is added, provided that matches some possible completion. 1392is added, provided that matches some possible completion.
1382Return nil if there is no valid completion, else t." 1393Return nil if there is no valid completion, else t."
1383 (interactive) 1394 (interactive)
1384 (pcase (completion--do-completion 'completion--try-word-completion) 1395 (completion-in-region--single-word
1396 (minibuffer-prompt-end) (point-max)
1397 minibuffer-completion-table minibuffer-completion-predicate))
1398
1399(defun completion-in-region--single-word (beg end collection
1400 &optional predicate)
1401 (let ((minibuffer-completion-table collection)
1402 (minibuffer-completion-predicate predicate))
1403 (pcase (completion--do-completion beg end
1404 #'completion--try-word-completion)
1385 (#b000 nil) 1405 (#b000 nil)
1386 (_ t))) 1406 (_ t))))
1387 1407
1388(defface completions-annotations '((t :inherit italic)) 1408(defface completions-annotations '((t :inherit italic))
1389 "Face to use for annotations in the *Completions* buffer.") 1409 "Face to use for annotations in the *Completions* buffer.")
@@ -1395,7 +1415,6 @@ in columns in the *Completions* buffer.
1395If the value is `horizontal', display completions sorted 1415If the value is `horizontal', display completions sorted
1396horizontally in alphabetical order, rather than down the screen." 1416horizontally in alphabetical order, rather than down the screen."
1397 :type '(choice (const horizontal) (const vertical)) 1417 :type '(choice (const horizontal) (const vertical))
1398 :group 'minibuffer
1399 :version "23.2") 1418 :version "23.2")
1400 1419
1401(defun completion--insert-strings (strings) 1420(defun completion--insert-strings (strings)
@@ -1504,15 +1523,13 @@ See also `display-completion-list'.")
1504 1523
1505(defface completions-first-difference 1524(defface completions-first-difference
1506 '((t (:inherit bold))) 1525 '((t (:inherit bold)))
1507 "Face added on the first uncommon character in completions in *Completions* buffer." 1526 "Face added on the first uncommon character in completions in *Completions* buffer.")
1508 :group 'completion)
1509 1527
1510(defface completions-common-part '((t nil)) 1528(defface completions-common-part '((t nil))
1511 "Face added on the common prefix substring in completions in *Completions* buffer. 1529 "Face added on the common prefix substring in completions in *Completions* buffer.
1512The idea of `completions-common-part' is that you can use it to 1530The idea of `completions-common-part' is that you can use it to
1513make the common parts less visible than normal, so that the rest 1531make the common parts less visible than normal, so that the rest
1514of the differing parts is, by contrast, slightly highlighted." 1532of the differing parts is, by contrast, slightly highlighted.")
1515 :group 'completion)
1516 1533
1517(defun completion-hilit-commonality (completions prefix-len base-size) 1534(defun completion-hilit-commonality (completions prefix-len base-size)
1518 (when completions 1535 (when completions
@@ -1555,12 +1572,8 @@ alternative, the second serves as annotation.
1555The actual completion alternatives, as inserted, are given `mouse-face' 1572The actual completion alternatives, as inserted, are given `mouse-face'
1556properties of `highlight'. 1573properties of `highlight'.
1557At the end, this runs the normal hook `completion-setup-hook'. 1574At the end, this runs the normal hook `completion-setup-hook'.
1558It can find the completion buffer in `standard-output'. 1575It can find the completion buffer in `standard-output'."
1559 1576 (declare (advertised-calling-convention (completions) "24.4"))
1560The obsolete optional arg COMMON-SUBSTRING, if non-nil, should be a string
1561specifying a common substring for adding the faces
1562`completions-first-difference' and `completions-common-part' to
1563the completions buffer."
1564 (if common-substring 1577 (if common-substring
1565 (setq completions (completion-hilit-commonality 1578 (setq completions (completion-hilit-commonality
1566 completions (length common-substring) 1579 completions (length common-substring)
@@ -1647,19 +1660,19 @@ variables.")
1647 (equal pre-msg (and exit-fun (current-message)))) 1660 (equal pre-msg (and exit-fun (current-message))))
1648 (completion--message message)))) 1661 (completion--message message))))
1649 1662
1650(defun minibuffer-completion-help () 1663(defun minibuffer-completion-help (&optional start end)
1651 "Display a list of possible completions of the current minibuffer contents." 1664 "Display a list of possible completions of the current minibuffer contents."
1652 (interactive) 1665 (interactive)
1653 (message "Making completion list...") 1666 (message "Making completion list...")
1654 (let* ((start (field-beginning)) 1667 (let* ((start (or start (minibuffer-prompt-end)))
1655 (end (field-end)) 1668 (end (or end (point-max)))
1656 (string (field-string)) 1669 (string (buffer-substring start end))
1657 (md (completion--field-metadata start)) 1670 (md (completion--field-metadata start))
1658 (completions (completion-all-completions 1671 (completions (completion-all-completions
1659 string 1672 string
1660 minibuffer-completion-table 1673 minibuffer-completion-table
1661 minibuffer-completion-predicate 1674 minibuffer-completion-predicate
1662 (- (point) (field-beginning)) 1675 (- (point) start)
1663 md))) 1676 md)))
1664 (message nil) 1677 (message nil)
1665 (if (or (null completions) 1678 (if (or (null completions)
@@ -1811,7 +1824,6 @@ exit."
1811 (if (memq system-type '(ms-dos windows-nt darwin cygwin)) 1824 (if (memq system-type '(ms-dos windows-nt darwin cygwin))
1812 t nil) 1825 t nil)
1813 "Non-nil means when reading a file name completion ignores case." 1826 "Non-nil means when reading a file name completion ignores case."
1814 :group 'minibuffer
1815 :type 'boolean 1827 :type 'boolean
1816 :version "22.1") 1828 :version "22.1")
1817 1829
@@ -1821,22 +1833,15 @@ exit."
1821 ;; completions" operation as well. 1833 ;; completions" operation as well.
1822 completion-in-region-functions (start end collection predicate) 1834 completion-in-region-functions (start end collection predicate)
1823 (let ((minibuffer-completion-table collection) 1835 (let ((minibuffer-completion-table collection)
1824 (minibuffer-completion-predicate predicate) 1836 (minibuffer-completion-predicate predicate))
1825 (ol (make-overlay start end nil nil t)))
1826 (overlay-put ol 'field 'completion)
1827 ;; HACK: if the text we are completing is already in a field, we 1837 ;; HACK: if the text we are completing is already in a field, we
1828 ;; want the completion field to take priority (e.g. Bug#6830). 1838 ;; want the completion field to take priority (e.g. Bug#6830).
1829 (overlay-put ol 'priority 100)
1830 (when completion-in-region-mode-predicate 1839 (when completion-in-region-mode-predicate
1831 (completion-in-region-mode 1) 1840 (completion-in-region-mode 1)
1832 (setq completion-in-region--data 1841 (setq completion-in-region--data
1833 (list (if (markerp start) start (copy-marker start)) 1842 (list (if (markerp start) start (copy-marker start))
1834 (copy-marker end) collection))) 1843 (copy-marker end) collection)))
1835 ;; FIXME: `minibuffer-complete' should call `completion-in-region' rather 1844 (completion--in-region-1 start end))))
1836 ;; than the other way around!
1837 (unwind-protect
1838 (call-interactively 'minibuffer-complete)
1839 (delete-overlay ol)))))
1840 1845
1841(defvar completion-in-region-mode-map 1846(defvar completion-in-region-mode-map
1842 (let ((map (make-sparse-keymap))) 1847 (let ((map (make-sparse-keymap)))
@@ -2001,19 +2006,14 @@ The completion method is determined by `completion-at-point-functions'."
2001 (lambda () 2006 (lambda ()
2002 ;; We're still in the same completion field. 2007 ;; We're still in the same completion field.
2003 (let ((newstart (car-safe (funcall hookfun)))) 2008 (let ((newstart (car-safe (funcall hookfun))))
2004 (and newstart (= newstart start))))) 2009 (and newstart (= newstart start))))))
2005 (ol (make-overlay start end nil nil t)))
2006 ;; FIXME: We should somehow (ab)use completion-in-region-function or 2010 ;; FIXME: We should somehow (ab)use completion-in-region-function or
2007 ;; introduce a corresponding hook (plus another for word-completion, 2011 ;; introduce a corresponding hook (plus another for word-completion,
2008 ;; and another for force-completion, maybe?). 2012 ;; and another for force-completion, maybe?).
2009 (overlay-put ol 'field 'completion)
2010 (overlay-put ol 'priority 100)
2011 (completion-in-region-mode 1) 2013 (completion-in-region-mode 1)
2012 (setq completion-in-region--data 2014 (setq completion-in-region--data
2013 (list start (copy-marker end) collection)) 2015 (list start (copy-marker end) collection))
2014 (unwind-protect 2016 (minibuffer-completion-help start end)))
2015 (call-interactively 'minibuffer-completion-help)
2016 (delete-overlay ol))))
2017 (`(,hookfun . ,_) 2017 (`(,hookfun . ,_)
2018 ;; The hook function already performed completion :-( 2018 ;; The hook function already performed completion :-(
2019 ;; Not much we can do at this point. 2019 ;; Not much we can do at this point.
@@ -2308,7 +2308,6 @@ the minibuffer empty.
2308For some commands, exiting with an empty minibuffer has a special meaning, 2308For some commands, exiting with an empty minibuffer has a special meaning,
2309such as making the current buffer visit no file in the case of 2309such as making the current buffer visit no file in the case of
2310`set-visited-file-name'." 2310`set-visited-file-name'."
2311 :group 'minibuffer
2312 :type 'boolean) 2311 :type 'boolean)
2313 2312
2314;; Not always defined, but only called if next-read-file-uses-dialog-p says so. 2313;; Not always defined, but only called if next-read-file-uses-dialog-p says so.
@@ -2701,7 +2700,6 @@ expression (not containing character ranges like `a-z')."
2701 ;; Refresh other vars. 2700 ;; Refresh other vars.
2702 (completion-pcm--prepare-delim-re value)) 2701 (completion-pcm--prepare-delim-re value))
2703 :initialize 'custom-initialize-reset 2702 :initialize 'custom-initialize-reset
2704 :group 'minibuffer
2705 :type 'string) 2703 :type 'string)
2706 2704
2707(defcustom completion-pcm-complete-word-inserts-delimiters nil 2705(defcustom completion-pcm-complete-word-inserts-delimiters nil
@@ -2734,7 +2732,8 @@ or a symbol, see `completion-pcm--merge-completions'."
2734 (completion-pcm--string->pattern suffix))) 2732 (completion-pcm--string->pattern suffix)))
2735 (let* ((pattern nil) 2733 (let* ((pattern nil)
2736 (p 0) 2734 (p 0)
2737 (p0 p)) 2735 (p0 p)
2736 (pending nil))
2738 2737
2739 (while (and (setq p (string-match completion-pcm--delim-wild-regex 2738 (while (and (setq p (string-match completion-pcm--delim-wild-regex
2740 string p)) 2739 string p))
@@ -2751,18 +2750,49 @@ or a symbol, see `completion-pcm--merge-completions'."
2751 ;; This is determined by the presence of a submatch-1 which delimits 2750 ;; This is determined by the presence of a submatch-1 which delimits
2752 ;; the prefix. 2751 ;; the prefix.
2753 (if (match-end 1) (setq p (match-end 1))) 2752 (if (match-end 1) (setq p (match-end 1)))
2754 (push (substring string p0 p) pattern) 2753 (unless (= p0 p)
2754 (if pending (push pending pattern))
2755 (push (substring string p0 p) pattern))
2756 (setq pending nil)
2755 (if (eq (aref string p) ?*) 2757 (if (eq (aref string p) ?*)
2756 (progn 2758 (progn
2757 (push 'star pattern) 2759 (push 'star pattern)
2758 (setq p0 (1+ p))) 2760 (setq p0 (1+ p)))
2759 (push 'any pattern) 2761 (push 'any pattern)
2760 (setq p0 p)) 2762 (if (match-end 1)
2761 (cl-incf p)) 2763 (setq p0 p)
2762 2764 (push (substring string p (match-end 0)) pattern)
2765 ;; `any-delim' is used so that "a-b" also finds "array->beginning".
2766 (setq pending 'any-delim)
2767 (setq p0 (match-end 0))))
2768 (setq p p0))
2769
2770 (when (> (length string) p0)
2771 (if pending (push pending pattern))
2772 (push (substring string p0) pattern))
2763 ;; An empty string might be erroneously added at the beginning. 2773 ;; An empty string might be erroneously added at the beginning.
2764 ;; It should be avoided properly, but it's so easy to remove it here. 2774 ;; It should be avoided properly, but it's so easy to remove it here.
2765 (delete "" (nreverse (cons (substring string p0) pattern)))))) 2775 (delete "" (nreverse pattern)))))
2776
2777(defun completion-pcm--optimize-pattern (p)
2778 ;; Remove empty strings in a separate phase since otherwise a ""
2779 ;; might prevent some other optimization, as in '(any "" any).
2780 (setq p (delete "" p))
2781 (let ((n '()))
2782 (while p
2783 (pcase p
2784 (`(,(and s1 (pred stringp)) ,(and s2 (pred stringp)) . ,rest)
2785 (setq p (cons (concat s1 s2) rest)))
2786 (`(,(and p1 (pred symbolp)) ,(and p2 (guard (eq p1 p2))) . ,_)
2787 (setq p (cdr p)))
2788 (`(star ,(pred symbolp) . ,rest) (setq p `(star . ,rest)))
2789 (`(,(pred symbolp) star . ,rest) (setq p `(star . ,rest)))
2790 (`(point ,(or `any `any-delim) . ,rest) (setq p `(point . ,rest)))
2791 (`(,(or `any `any-delim) point . ,rest) (setq p `(point . ,rest)))
2792 (`(any ,(or `any `any-delim) . ,rest) (setq p `(any . ,rest)))
2793 (`(,(pred symbolp)) (setq p nil)) ;Implicit terminating `any'.
2794 (_ (push (pop p) n))))
2795 (nreverse n)))
2766 2796
2767(defun completion-pcm--pattern->regex (pattern &optional group) 2797(defun completion-pcm--pattern->regex (pattern &optional group)
2768 (let ((re 2798 (let ((re
@@ -2771,8 +2801,13 @@ or a symbol, see `completion-pcm--merge-completions'."
2771 (lambda (x) 2801 (lambda (x)
2772 (cond 2802 (cond
2773 ((stringp x) (regexp-quote x)) 2803 ((stringp x) (regexp-quote x))
2774 ((if (consp group) (memq x group) group) "\\(.*?\\)") 2804 (t
2775 (t ".*?"))) 2805 (let ((re (if (eq x 'any-delim)
2806 (concat completion-pcm--delim-wild-regex "*?")
2807 ".*?")))
2808 (if (if (consp group) (memq x group) group)
2809 (concat "\\(" re "\\)")
2810 re)))))
2776 pattern 2811 pattern
2777 "")))) 2812 ""))))
2778 ;; Avoid pathological backtracking. 2813 ;; Avoid pathological backtracking.
@@ -2846,11 +2881,11 @@ filter out additional entries (because TABLE might not obey PRED)."
2846 (setq string (substring string (car bounds) (+ point (cdr bounds)))) 2881 (setq string (substring string (car bounds) (+ point (cdr bounds))))
2847 (let* ((relpoint (- point (car bounds))) 2882 (let* ((relpoint (- point (car bounds)))
2848 (pattern (completion-pcm--string->pattern string relpoint)) 2883 (pattern (completion-pcm--string->pattern string relpoint))
2849 (all (condition-case err 2884 (all (condition-case-unless-debug err
2850 (funcall filter 2885 (funcall filter
2851 (completion-pcm--all-completions 2886 (completion-pcm--all-completions
2852 prefix pattern table pred)) 2887 prefix pattern table pred))
2853 (error (unless firsterror (setq firsterror err)) nil)))) 2888 (error (setq firsterror err) nil))))
2854 (when (and (null all) 2889 (when (and (null all)
2855 (> (car bounds) 0) 2890 (> (car bounds) 0)
2856 (null (ignore-errors (try-completion prefix table pred)))) 2891 (null (ignore-errors (try-completion prefix table pred))))
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index 177fdaca150..67c74f88250 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -3733,7 +3733,7 @@ so return the size on the remote host exactly. See RFC 3659."
3733;; next part of copying routine. 3733;; next part of copying routine.
3734(defun ange-ftp-cf1 (result line 3734(defun ange-ftp-cf1 (result line
3735 filename newname binary msg 3735 filename newname binary msg
3736 f-parsed f-host f-user f-name f-abbr 3736 f-parsed f-host f-user _f-name f-abbr
3737 t-parsed t-host t-user t-name t-abbr 3737 t-parsed t-host t-user t-name t-abbr
3738 temp1 temp2 cont nowait) 3738 temp1 temp2 cont nowait)
3739 (if line 3739 (if line
@@ -3835,7 +3835,7 @@ so return the size on the remote host exactly. See RFC 3659."
3835 3835
3836(defun ange-ftp-copy-file (filename newname &optional ok-if-already-exists 3836(defun ange-ftp-copy-file (filename newname &optional ok-if-already-exists
3837 keep-date preserve-uid-gid 3837 keep-date preserve-uid-gid
3838 preserve-selinux-context) 3838 _preserve-selinux-context)
3839 (interactive "fCopy file: \nFCopy %s to file: \np") 3839 (interactive "fCopy file: \nFCopy %s to file: \np")
3840 (ange-ftp-copy-file-internal filename 3840 (ange-ftp-copy-file-internal filename
3841 newname 3841 newname
@@ -4200,7 +4200,7 @@ directory, so that Emacs will know its current contents."
4200 (while (and tryfiles (not copy)) 4200 (while (and tryfiles (not copy))
4201 (catch 'ftp-error 4201 (catch 'ftp-error
4202 (let ((ange-ftp-waiting-flag t)) 4202 (let ((ange-ftp-waiting-flag t))
4203 (condition-case error 4203 (condition-case _error
4204 (setq copy (ange-ftp-file-local-copy (car tryfiles))) 4204 (setq copy (ange-ftp-file-local-copy (car tryfiles)))
4205 (ftp-error nil)))) 4205 (ftp-error nil))))
4206 (setq tryfiles (cdr tryfiles))) 4206 (setq tryfiles (cdr tryfiles)))
@@ -4214,7 +4214,7 @@ directory, so that Emacs will know its current contents."
4214 (ange-ftp-real-load file noerror nomessage nosuffix))) 4214 (ange-ftp-real-load file noerror nomessage nosuffix)))
4215 4215
4216;; Calculate default-unhandled-directory for a given ange-ftp buffer. 4216;; Calculate default-unhandled-directory for a given ange-ftp buffer.
4217(defun ange-ftp-unhandled-file-name-directory (filename) 4217(defun ange-ftp-unhandled-file-name-directory (_filename)
4218 nil) 4218 nil)
4219 4219
4220 4220
@@ -4605,7 +4605,6 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
4605(defun ange-ftp-shell-command (command &optional output-buffer error-buffer) 4605(defun ange-ftp-shell-command (command &optional output-buffer error-buffer)
4606 (let* ((parsed (ange-ftp-ftp-name default-directory)) 4606 (let* ((parsed (ange-ftp-ftp-name default-directory))
4607 (host (nth 0 parsed)) 4607 (host (nth 0 parsed))
4608 (user (nth 1 parsed))
4609 (name (nth 2 parsed))) 4608 (name (nth 2 parsed)))
4610 (if (not parsed) 4609 (if (not parsed)
4611 (ange-ftp-real-shell-command command output-buffer error-buffer) 4610 (ange-ftp-real-shell-command command output-buffer error-buffer)
@@ -5176,7 +5175,7 @@ Other orders of $ and _ seem to all work just fine.")
5176 ;; versions left. If not, then delete the 5175 ;; versions left. If not, then delete the
5177 ;; root entry. 5176 ;; root entry.
5178 (maphash 5177 (maphash
5179 (lambda (key val) 5178 (lambda (key _val)
5180 (and (string-match regexp key) 5179 (and (string-match regexp key)
5181 (setq versions t))) 5180 (setq versions t)))
5182 files) 5181 files)
@@ -5358,7 +5357,7 @@ Other orders of $ and _ seem to all work just fine.")
5358;; compressed files. Instead, we turn "FILE.TYPE" into 5357;; compressed files. Instead, we turn "FILE.TYPE" into
5359;; "FILE.TYPE-Z". Hope that this is a reasonable thing to do. 5358;; "FILE.TYPE-Z". Hope that this is a reasonable thing to do.
5360 5359
5361(defun ange-ftp-vms-make-compressed-filename (name &optional reverse) 5360(defun ange-ftp-vms-make-compressed-filename (name &optional _reverse)
5362 (cond 5361 (cond
5363 ((string-match "-Z;[0-9]+\\'" name) 5362 ((string-match "-Z;[0-9]+\\'" name)
5364 (list nil (substring name 0 (match-beginning 0)))) 5363 (list nil (substring name 0 (match-beginning 0))))
@@ -5399,7 +5398,7 @@ Other orders of $ and _ seem to all work just fine.")
5399;; (cons '(vms . ange-ftp-dired-vms-ls-trim) 5398;; (cons '(vms . ange-ftp-dired-vms-ls-trim)
5400;; ange-ftp-dired-ls-trim-alist))) 5399;; ange-ftp-dired-ls-trim-alist)))
5401 5400
5402(defun ange-ftp-vms-sans-version (name &rest args) 5401(defun ange-ftp-vms-sans-version (name &rest _args)
5403 (save-match-data 5402 (save-match-data
5404 (if (string-match ";[0-9]+\\'" name) 5403 (if (string-match ";[0-9]+\\'" name)
5405 (substring name 0 (match-beginning 0)) 5404 (substring name 0 (match-beginning 0))
@@ -5920,7 +5919,7 @@ Other orders of $ and _ seem to all work just fine.")
5920;; (cons '(cms . ange-ftp-dired-cms-move-to-end-of-filename) 5919;; (cons '(cms . ange-ftp-dired-cms-move-to-end-of-filename)
5921;; ange-ftp-dired-move-to-end-of-filename-alist))) 5920;; ange-ftp-dired-move-to-end-of-filename-alist)))
5922 5921
5923(defun ange-ftp-cms-make-compressed-filename (name &optional reverse) 5922(defun ange-ftp-cms-make-compressed-filename (name &optional _reverse)
5924 (if (string-match "-Z\\'" name) 5923 (if (string-match "-Z\\'" name)
5925 (list nil (substring name 0 -2)) 5924 (list nil (substring name 0 -2))
5926 (list t (concat name "-Z")))) 5925 (list t (concat name "-Z"))))
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 462bf18997b..ea13aa36a70 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -877,7 +877,7 @@ to use."
877(defvar dos-windows-version) 877(defvar dos-windows-version)
878(declare-function w32-shell-execute "w32fns.c") ;; Defined in C. 878(declare-function w32-shell-execute "w32fns.c") ;; Defined in C.
879 879
880(defun browse-url-default-windows-browser (url &optional new-window) 880(defun browse-url-default-windows-browser (url &optional _new-window)
881 (interactive (browse-url-interactive-arg "URL: ")) 881 (interactive (browse-url-interactive-arg "URL: "))
882 (cond ((eq system-type 'ms-dos) 882 (cond ((eq system-type 'ms-dos)
883 (if dos-windows-version 883 (if dos-windows-version
@@ -887,7 +887,7 @@ to use."
887 (call-process "cygstart" nil nil nil url)) 887 (call-process "cygstart" nil nil nil url))
888 (t (w32-shell-execute "open" url)))) 888 (t (w32-shell-execute "open" url))))
889 889
890(defun browse-url-default-macosx-browser (url &optional new-window) 890(defun browse-url-default-macosx-browser (url &optional _new-window)
891 (interactive (browse-url-interactive-arg "URL: ")) 891 (interactive (browse-url-interactive-arg "URL: "))
892 (start-process (concat "open " url) nil "open" url)) 892 (start-process (concat "open " url) nil "open" url))
893 893
@@ -942,7 +942,7 @@ used instead of `browse-url-new-window-flag'."
942 ((executable-find browse-url-xterm-program) 'browse-url-text-xterm) 942 ((executable-find browse-url-xterm-program) 'browse-url-text-xterm)
943 ((locate-library "w3") 'browse-url-w3) 943 ((locate-library "w3") 'browse-url-w3)
944 (t 944 (t
945 (lambda (&rest ignore) (error "No usable browser found")))) 945 (lambda (&rest _ignore) (error "No usable browser found"))))
946 url args)) 946 url args))
947 947
948(defun browse-url-can-use-xdg-open () 948(defun browse-url-can-use-xdg-open ()
@@ -1172,7 +1172,7 @@ URL in a new window."
1172 (append browse-url-firefox-startup-arguments (list url)))))) 1172 (append browse-url-firefox-startup-arguments (list url))))))
1173 1173
1174;;;###autoload 1174;;;###autoload
1175(defun browse-url-chromium (url &optional new-window) 1175(defun browse-url-chromium (url &optional _new-window)
1176 "Ask the Chromium WWW browser to load URL. 1176 "Ask the Chromium WWW browser to load URL.
1177Default to the URL around or before point. The strings in 1177Default to the URL around or before point. The strings in
1178variable `browse-url-chromium-arguments' are also passed to 1178variable `browse-url-chromium-arguments' are also passed to
@@ -1281,7 +1281,7 @@ used instead of `browse-url-new-window-flag'."
1281(defvar url-handler-regexp) 1281(defvar url-handler-regexp)
1282 1282
1283;;;###autoload 1283;;;###autoload
1284(defun browse-url-emacs (url &optional new-window) 1284(defun browse-url-emacs (url &optional _new-window)
1285 "Ask Emacs to load URL into a buffer and show it in another window." 1285 "Ask Emacs to load URL into a buffer and show it in another window."
1286 (interactive (browse-url-interactive-arg "URL: ")) 1286 (interactive (browse-url-interactive-arg "URL: "))
1287 (require 'url-handlers) 1287 (require 'url-handlers)
@@ -1422,7 +1422,7 @@ used instead of `browse-url-new-window-flag'."
1422 (w3-fetch url))) 1422 (w3-fetch url)))
1423 1423
1424;;;###autoload 1424;;;###autoload
1425(defun browse-url-w3-gnudoit (url &optional new-window) 1425(defun browse-url-w3-gnudoit (url &optional _new-window)
1426 ;; new-window ignored 1426 ;; new-window ignored
1427 "Ask another Emacs running gnuserv to load the URL using the W3 browser. 1427 "Ask another Emacs running gnuserv to load the URL using the W3 browser.
1428The `browse-url-gnudoit-program' program is used with options given by 1428The `browse-url-gnudoit-program' program is used with options given by
@@ -1437,7 +1437,7 @@ The `browse-url-gnudoit-program' program is used with options given by
1437;; --- Lynx in an xterm --- 1437;; --- Lynx in an xterm ---
1438 1438
1439;;;###autoload 1439;;;###autoload
1440(defun browse-url-text-xterm (url &optional new-window) 1440(defun browse-url-text-xterm (url &optional _new-window)
1441 ;; new-window ignored 1441 ;; new-window ignored
1442 "Ask a text browser to load URL. 1442 "Ask a text browser to load URL.
1443URL defaults to the URL around or before point. 1443URL defaults to the URL around or before point.
@@ -1501,7 +1501,7 @@ used instead of `browse-url-new-window-flag'."
1501 (get-buffer-process buf) 1501 (get-buffer-process buf)
1502 ;; Don't leave around a dead one (especially because of its 1502 ;; Don't leave around a dead one (especially because of its
1503 ;; munged keymap.) 1503 ;; munged keymap.)
1504 (lambda (process event) 1504 (lambda (process _event)
1505 (if (not (memq (process-status process) '(run stop))) 1505 (if (not (memq (process-status process) '(run stop)))
1506 (let ((buf (process-buffer process))) 1506 (let ((buf (process-buffer process)))
1507 (if buf (kill-buffer buf))))))) 1507 (if buf (kill-buffer buf)))))))
@@ -1574,7 +1574,7 @@ used instead of `browse-url-new-window-flag'."
1574;; --- Random browser --- 1574;; --- Random browser ---
1575 1575
1576;;;###autoload 1576;;;###autoload
1577(defun browse-url-generic (url &optional new-window) 1577(defun browse-url-generic (url &optional _new-window)
1578 ;; new-window ignored 1578 ;; new-window ignored
1579 "Ask the WWW browser defined by `browse-url-generic-program' to load URL. 1579 "Ask the WWW browser defined by `browse-url-generic-program' to load URL.
1580Default to the URL around or before point. A fresh copy of the 1580Default to the URL around or before point. A fresh copy of the
@@ -1589,7 +1589,7 @@ don't offer a form of remote control."
1589 (append browse-url-generic-args (list url)))) 1589 (append browse-url-generic-args (list url))))
1590 1590
1591;;;###autoload 1591;;;###autoload
1592(defun browse-url-kde (url &optional new-window) 1592(defun browse-url-kde (url &optional _new-window)
1593 "Ask the KDE WWW browser to load URL. 1593 "Ask the KDE WWW browser to load URL.
1594Default to the URL around or before point." 1594Default to the URL around or before point."
1595 (interactive (browse-url-interactive-arg "KDE URL: ")) 1595 (interactive (browse-url-interactive-arg "KDE URL: "))
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el
index 0e9c4fc5c76..a05452c430c 100644
--- a/lisp/net/dbus.el
+++ b/lisp/net/dbus.el
@@ -1609,7 +1609,6 @@ and \"org.freedesktop.DBus.Properties.GetAll\", which is slow."
1609It will be registered for all objects created by `dbus-register-method'." 1609It will be registered for all objects created by `dbus-register-method'."
1610 (let* ((last-input-event last-input-event) 1610 (let* ((last-input-event last-input-event)
1611 (bus (dbus-event-bus-name last-input-event)) 1611 (bus (dbus-event-bus-name last-input-event))
1612 (service (dbus-event-service-name last-input-event))
1613 (path (dbus-event-path-name last-input-event))) 1612 (path (dbus-event-path-name last-input-event)))
1614 ;; "GetManagedObjects" returns "a{oa{sa{sv}}}". 1613 ;; "GetManagedObjects" returns "a{oa{sa{sv}}}".
1615 (let (interfaces result) 1614 (let (interfaces result)
@@ -1625,8 +1624,7 @@ It will be registered for all objects created by `dbus-register-method'."
1625 ;; Check all registered object paths. 1624 ;; Check all registered object paths.
1626 (maphash 1625 (maphash
1627 (lambda (key val) 1626 (lambda (key val)
1628 (let ((object (or (nth 2 (car-safe val)) "")) 1627 (let ((object (or (nth 2 (car-safe val)) "")))
1629 (interface (nth 2 key)))
1630 (when (and (equal (butlast key 2) (list :method bus)) 1628 (when (and (equal (butlast key 2) (list :method bus))
1631 (string-prefix-p path object)) 1629 (string-prefix-p path object))
1632 (dolist (interface (cons (nth 2 key) interfaces)) 1630 (dolist (interface (cons (nth 2 key) interfaces))
diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el
index ef09267f854..c474ac9380d 100644
--- a/lisp/net/eudc.el
+++ b/lisp/net/eudc.el
@@ -518,12 +518,12 @@ otherwise they are formatted according to `eudc-user-attribute-names-alist'."
518 precords)) 518 precords))
519 (insert "\n") 519 (insert "\n")
520 (widget-create 'push-button 520 (widget-create 'push-button
521 :notify (lambda (&rest ignore) 521 :notify (lambda (&rest _ignore)
522 (eudc-query-form)) 522 (eudc-query-form))
523 "New query") 523 "New query")
524 (widget-insert " ") 524 (widget-insert " ")
525 (widget-create 'push-button 525 (widget-create 'push-button
526 :notify (lambda (&rest ignore) 526 :notify (lambda (&rest _ignore)
527 (kill-this-buffer)) 527 (kill-this-buffer))
528 "Quit") 528 "Quit")
529 (eudc-mode) 529 (eudc-mode)
@@ -995,17 +995,17 @@ queries the server for the existing fields and displays a corresponding form."
995 fields) 995 fields)
996 (widget-insert "\n\n") 996 (widget-insert "\n\n")
997 (widget-create 'push-button 997 (widget-create 'push-button
998 :notify (lambda (&rest ignore) 998 :notify (lambda (&rest _ignore)
999 (eudc-process-form)) 999 (eudc-process-form))
1000 "Query Server") 1000 "Query Server")
1001 (widget-insert " ") 1001 (widget-insert " ")
1002 (widget-create 'push-button 1002 (widget-create 'push-button
1003 :notify (lambda (&rest ignore) 1003 :notify (lambda (&rest _ignore)
1004 (eudc-query-form)) 1004 (eudc-query-form))
1005 "Reset Form") 1005 "Reset Form")
1006 (widget-insert " ") 1006 (widget-insert " ")
1007 (widget-create 'push-button 1007 (widget-create 'push-button
1008 :notify (lambda (&rest ignore) 1008 :notify (lambda (&rest _ignore)
1009 (kill-this-buffer)) 1009 (kill-this-buffer))
1010 "Quit") 1010 "Quit")
1011 (goto-char pt) 1011 (goto-char pt)
diff --git a/lisp/net/eudcb-ldap.el b/lisp/net/eudcb-ldap.el
index d0ba47ad753..a678ec3ab42 100644
--- a/lisp/net/eudcb-ldap.el
+++ b/lisp/net/eudcb-ldap.el
@@ -136,7 +136,7 @@ RETURN-ATTRS is a list of attributes to return, defaulting to
136 result)) 136 result))
137 final-result)) 137 final-result))
138 138
139(defun eudc-ldap-get-field-list (dummy &optional objectclass) 139(defun eudc-ldap-get-field-list (_dummy &optional objectclass)
140 "Return a list of valid attribute names for the current server. 140 "Return a list of valid attribute names for the current server.
141OBJECTCLASS is the LDAP object class for which the valid 141OBJECTCLASS is the LDAP object class for which the valid
142attribute names are returned. Default to `person'" 142attribute names are returned. Default to `person'"
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 34934a03549..6cf4ff2c9bf 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -159,7 +159,7 @@ word(s) will be searched for via `eww-search-prefix'."
159 ((string-match "^image/" (car content-type)) 159 ((string-match "^image/" (car content-type))
160 (eww-display-image)) 160 (eww-display-image))
161 (t 161 (t
162 (eww-display-raw charset))) 162 (eww-display-raw)))
163 (setq eww-history-position 0) 163 (setq eww-history-position 0)
164 (cond 164 (cond
165 (point 165 (point
@@ -296,7 +296,7 @@ word(s) will be searched for via `eww-search-prefix'."
296 (list :background (car new-colors)) 296 (list :background (car new-colors))
297 t)))))) 297 t))))))
298 298
299(defun eww-display-raw (charset) 299(defun eww-display-raw ()
300 (let ((data (buffer-substring (point) (point-max)))) 300 (let ((data (buffer-substring (point) (point-max))))
301 (eww-setup-buffer) 301 (eww-setup-buffer)
302 (let ((inhibit-read-only t)) 302 (let ((inhibit-read-only t))
@@ -345,7 +345,7 @@ word(s) will be searched for via `eww-search-prefix'."
345 (define-key map [(meta p)] 'eww-previous-bookmark) 345 (define-key map [(meta p)] 'eww-previous-bookmark)
346 346
347 (easy-menu-define nil map "" 347 (easy-menu-define nil map ""
348 '("eww" 348 '("Eww"
349 ["Quit" eww-quit t] 349 ["Quit" eww-quit t]
350 ["Reload" eww-reload t] 350 ["Reload" eww-reload t]
351 ["Back to previous page" eww-back-url 351 ["Back to previous page" eww-back-url
@@ -381,7 +381,7 @@ word(s) will be searched for via `eww-search-prefix'."
381 eww-history)) 381 eww-history))
382 382
383;;;###autoload 383;;;###autoload
384(defun eww-browse-url (url &optional new-window) 384(defun eww-browse-url (url &optional _new-window)
385 (when (and (equal major-mode 'eww-mode) 385 (when (and (equal major-mode 'eww-mode)
386 eww-current-url) 386 eww-current-url)
387 (eww-save-history)) 387 (eww-save-history))
@@ -756,7 +756,6 @@ appears in a <link> or <a> tag."
756 "Change the value of the select drop-down menu under point." 756 "Change the value of the select drop-down menu under point."
757 (interactive) 757 (interactive)
758 (let* ((input (get-text-property (point) 'eww-form)) 758 (let* ((input (get-text-property (point) 'eww-form))
759 (properties (text-properties-at (point)))
760 (completion-ignore-case t) 759 (completion-ignore-case t)
761 (options 760 (options
762 (delq nil 761 (delq nil
@@ -930,8 +929,7 @@ The browser to used is specified by the `shr-external-browser' variable."
930 (setq file "!")) 929 (setq file "!"))
931 ((string-match "\\`[.]" file) 930 ((string-match "\\`[.]" file)
932 (setq file (concat "!" file)))) 931 (setq file (concat "!" file))))
933 (let ((base file) 932 (let ((count 1))
934 (count 1))
935 (while (file-exists-p (expand-file-name file directory)) 933 (while (file-exists-p (expand-file-name file directory))
936 (setq file 934 (setq file
937 (if (string-match "\\`\\(.*\\)\\([.][^.]+\\)" file) 935 (if (string-match "\\`\\(.*\\)\\([.][^.]+\\)" file)
diff --git a/lisp/net/imap.el b/lisp/net/imap.el
index 9584ceb24d0..256af723861 100644
--- a/lisp/net/imap.el
+++ b/lisp/net/imap.el
@@ -139,7 +139,7 @@
139(eval-when-compile (require 'cl)) 139(eval-when-compile (require 'cl))
140(eval-and-compile 140(eval-and-compile
141 ;; For Emacs <22.2 and XEmacs. 141 ;; For Emacs <22.2 and XEmacs.
142 (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))) 142 (unless (fboundp 'declare-function) (defmacro declare-function (&rest _r)))
143 (autoload 'starttls-open-stream "starttls") 143 (autoload 'starttls-open-stream "starttls")
144 (autoload 'starttls-negotiate "starttls") 144 (autoload 'starttls-negotiate "starttls")
145 (autoload 'sasl-find-mechanism "sasl") 145 (autoload 'sasl-find-mechanism "sasl")
@@ -661,7 +661,7 @@ sure of changing the value of `foo'."
661 nil))))) 661 nil)))))
662 done)) 662 done))
663 663
664(defun imap-ssl-p (buffer) 664(defun imap-ssl-p (_buffer)
665 nil) 665 nil)
666 666
667(defun imap-ssl-open (name buffer server port) 667(defun imap-ssl-open (name buffer server port)
@@ -711,7 +711,7 @@ sure of changing the value of `foo'."
711 (message "imap: Opening SSL connection with `%s'...failed" cmd) 711 (message "imap: Opening SSL connection with `%s'...failed" cmd)
712 nil))) 712 nil)))
713 713
714(defun imap-tls-p (buffer) 714(defun imap-tls-p (_buffer)
715 nil) 715 nil)
716 716
717(defun imap-tls-open (name buffer server port) 717(defun imap-tls-open (name buffer server port)
@@ -738,7 +738,7 @@ sure of changing the value of `foo'."
738 (when (memq (process-status process) '(open run)) 738 (when (memq (process-status process) '(open run))
739 process)))) 739 process))))
740 740
741(defun imap-network-p (buffer) 741(defun imap-network-p (_buffer)
742 t) 742 t)
743 743
744(defun imap-network-open (name buffer server port) 744(defun imap-network-open (name buffer server port)
@@ -757,7 +757,7 @@ sure of changing the value of `foo'."
757 (when (memq (process-status process) '(open run)) 757 (when (memq (process-status process) '(open run))
758 process)))) 758 process))))
759 759
760(defun imap-shell-p (buffer) 760(defun imap-shell-p (_buffer)
761 nil) 761 nil)
762 762
763(defun imap-shell-open (name buffer server port) 763(defun imap-shell-open (name buffer server port)
@@ -881,10 +881,10 @@ t if it successfully authenticates, nil otherwise."
881 ;; passwd nil)))) 881 ;; passwd nil))))
882 ret))) 882 ret)))
883 883
884(defun imap-gssapi-auth-p (buffer) 884(defun imap-gssapi-auth-p (_buffer)
885 (eq imap-stream 'gssapi)) 885 (eq imap-stream 'gssapi))
886 886
887(defun imap-gssapi-auth (buffer) 887(defun imap-gssapi-auth (_buffer)
888 (message "imap: Authenticating using GSSAPI...%s" 888 (message "imap: Authenticating using GSSAPI...%s"
889 (if (eq imap-stream 'gssapi) "done" "failed")) 889 (if (eq imap-stream 'gssapi) "done" "failed"))
890 (eq imap-stream 'gssapi)) 890 (eq imap-stream 'gssapi))
@@ -893,7 +893,7 @@ t if it successfully authenticates, nil otherwise."
893 (and (imap-capability 'AUTH=KERBEROS_V4 buffer) 893 (and (imap-capability 'AUTH=KERBEROS_V4 buffer)
894 (eq imap-stream 'kerberos4))) 894 (eq imap-stream 'kerberos4)))
895 895
896(defun imap-kerberos4-auth (buffer) 896(defun imap-kerberos4-auth (_buffer)
897 (message "imap: Authenticating using Kerberos 4...%s" 897 (message "imap: Authenticating using Kerberos 4...%s"
898 (if (eq imap-stream 'kerberos4) "done" "failed")) 898 (if (eq imap-stream 'kerberos4) "done" "failed"))
899 (eq imap-stream 'kerberos4)) 899 (eq imap-stream 'kerberos4))
@@ -947,7 +947,7 @@ t if it successfully authenticates, nil otherwise."
947 (imap-quote-specials passwd) 947 (imap-quote-specials passwd)
948 "\"")))))) 948 "\""))))))
949 949
950(defun imap-anonymous-p (buffer) 950(defun imap-anonymous-p (_buffer)
951 t) 951 t)
952 952
953(defun imap-anonymous-auth (buffer) 953(defun imap-anonymous-auth (buffer)
@@ -1838,7 +1838,7 @@ See `imap-enable-exchange-bug-workaround'."
1838 (and (imap-fetch-safe '("*" . "*:*") "UID") 1838 (and (imap-fetch-safe '("*" . "*:*") "UID")
1839 (list (imap-mailbox-get-1 'uidvalidity mailbox) 1839 (list (imap-mailbox-get-1 'uidvalidity mailbox)
1840 (apply 'max (imap-message-map 1840 (apply 'max (imap-message-map
1841 (lambda (uid prop) uid) 'UID)))) 1841 (lambda (uid _prop) uid) 'UID))))
1842 (if old-mailbox 1842 (if old-mailbox
1843 (imap-mailbox-select old-mailbox (eq state 'examine)) 1843 (imap-mailbox-select old-mailbox (eq state 'examine))
1844 (imap-mailbox-unselect))))))) 1844 (imap-mailbox-unselect)))))))
@@ -1884,7 +1884,7 @@ first element. The rest of list contains the saved articles' UIDs."
1884 (and (imap-fetch-safe '("*" . "*:*") "UID") 1884 (and (imap-fetch-safe '("*" . "*:*") "UID")
1885 (list (imap-mailbox-get-1 'uidvalidity mailbox) 1885 (list (imap-mailbox-get-1 'uidvalidity mailbox)
1886 (apply 'max (imap-message-map 1886 (apply 'max (imap-message-map
1887 (lambda (uid prop) uid) 'UID)))) 1887 (lambda (uid _prop) uid) 'UID))))
1888 (if old-mailbox 1888 (if old-mailbox
1889 (imap-mailbox-select old-mailbox (eq state 'examine)) 1889 (imap-mailbox-select old-mailbox (eq state 'examine))
1890 (imap-mailbox-unselect))))))) 1890 (imap-mailbox-unselect)))))))
@@ -1893,7 +1893,7 @@ first element. The rest of list contains the saved articles' UIDs."
1893 (with-current-buffer (or buffer (current-buffer)) 1893 (with-current-buffer (or buffer (current-buffer))
1894 (imap-message-appenduid-1 (imap-utf7-encode mailbox)))) 1894 (imap-message-appenduid-1 (imap-utf7-encode mailbox))))
1895 1895
1896(defun imap-message-append (mailbox article &optional flags date-time buffer) 1896(defun imap-message-append (mailbox article &optional _flags _date-time buffer)
1897 "Append ARTICLE (a buffer) to MAILBOX on server in BUFFER. 1897 "Append ARTICLE (a buffer) to MAILBOX on server in BUFFER.
1898FLAGS and DATE-TIME is currently not used. Return a cons holding 1898FLAGS and DATE-TIME is currently not used. Return a cons holding
1899uidvalidity of MAILBOX and UID the newly created article got, or nil 1899uidvalidity of MAILBOX and UID the newly created article got, or nil
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index ff6d0d10671..595037ab943 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -137,7 +137,7 @@
137 (insert-directory . tramp-adb-handle-insert-directory) 137 (insert-directory . tramp-adb-handle-insert-directory)
138 (insert-file-contents . tramp-handle-insert-file-contents) 138 (insert-file-contents . tramp-handle-insert-file-contents)
139 (load . tramp-handle-load) 139 (load . tramp-handle-load)
140 ;; `make-auto-save-file-name' performed by default handler. 140 (make-auto-save-file-name . tramp-handle-make-auto-save-file-name)
141 (make-directory . tramp-adb-handle-make-directory) 141 (make-directory . tramp-adb-handle-make-directory)
142 (make-directory-internal . ignore) 142 (make-directory-internal . ignore)
143 (make-symbolic-link . ignore) 143 (make-symbolic-link . ignore)
@@ -407,9 +407,9 @@ Convert (\"-al\") to (\"-a\" \"-l\"). Remove arguments like \"--dired\"."
407 (split-string 407 (split-string
408 (apply 'concat 408 (apply 'concat
409 (mapcar (lambda (s) 409 (mapcar (lambda (s)
410 (replace-regexp-in-string 410 (tramp-compat-replace-regexp-in-string
411 "\\(.\\)" " -\\1" 411 "\\(.\\)" " -\\1"
412 (replace-regexp-in-string "^-" "" s))) 412 (tramp-compat-replace-regexp-in-string "^-" "" s)))
413 ;; FIXME: Warning about removed switches (long and non-dash). 413 ;; FIXME: Warning about removed switches (long and non-dash).
414 (delq nil 414 (delq nil
415 (mapcar 415 (mapcar
@@ -874,7 +874,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
874 (when p 874 (when p
875 (if (yes-or-no-p "A command is running. Kill it? ") 875 (if (yes-or-no-p "A command is running. Kill it? ")
876 (ignore-errors (kill-process p)) 876 (ignore-errors (kill-process p))
877 (tramp-compat-user-error "Shell command in progress"))) 877 (tramp-user-error p "Shell command in progress")))
878 878
879 (if current-buffer-p 879 (if current-buffer-p
880 (progn 880 (progn
@@ -1153,11 +1153,11 @@ connection if a previous connection has died for some reason."
1153 (read (current-buffer)))))) 1153 (read (current-buffer))))))
1154 (when (and (stringp old-getprop) 1154 (when (and (stringp old-getprop)
1155 (not (string-equal old-getprop new-getprop))) 1155 (not (string-equal old-getprop new-getprop)))
1156 (tramp-cleanup vec)
1157 (tramp-message 1156 (tramp-message
1158 vec 3 1157 vec 3
1159 "Connection reset, because remote host changed from `%s' to `%s'" 1158 "Connection reset, because remote host changed from `%s' to `%s'"
1160 old-getprop new-getprop) 1159 old-getprop new-getprop)
1160 (tramp-cleanup-connection vec t)
1161 (tramp-adb-maybe-open-connection vec))) 1161 (tramp-adb-maybe-open-connection vec)))
1162 1162
1163 ;; Change user if indicated. 1163 ;; Change user if indicated.
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index 118be597433..b4e5e4ffd0f 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -285,6 +285,16 @@ KEY identifies the connection, it is either a process or a vector."
285 (let (result) 285 (let (result)
286 (maphash 286 (maphash
287 (lambda (key value) 287 (lambda (key value)
288 ;; Remove text properties from KEY.
289 (when (vectorp key)
290 (dotimes (i (length key))
291 (when (stringp (aref key i))
292 (aset key i
293 (funcall
294 ;; `substring-no-properties' does not exist in XEmacs.
295 (if (functionp 'substring-no-properties)
296 'substring-no-properties 'identity)
297 (aref key i))))))
288 (let ((tmp (format 298 (let ((tmp (format
289 "(%s %s)" 299 "(%s %s)"
290 (if (processp key) 300 (if (processp key)
diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el
index 937db34a346..5015929534d 100644
--- a/lisp/net/tramp-cmds.el
+++ b/lisp/net/tramp-cmds.el
@@ -55,9 +55,11 @@
55 (buffer-list)))) 55 (buffer-list))))
56 56
57;;;###tramp-autoload 57;;;###tramp-autoload
58(defun tramp-cleanup-connection (vec) 58(defun tramp-cleanup-connection (vec &optional keep-debug keep-password)
59 "Flush all connection related objects. 59 "Flush all connection related objects.
60This includes password cache, file cache, connection cache, buffers. 60This includes password cache, file cache, connection cache,
61buffers. KEEP-DEBUG non-nil preserves the debug buffer.
62KEEP-PASSWORD non-nil preserves the password cache.
61When called interactively, a Tramp connection has to be selected." 63When called interactively, a Tramp connection has to be selected."
62 (interactive 64 (interactive
63 ;; When interactive, select the Tramp remote identification. 65 ;; When interactive, select the Tramp remote identification.
@@ -80,14 +82,15 @@ When called interactively, a Tramp connection has to be selected."
80 "Enter Tramp connection: " connections nil t 82 "Enter Tramp connection: " connections nil t
81 (try-completion "" connections))) 83 (try-completion "" connections)))
82 (when (and name (file-remote-p name)) 84 (when (and name (file-remote-p name))
83 (with-parsed-tramp-file-name name nil v)))))) 85 (with-parsed-tramp-file-name name nil v))))
86 nil nil))
84 87
85 (if (not vec) 88 (if (not vec)
86 ;; Nothing to do. 89 ;; Nothing to do.
87 (message "No Tramp connection found.") 90 (message "No Tramp connection found.")
88 91
89 ;; Flush password cache. 92 ;; Flush password cache.
90 (tramp-clear-passwd vec) 93 (unless keep-password (tramp-clear-passwd vec))
91 94
92 ;; Flush file cache. 95 ;; Flush file cache.
93 (tramp-flush-directory-property vec "") 96 (tramp-flush-directory-property vec "")
@@ -101,7 +104,8 @@ When called interactively, a Tramp connection has to be selected."
101 ;; Remove buffers. 104 ;; Remove buffers.
102 (dolist 105 (dolist
103 (buf (list (get-buffer (tramp-buffer-name vec)) 106 (buf (list (get-buffer (tramp-buffer-name vec))
104 (get-buffer (tramp-debug-buffer-name vec)) 107 (unless keep-debug
108 (get-buffer (tramp-debug-buffer-name vec)))
105 (tramp-get-connection-property vec "process-buffer" nil))) 109 (tramp-get-connection-property vec "process-buffer" nil)))
106 (when (bufferp buf) (kill-buffer buf))))) 110 (when (bufferp buf) (kill-buffer buf)))))
107 111
@@ -190,7 +194,9 @@ This includes password cache, file cache, connection cache, buffers."
190 194
191 'tramp-load-report-modules ; pre-hook 195 'tramp-load-report-modules ; pre-hook
192 'tramp-append-tramp-buffers ; post-hook 196 'tramp-append-tramp-buffers ; post-hook
193 (propertize "\n" 'display "\ 197 (funcall
198 (if (functionp 'propertize) 'propertize 'progn)
199 "\n" 'display "\
194Enter your bug report in this message, including as much detail 200Enter your bug report in this message, including as much detail
195as you possibly can about the problem, what you did to cause it 201as you possibly can about the problem, what you did to cause it
196and what the local and remote machines are. 202and what the local and remote machines are.
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index f0905245dea..ca70c1384cb 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -186,7 +186,7 @@
186;; `with-temp-message' does not exist in XEmacs. 186;; `with-temp-message' does not exist in XEmacs.
187(if (fboundp 'with-temp-message) 187(if (fboundp 'with-temp-message)
188 (defalias 'tramp-compat-with-temp-message 'with-temp-message) 188 (defalias 'tramp-compat-with-temp-message 'with-temp-message)
189 (defmacro tramp-compat-with-temp-message (message &rest body) 189 (defmacro tramp-compat-with-temp-message (_message &rest body)
190 "Display MESSAGE temporarily if non-nil while BODY is evaluated." 190 "Display MESSAGE temporarily if non-nil while BODY is evaluated."
191 `(progn ,@body))) 191 `(progn ,@body)))
192 192
@@ -313,13 +313,21 @@ Not actually used. Use `(format \"%o\" i)' instead?"
313 "Like `copy-file' for Tramp files (compat function)." 313 "Like `copy-file' for Tramp files (compat function)."
314 (cond 314 (cond
315 (preserve-extended-attributes 315 (preserve-extended-attributes
316 (tramp-compat-funcall 316 (condition-case nil
317 'copy-file filename newname ok-if-already-exists keep-date 317 (tramp-compat-funcall
318 preserve-uid-gid preserve-extended-attributes)) 318 'copy-file filename newname ok-if-already-exists keep-date
319 preserve-uid-gid preserve-extended-attributes)
320 (wrong-number-of-arguments
321 (tramp-compat-copy-file
322 filename newname ok-if-already-exists keep-date preserve-uid-gid))))
319 (preserve-uid-gid 323 (preserve-uid-gid
320 (tramp-compat-funcall 324 (condition-case nil
321 'copy-file filename newname ok-if-already-exists keep-date 325 (tramp-compat-funcall
322 preserve-uid-gid)) 326 'copy-file filename newname ok-if-already-exists keep-date
327 preserve-uid-gid)
328 (wrong-number-of-arguments
329 (tramp-compat-copy-file
330 filename newname ok-if-already-exists keep-date))))
323 (t 331 (t
324 (copy-file filename newname ok-if-already-exists keep-date)))) 332 (copy-file filename newname ok-if-already-exists keep-date))))
325 333
@@ -518,11 +526,57 @@ EOL-TYPE can be one of `dos', `unix', or `mac'."
518 "`dos', `unix', or `mac'"))))) 526 "`dos', `unix', or `mac'")))))
519 (t (error "Can't change EOL conversion -- is MULE missing?")))) 527 (t (error "Can't change EOL conversion -- is MULE missing?"))))
520 528
521;; `user-error' has been added to Emacs 24.3. 529;; `replace-regexp-in-string' does not exist in XEmacs.
522(defun tramp-compat-user-error (format &rest args) 530;; Implementation is taken from Emacs 24.
523 "Signal a pilot error." 531(if (fboundp 'replace-regexp-in-string)
524; (tramp-backtrace) 532 (defalias 'tramp-compat-replace-regexp-in-string 'replace-regexp-in-string)
525 (apply (if (fboundp 'user-error) 'user-error 'error) format args)) 533 (defun tramp-compat-replace-regexp-in-string
534 (regexp rep string &optional fixedcase literal subexp start)
535 "Replace all matches for REGEXP with REP in STRING.
536
537Return a new string containing the replacements.
538
539Optional arguments FIXEDCASE, LITERAL and SUBEXP are like the
540arguments with the same names of function `replace-match'. If START
541is non-nil, start replacements at that index in STRING.
542
543REP is either a string used as the NEWTEXT arg of `replace-match' or a
544function. If it is a function, it is called with the actual text of each
545match, and its value is used as the replacement text. When REP is called,
546the match data are the result of matching REGEXP against a substring
547of STRING.
548
549To replace only the first match (if any), make REGEXP match up to \\'
550and replace a sub-expression, e.g.
551 (replace-regexp-in-string \"\\\\(foo\\\\).*\\\\'\" \"bar\" \" foo foo\" nil nil 1)
552 => \" bar foo\""
553
554 (let ((l (length string))
555 (start (or start 0))
556 matches str mb me)
557 (save-match-data
558 (while (and (< start l) (string-match regexp string start))
559 (setq mb (match-beginning 0)
560 me (match-end 0))
561 ;; If we matched the empty string, make sure we advance by one char
562 (when (= me mb) (setq me (min l (1+ mb))))
563 ;; Generate a replacement for the matched substring.
564 ;; Operate only on the substring to minimize string consing.
565 ;; Set up match data for the substring for replacement;
566 ;; presumably this is likely to be faster than munging the
567 ;; match data directly in Lisp.
568 (string-match regexp (setq str (substring string mb me)))
569 (setq matches
570 (cons (replace-match (if (stringp rep)
571 rep
572 (funcall rep (match-string 0 str)))
573 fixedcase literal str subexp)
574 (cons (substring string start mb) ; unmatched prefix
575 matches)))
576 (setq start me))
577 ;; Reconstruct a string from the pieces.
578 (setq matches (cons (substring string start l) matches)) ; leftover
579 (apply #'concat (nreverse matches))))))
526 580
527(add-hook 'tramp-unload-hook 581(add-hook 'tramp-unload-hook
528 (lambda () 582 (lambda ()
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index e26ffb26e84..e764e4767dd 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -453,7 +453,7 @@ Every entry is a list (NAME ADDRESS).")
453 (insert-directory . tramp-gvfs-handle-insert-directory) 453 (insert-directory . tramp-gvfs-handle-insert-directory)
454 (insert-file-contents . tramp-gvfs-handle-insert-file-contents) 454 (insert-file-contents . tramp-gvfs-handle-insert-file-contents)
455 (load . tramp-handle-load) 455 (load . tramp-handle-load)
456 ;; `make-auto-save-file-name' performed by default handler. 456 (make-auto-save-file-name . tramp-handle-make-auto-save-file-name)
457 (make-directory . tramp-gvfs-handle-make-directory) 457 (make-directory . tramp-gvfs-handle-make-directory)
458 (make-directory-internal . ignore) 458 (make-directory-internal . ignore)
459 (make-symbolic-link . ignore) 459 (make-symbolic-link . ignore)
@@ -490,7 +490,7 @@ Operations not mentioned here will be handled by the default Emacs primitives.")
490First arg specifies the OPERATION, second arg is a list of arguments to 490First arg specifies the OPERATION, second arg is a list of arguments to
491pass to the OPERATION." 491pass to the OPERATION."
492 (unless tramp-gvfs-enabled 492 (unless tramp-gvfs-enabled
493 (tramp-compat-user-error "Package `tramp-gvfs' not supported")) 493 (tramp-user-error nil "Package `tramp-gvfs' not supported"))
494 (let ((fn (assoc operation tramp-gvfs-file-name-handler-alist))) 494 (let ((fn (assoc operation tramp-gvfs-file-name-handler-alist)))
495 (if fn 495 (if fn
496 (save-match-data (apply (cdr fn) args)) 496 (save-match-data (apply (cdr fn) args))
@@ -594,15 +594,19 @@ is no information where to trace the message.")
594 (and (tramp-tramp-file-p newname) 594 (and (tramp-tramp-file-p newname)
595 (not (tramp-gvfs-file-name-p newname)))) 595 (not (tramp-gvfs-file-name-p newname))))
596 596
597 ;; We cannot copy directly. 597 ;; We cannot call `copy-file' directly. Use
598 ;; `tramp-compat-funcall' for backward compatibility (number
599 ;; of arguments).
598 (let ((tmpfile (tramp-compat-make-temp-file filename))) 600 (let ((tmpfile (tramp-compat-make-temp-file filename)))
599 (cond 601 (cond
600 (preserve-extended-attributes 602 (preserve-extended-attributes
601 (copy-file 603 (tramp-compat-funcall
604 'copy-file
602 filename tmpfile t keep-date preserve-uid-gid 605 filename tmpfile t keep-date preserve-uid-gid
603 preserve-extended-attributes)) 606 preserve-extended-attributes))
604 (preserve-uid-gid 607 (preserve-uid-gid
605 (copy-file filename tmpfile t keep-date preserve-uid-gid)) 608 (tramp-compat-funcall
609 'copy-file filename tmpfile t keep-date preserve-uid-gid))
606 (t 610 (t
607 (copy-file filename tmpfile t keep-date))) 611 (copy-file filename tmpfile t keep-date)))
608 (rename-file tmpfile newname ok-if-already-exists)) 612 (rename-file tmpfile newname ok-if-already-exists))
@@ -950,7 +954,7 @@ is no information where to trace the message.")
950 (tramp-message proc 6 "%S\n%s" proc string) 954 (tramp-message proc 6 "%S\n%s" proc string)
951 (setq string (concat rest-string string) 955 (setq string (concat rest-string string)
952 ;; Attribute change is returned in unused wording. 956 ;; Attribute change is returned in unused wording.
953 string (replace-regexp-in-string 957 string (tramp-compat-replace-regexp-in-string
954 "ATTRIB CHANGED" "ATTRIBUTE_CHANGED" string)) 958 "ATTRIB CHANGED" "ATTRIBUTE_CHANGED" string))
955 959
956 (while (string-match 960 (while (string-match
@@ -960,7 +964,7 @@ is no information where to trace the message.")
960 "Event = \\([^[:blank:]]+\\)[\n\r]+") 964 "Event = \\([^[:blank:]]+\\)[\n\r]+")
961 string) 965 string)
962 (let ((action (intern-soft 966 (let ((action (intern-soft
963 (replace-regexp-in-string 967 (tramp-compat-replace-regexp-in-string
964 "_" "-" (downcase (match-string 2 string))))) 968 "_" "-" (downcase (match-string 2 string)))))
965 (file (match-string 1 string))) 969 (file (match-string 1 string)))
966 (setq string (replace-match "" nil nil string)) 970 (setq string (replace-match "" nil nil string))
@@ -1158,7 +1162,8 @@ is no information where to trace the message.")
1158(defun tramp-gvfs-file-name (object-path) 1162(defun tramp-gvfs-file-name (object-path)
1159 "Retrieve file name from D-Bus OBJECT-PATH." 1163 "Retrieve file name from D-Bus OBJECT-PATH."
1160 (dbus-unescape-from-identifier 1164 (dbus-unescape-from-identifier
1161 (replace-regexp-in-string "^.*/\\([^/]+\\)$" "\\1" object-path))) 1165 (tramp-compat-replace-regexp-in-string
1166 "^.*/\\([^/]+\\)$" "\\1" object-path)))
1162 1167
1163(defun tramp-bluez-address (device) 1168(defun tramp-bluez-address (device)
1164 "Return bluetooth device address from a given bluetooth DEVICE name." 1169 "Return bluetooth device address from a given bluetooth DEVICE name."
@@ -1417,47 +1422,38 @@ It was \"a(say)\", but has changed to \"a{sv})\"."
1417 (port (tramp-file-name-port vec)) 1422 (port (tramp-file-name-port vec))
1418 (localname (tramp-file-name-localname vec)) 1423 (localname (tramp-file-name-localname vec))
1419 (ssl (if (string-match "^davs" method) "true" "false")) 1424 (ssl (if (string-match "^davs" method) "true" "false"))
1420 (mount-spec '(:array)) 1425 (mount-spec
1421 (mount-pref "/")) 1426 `(:array
1422 1427 ,@(cond
1423 (setq 1428 ((string-equal "smb" method)
1424 mount-spec 1429 (string-match "^/?\\([^/]+\\)" localname)
1425 (append 1430 (list (tramp-gvfs-mount-spec-entry "type" "smb-share")
1426 mount-spec 1431 (tramp-gvfs-mount-spec-entry "server" host)
1427 (cond 1432 (tramp-gvfs-mount-spec-entry
1428 ((string-equal "smb" method) 1433 "share" (match-string 1 localname))))
1429 (string-match "^/?\\([^/]+\\)" localname) 1434 ((string-equal "obex" method)
1430 (list (tramp-gvfs-mount-spec-entry "type" "smb-share") 1435 (list (tramp-gvfs-mount-spec-entry "type" method)
1431 (tramp-gvfs-mount-spec-entry "server" host) 1436 (tramp-gvfs-mount-spec-entry
1432 (tramp-gvfs-mount-spec-entry "share" (match-string 1 localname)))) 1437 "host" (concat "[" (tramp-bluez-address host) "]"))))
1433 ((string-equal "obex" method) 1438 ((string-match "\\`dav" method)
1434 (list (tramp-gvfs-mount-spec-entry "type" method) 1439 (list (tramp-gvfs-mount-spec-entry "type" "dav")
1435 (tramp-gvfs-mount-spec-entry 1440 (tramp-gvfs-mount-spec-entry "host" host)
1436 "host" (concat "[" (tramp-bluez-address host) "]")))) 1441 (tramp-gvfs-mount-spec-entry "ssl" ssl)))
1437 ((string-match "^dav" method) 1442 (t
1438 (list (tramp-gvfs-mount-spec-entry "type" "dav") 1443 (list (tramp-gvfs-mount-spec-entry "type" method)
1439 (tramp-gvfs-mount-spec-entry "host" host) 1444 (tramp-gvfs-mount-spec-entry "host" host))))
1440 (tramp-gvfs-mount-spec-entry "ssl" ssl))) 1445 ,@(when user
1441 (t 1446 (list (tramp-gvfs-mount-spec-entry "user" user)))
1442 (list (tramp-gvfs-mount-spec-entry "type" method) 1447 ,@(when domain
1443 (tramp-gvfs-mount-spec-entry "host" host)))))) 1448 (list (tramp-gvfs-mount-spec-entry "domain" domain)))
1444 1449 ,@(when port
1445 (when user 1450 (list (tramp-gvfs-mount-spec-entry
1446 (add-to-list 1451 "port" (number-to-string port))))))
1447 'mount-spec (tramp-gvfs-mount-spec-entry "user" user) 'append)) 1452 (mount-pref
1448 1453 (if (and (string-match "\\`dav" method)
1449 (when domain 1454 (string-match "^/?[^/]+" localname))
1450 (add-to-list 1455 (match-string 0 localname)
1451 'mount-spec (tramp-gvfs-mount-spec-entry "domain" domain) 'append)) 1456 "/")))
1452
1453 (when port
1454 (add-to-list
1455 'mount-spec (tramp-gvfs-mount-spec-entry "port" (number-to-string port))
1456 'append))
1457
1458 (when (and (string-match "^dav" method)
1459 (string-match "^/?[^/]+" localname))
1460 (setq mount-pref (match-string 0 localname)))
1461 1457
1462 ;; Return. 1458 ;; Return.
1463 `(:struct ,(tramp-gvfs-dbus-string-to-byte-array mount-pref) ,mount-spec))) 1459 `(:struct ,(tramp-gvfs-dbus-string-to-byte-array mount-pref) ,mount-spec)))
@@ -1718,11 +1714,13 @@ They are retrieved from the hal daemon."
1718 (when (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t 1714 (when (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t
1719 :system tramp-hal-service device tramp-hal-interface-device 1715 :system tramp-hal-service device tramp-hal-interface-device
1720 "PropertyExists" "sync.plugin") 1716 "PropertyExists" "sync.plugin")
1721 (add-to-list 1717 (let ((prop
1722 'tramp-synce-devices 1718 (with-tramp-dbus-call-method
1723 (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t 1719 tramp-gvfs-dbus-event-vector t
1724 :system tramp-hal-service device tramp-hal-interface-device 1720 :system tramp-hal-service device tramp-hal-interface-device
1725 "GetPropertyString" "pda.pocketpc.name")))) 1721 "GetPropertyString" "pda.pocketpc.name")))
1722 (unless (member prop tramp-synce-devices)
1723 (push prop tramp-synce-devices)))))
1726 (tramp-message tramp-gvfs-dbus-event-vector 10 "%s" tramp-synce-devices) 1724 (tramp-message tramp-gvfs-dbus-event-vector 10 "%s" tramp-synce-devices)
1727 tramp-synce-devices)) 1725 tramp-synce-devices))
1728 1726
diff --git a/lisp/net/tramp-gw.el b/lisp/net/tramp-gw.el
index 53dbdbc45d4..e2c7461228f 100644
--- a/lisp/net/tramp-gw.el
+++ b/lisp/net/tramp-gw.el
@@ -238,7 +238,7 @@ authentication is requested from proxy server, provide it."
238 tramp-gw-vector 6 "\n%s" 238 tramp-gw-vector 6 "\n%s"
239 (format 239 (format
240 "%s%s\r\n" command 240 "%s%s\r\n" command
241 (replace-regexp-in-string ;; no password in trace! 241 (tramp-compat-replace-regexp-in-string ;; no password in trace!
242 "Basic [^\r\n]+" "Basic xxxxx" authentication t))) 242 "Basic [^\r\n]+" "Basic xxxxx" authentication t)))
243 (with-current-buffer buffer 243 (with-current-buffer buffer
244 ;; Trap errors to be traced in the right trace buffer. Often, 244 ;; Trap errors to be traced in the right trace buffer. Often,
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index ac131765189..f91cbb29a1d 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -850,7 +850,7 @@ of command line.")
850 (insert-file-contents-literally 850 (insert-file-contents-literally
851 . tramp-sh-handle-insert-file-contents-literally) 851 . tramp-sh-handle-insert-file-contents-literally)
852 (load . tramp-handle-load) 852 (load . tramp-handle-load)
853 (make-auto-save-file-name . tramp-sh-handle-make-auto-save-file-name) 853 (make-auto-save-file-name . tramp-handle-make-auto-save-file-name)
854 (make-directory . tramp-sh-handle-make-directory) 854 (make-directory . tramp-sh-handle-make-directory)
855 (make-symbolic-link . tramp-sh-handle-make-symbolic-link) 855 (make-symbolic-link . tramp-sh-handle-make-symbolic-link)
856 (process-file . tramp-sh-handle-process-file) 856 (process-file . tramp-sh-handle-process-file)
@@ -2500,8 +2500,8 @@ This is like `dired-recursive-delete-directory' for Tramp files."
2500 'file-name-nondirectory (list localname))) 2500 'file-name-nondirectory (list localname)))
2501 (setq localname (tramp-run-real-handler 2501 (setq localname (tramp-run-real-handler
2502 'file-name-directory (list localname)))) 2502 'file-name-directory (list localname))))
2503 (unless full-directory-p 2503 (unless (or full-directory-p (member "-d" switches))
2504 (setq switches (add-to-list 'switches "-d" 'append))) 2504 (setq switches (append switches '("-d"))))
2505 (setq switches (mapconcat 'tramp-shell-quote-argument switches " ")) 2505 (setq switches (mapconcat 'tramp-shell-quote-argument switches " "))
2506 (when wildcard 2506 (when wildcard
2507 (setq switches (concat switches " " wildcard))) 2507 (setq switches (concat switches " " wildcard)))
@@ -2978,48 +2978,6 @@ the result will be a local, non-Tramp, filename."
2978 (fset 'find-buffer-file-type find-buffer-file-type-function) 2978 (fset 'find-buffer-file-type find-buffer-file-type-function)
2979 (fmakunbound 'find-buffer-file-type))))) 2979 (fmakunbound 'find-buffer-file-type)))))
2980 2980
2981(defun tramp-sh-handle-make-auto-save-file-name ()
2982 "Like `make-auto-save-file-name' for Tramp files.
2983Returns a file name in `tramp-auto-save-directory' for autosaving this file."
2984 (let ((tramp-auto-save-directory tramp-auto-save-directory)
2985 (buffer-file-name
2986 (tramp-subst-strs-in-string
2987 '(("_" . "|")
2988 ("/" . "_a")
2989 (":" . "_b")
2990 ("|" . "__")
2991 ("[" . "_l")
2992 ("]" . "_r"))
2993 (buffer-file-name))))
2994 ;; File name must be unique. This is ensured with Emacs 22 (see
2995 ;; UNIQUIFY element of `auto-save-file-name-transforms'); but for
2996 ;; all other cases we must do it ourselves.
2997 (when (boundp 'auto-save-file-name-transforms)
2998 (mapc
2999 (lambda (x)
3000 (when (and (string-match (car x) buffer-file-name)
3001 (not (car (cddr x))))
3002 (setq tramp-auto-save-directory
3003 (or tramp-auto-save-directory
3004 (tramp-compat-temporary-file-directory)))))
3005 (symbol-value 'auto-save-file-name-transforms)))
3006 ;; Create directory.
3007 (when tramp-auto-save-directory
3008 (setq buffer-file-name
3009 (expand-file-name buffer-file-name tramp-auto-save-directory))
3010 (unless (file-exists-p tramp-auto-save-directory)
3011 (make-directory tramp-auto-save-directory t)))
3012 ;; Run plain `make-auto-save-file-name'. There might be an advice when
3013 ;; it is not a magic file name operation (since Emacs 22).
3014 ;; We must deactivate it temporarily.
3015 (if (not (ad-is-active 'make-auto-save-file-name))
3016 (tramp-run-real-handler 'make-auto-save-file-name nil)
3017 ;; else
3018 (ad-deactivate 'make-auto-save-file-name)
3019 (prog1
3020 (tramp-run-real-handler 'make-auto-save-file-name nil)
3021 (ad-activate 'make-auto-save-file-name)))))
3022
3023;; CCC grok LOCKNAME 2981;; CCC grok LOCKNAME
3024(defun tramp-sh-handle-write-region 2982(defun tramp-sh-handle-write-region
3025 (start end filename &optional append visit lockname confirm) 2983 (start end filename &optional append visit lockname confirm)
@@ -3425,7 +3383,7 @@ Fall back to normal file name handler if no Tramp handler exists."
3425 (tramp-message proc 6 "%S\n%s" proc string) 3383 (tramp-message proc 6 "%S\n%s" proc string)
3426 (setq string (concat rest-string string) 3384 (setq string (concat rest-string string)
3427 ;; Attribute change is returned in unused wording. 3385 ;; Attribute change is returned in unused wording.
3428 string (replace-regexp-in-string 3386 string (tramp-compat-replace-regexp-in-string
3429 "ATTRIB CHANGED" "ATTRIBUTE_CHANGED" string)) 3387 "ATTRIB CHANGED" "ATTRIBUTE_CHANGED" string))
3430 3388
3431 (while (string-match 3389 (while (string-match
@@ -3439,7 +3397,7 @@ Fall back to normal file name handler if no Tramp handler exists."
3439 (list 3397 (list
3440 proc 3398 proc
3441 (intern-soft 3399 (intern-soft
3442 (replace-regexp-in-string 3400 (tramp-compat-replace-regexp-in-string
3443 "_" "-" (downcase (match-string 4 string)))) 3401 "_" "-" (downcase (match-string 4 string))))
3444 ;; File names are returned as absolute paths. We must 3402 ;; File names are returned as absolute paths. We must
3445 ;; add the remote prefix. 3403 ;; add the remote prefix.
@@ -3475,7 +3433,8 @@ Fall back to normal file name handler if no Tramp handler exists."
3475 proc 3433 proc
3476 (mapcar 3434 (mapcar
3477 (lambda (x) 3435 (lambda (x)
3478 (intern-soft (replace-regexp-in-string "_" "-" (downcase x)))) 3436 (intern-soft
3437 (tramp-compat-replace-regexp-in-string "_" "-" (downcase x))))
3479 (split-string (match-string 1 line) "," 'omit-nulls)) 3438 (split-string (match-string 1 line) "," 'omit-nulls))
3480 (match-string 3 line)))) 3439 (match-string 3 line))))
3481 ;; Usually, we would add an Emacs event now. Unfortunately, 3440 ;; Usually, we would add an Emacs event now. Unfortunately,
@@ -3846,11 +3805,12 @@ process to set up. VEC specifies the connection."
3846 vec "uname" 3805 vec "uname"
3847 (tramp-send-command-and-read vec "echo \\\"`uname -sr`\\\"")))) 3806 (tramp-send-command-and-read vec "echo \\\"`uname -sr`\\\""))))
3848 (when (and (stringp old-uname) (not (string-equal old-uname new-uname))) 3807 (when (and (stringp old-uname) (not (string-equal old-uname new-uname)))
3849 (tramp-cleanup vec)
3850 (tramp-message 3808 (tramp-message
3851 vec 3 3809 vec 3
3852 "Connection reset, because remote host changed from `%s' to `%s'" 3810 "Connection reset, because remote host changed from `%s' to `%s'"
3853 old-uname new-uname) 3811 old-uname new-uname)
3812 ;; We want to keep the password.
3813 (tramp-cleanup-connection vec t t)
3854 (throw 'uname-changed (tramp-maybe-open-connection vec)))) 3814 (throw 'uname-changed (tramp-maybe-open-connection vec))))
3855 3815
3856 ;; Check whether the remote host suffers from buggy 3816 ;; Check whether the remote host suffers from buggy
@@ -4252,7 +4212,7 @@ Gateway hops are already opened."
4252 ?h (or (tramp-file-name-host (car target-alist)) "")))) 4212 ?h (or (tramp-file-name-host (car target-alist)) ""))))
4253 (with-parsed-tramp-file-name proxy l 4213 (with-parsed-tramp-file-name proxy l
4254 ;; Add the hop. 4214 ;; Add the hop.
4255 (add-to-list 'target-alist l) 4215 (push l target-alist)
4256 ;; Start next search. 4216 ;; Start next search.
4257 (setq choices tramp-default-proxies-alist))))) 4217 (setq choices tramp-default-proxies-alist)))))
4258 4218
@@ -4270,11 +4230,11 @@ Gateway hops are already opened."
4270 vec 'file-error 4230 vec 'file-error
4271 "Connection `%s' is not supported for gateway access." hop)) 4231 "Connection `%s' is not supported for gateway access." hop))
4272 ;; Open the gateway connection. 4232 ;; Open the gateway connection.
4273 (add-to-list 4233 (push
4274 'target-alist
4275 (vector 4234 (vector
4276 (tramp-file-name-method hop) (tramp-file-name-user hop) 4235 (tramp-file-name-method hop) (tramp-file-name-user hop)
4277 (tramp-compat-funcall 'tramp-gw-open-connection vec gw hop) nil nil)) 4236 (tramp-compat-funcall 'tramp-gw-open-connection vec gw hop) nil nil)
4237 target-alist)
4278 ;; For the password prompt, we need the correct values. 4238 ;; For the password prompt, we need the correct values.
4279 ;; Therefore, we must remember the gateway vector. But we 4239 ;; Therefore, we must remember the gateway vector. But we
4280 ;; cannot do it as connection property, because it shouldn't 4240 ;; cannot do it as connection property, because it shouldn't
@@ -4328,68 +4288,68 @@ Does not do anything if a connection is already open, but re-opens the
4328connection if a previous connection has died for some reason." 4288connection if a previous connection has died for some reason."
4329 (tramp-check-proper-host vec) 4289 (tramp-check-proper-host vec)
4330 4290
4331 (catch 'uname-changed 4291 (let ((p (tramp-get-connection-process vec))
4332 (let ((p (tramp-get-connection-process vec)) 4292 (process-name (tramp-get-connection-property vec "process-name" nil))
4333 (process-name (tramp-get-connection-property vec "process-name" nil)) 4293 (process-environment (copy-sequence process-environment))
4334 (process-environment (copy-sequence process-environment)) 4294 (pos (with-current-buffer (tramp-get-connection-buffer vec) (point))))
4335 (pos (with-current-buffer (tramp-get-connection-buffer vec) (point)))) 4295
4336 4296 ;; If Tramp opens the same connection within a short time frame,
4337 ;; If Tramp opens the same connection within a short time frame, 4297 ;; there is a problem. We shall signal this.
4338 ;; there is a problem. We shall signal this. 4298 (unless (or (and p (processp p) (memq (process-status p) '(run open)))
4339 (unless (or (and p (processp p) (memq (process-status p) '(run open))) 4299 (not (equal (butlast (append vec nil) 2)
4340 (not (equal (butlast (append vec nil) 2) 4300 (car tramp-current-connection)))
4341 (car tramp-current-connection))) 4301 (> (tramp-time-diff
4342 (> (tramp-time-diff 4302 (current-time) (cdr tramp-current-connection))
4343 (current-time) (cdr tramp-current-connection)) 4303 (or tramp-connection-min-time-diff 0)))
4344 (or tramp-connection-min-time-diff 0))) 4304 (throw 'suppress 'suppress))
4345 (throw 'suppress 'suppress)) 4305
4346 4306 ;; If too much time has passed since last command was sent, look
4347 ;; If too much time has passed since last command was sent, look 4307 ;; whether process is still alive. If it isn't, kill it. When
4348 ;; whether process is still alive. If it isn't, kill it. When 4308 ;; using ssh, it can sometimes happen that the remote end has hung
4349 ;; using ssh, it can sometimes happen that the remote end has 4309 ;; up but the local ssh client doesn't recognize this until it
4350 ;; hung up but the local ssh client doesn't recognize this until 4310 ;; tries to send some data to the remote end. So that's why we
4351 ;; it tries to send some data to the remote end. So that's why 4311 ;; try to send a command from time to time, then look again
4352 ;; we try to send a command from time to time, then look again 4312 ;; whether the process is really alive.
4353 ;; whether the process is really alive. 4313 (condition-case nil
4354 (condition-case nil 4314 (when (and (> (tramp-time-diff
4355 (when (and (> (tramp-time-diff 4315 (current-time)
4356 (current-time) 4316 (tramp-get-connection-property
4357 (tramp-get-connection-property 4317 p "last-cmd-time" '(0 0 0)))
4358 p "last-cmd-time" '(0 0 0))) 4318 60)
4359 60) 4319 p (processp p) (memq (process-status p) '(run open)))
4360 p (processp p) (memq (process-status p) '(run open))) 4320 (tramp-send-command vec "echo are you awake" t t)
4361 (tramp-send-command vec "echo are you awake" t t) 4321 (unless (and (memq (process-status p) '(run open))
4362 (unless (and (memq (process-status p) '(run open)) 4322 (tramp-wait-for-output p 10))
4363 (tramp-wait-for-output p 10)) 4323 ;; The error will be caught locally.
4364 ;; The error will be caught locally. 4324 (tramp-error vec 'file-error "Awake did fail")))
4365 (tramp-error vec 'file-error "Awake did fail"))) 4325 (file-error
4366 (file-error 4326 (tramp-cleanup-connection vec t)
4367 (tramp-cleanup vec) 4327 (setq p nil)))
4368 (setq p nil))) 4328
4369 4329 ;; New connection must be opened.
4370 ;; New connection must be opened. 4330 (condition-case err
4371 (condition-case err 4331 (unless (and p (processp p) (memq (process-status p) '(run open)))
4372 (unless (and p (processp p) (memq (process-status p) '(run open))) 4332
4373 4333 ;; We call `tramp-get-buffer' in order to get a debug buffer
4374 ;; We call `tramp-get-buffer' in order to get a debug 4334 ;; for messages from the beginning.
4375 ;; buffer for messages from the beginning. 4335 (tramp-get-buffer vec)
4376 (tramp-get-buffer vec) 4336
4377 4337 ;; If `non-essential' is non-nil, don't reopen a new connection.
4378 ;; If `non-essential' is non-nil, don't reopen a new connection. 4338 (when (and (boundp 'non-essential) (symbol-value 'non-essential))
4379 (when (and (boundp 'non-essential) (symbol-value 'non-essential)) 4339 (throw 'non-essential 'non-essential))
4380 (throw 'non-essential 'non-essential)) 4340
4381 4341 (with-tramp-progress-reporter
4382 (with-tramp-progress-reporter 4342 vec 3
4383 vec 3 4343 (if (zerop (length (tramp-file-name-user vec)))
4384 (if (zerop (length (tramp-file-name-user vec))) 4344 (format "Opening connection for %s using %s"
4385 (format "Opening connection for %s using %s"
4386 (tramp-file-name-host vec)
4387 (tramp-file-name-method vec))
4388 (format "Opening connection for %s@%s using %s"
4389 (tramp-file-name-user vec)
4390 (tramp-file-name-host vec) 4345 (tramp-file-name-host vec)
4391 (tramp-file-name-method vec))) 4346 (tramp-file-name-method vec))
4347 (format "Opening connection for %s@%s using %s"
4348 (tramp-file-name-user vec)
4349 (tramp-file-name-host vec)
4350 (tramp-file-name-method vec)))
4392 4351
4352 (catch 'uname-changed
4393 ;; Start new process. 4353 ;; Start new process.
4394 (when (and p (processp p)) 4354 (when (and p (processp p))
4395 (delete-process p)) 4355 (delete-process p))
@@ -4544,13 +4504,13 @@ connection if a previous connection has died for some reason."
4544 target-alist (cdr target-alist))) 4504 target-alist (cdr target-alist)))
4545 4505
4546 ;; Make initial shell settings. 4506 ;; Make initial shell settings.
4547 (tramp-open-connection-setup-interactive-shell p vec)))) 4507 (tramp-open-connection-setup-interactive-shell p vec)))))
4548 4508
4549 ;; When the user did interrupt, we must cleanup. 4509 ;; When the user did interrupt, we must cleanup.
4550 (quit 4510 (quit
4551 (tramp-cleanup vec) 4511 (tramp-cleanup-connection vec t)
4552 ;; Propagate the quit signal. 4512 ;; Propagate the quit signal.
4553 (signal (car err) (cdr err))))))) 4513 (signal (car err) (cdr err))))))
4554 4514
4555(defun tramp-send-command (vec command &optional neveropen nooutput) 4515(defun tramp-send-command (vec command &optional neveropen nooutput)
4556 "Send the COMMAND to connection VEC. 4516 "Send the COMMAND to connection VEC.
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 569bfb9c874..27f3bd41e9c 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -229,7 +229,7 @@ See `tramp-actions-before-shell' for more info.")
229 (insert-directory . tramp-smb-handle-insert-directory) 229 (insert-directory . tramp-smb-handle-insert-directory)
230 (insert-file-contents . tramp-handle-insert-file-contents) 230 (insert-file-contents . tramp-handle-insert-file-contents)
231 (load . tramp-handle-load) 231 (load . tramp-handle-load)
232 ;; `make-auto-save-file-name' performed by default handler. 232 (make-auto-save-file-name . tramp-handle-make-auto-save-file-name)
233 (make-directory . tramp-smb-handle-make-directory) 233 (make-directory . tramp-smb-handle-make-directory)
234 (make-directory-internal . tramp-smb-handle-make-directory-internal) 234 (make-directory-internal . tramp-smb-handle-make-directory-internal)
235 (make-symbolic-link . tramp-smb-handle-make-symbolic-link) 235 (make-symbolic-link . tramp-smb-handle-make-symbolic-link)
@@ -403,7 +403,7 @@ pass to the OPERATION."
403 (port (tramp-file-name-port v)) 403 (port (tramp-file-name-port v))
404 (share (tramp-smb-get-share v)) 404 (share (tramp-smb-get-share v))
405 (localname (file-name-as-directory 405 (localname (file-name-as-directory
406 (replace-regexp-in-string 406 (tramp-compat-replace-regexp-in-string
407 "\\\\" "/" (tramp-smb-get-localname v)))) 407 "\\\\" "/" (tramp-smb-get-localname v))))
408 (tmpdir (make-temp-name 408 (tmpdir (make-temp-name
409 (expand-file-name 409 (expand-file-name
@@ -537,7 +537,8 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
537 (unless (tramp-smb-send-command 537 (unless (tramp-smb-send-command
538 v (format "put \"%s\" \"%s\"" 538 v (format "put \"%s\" \"%s\""
539 filename (tramp-smb-get-localname v))) 539 filename (tramp-smb-get-localname v)))
540 (tramp-error v 'file-error "Cannot copy `%s'" filename)))))) 540 (tramp-error
541 v 'file-error "Cannot copy `%s' to `%s'" filename newname))))))
541 542
542 ;; KEEP-DATE handling. 543 ;; KEEP-DATE handling.
543 (when keep-date 544 (when keep-date
@@ -1151,7 +1152,8 @@ target of the symlink differ."
1151 (tramp-dissect-file-name (if (file-remote-p filename) filename newname)) 1152 (tramp-dissect-file-name (if (file-remote-p filename) filename newname))
1152 0 (format "Renaming %s to %s" filename newname) 1153 0 (format "Renaming %s to %s" filename newname)
1153 1154
1154 (if (and (tramp-equal-remote filename newname) 1155 (if (and (not (file-exists-p newname))
1156 (tramp-equal-remote filename newname)
1155 (string-equal 1157 (string-equal
1156 (tramp-smb-get-share (tramp-dissect-file-name filename)) 1158 (tramp-smb-get-share (tramp-dissect-file-name filename))
1157 (tramp-smb-get-share (tramp-dissect-file-name newname)))) 1159 (tramp-smb-get-share (tramp-dissect-file-name newname))))
@@ -1364,14 +1366,14 @@ Result is a list of (LOCALNAME MODE SIZE MONTH DAY TIME YEAR)."
1364 (while (not (eobp)) 1366 (while (not (eobp))
1365 (setq entry (tramp-smb-read-file-entry share)) 1367 (setq entry (tramp-smb-read-file-entry share))
1366 (forward-line) 1368 (forward-line)
1367 (when entry (add-to-list 'res entry)))) 1369 (when entry (push entry res))))
1368 1370
1369 ;; Cache share entries. 1371 ;; Cache share entries.
1370 (unless share 1372 (unless share
1371 (tramp-set-connection-property v "share-cache" res))) 1373 (tramp-set-connection-property v "share-cache" res)))
1372 1374
1373 ;; Add directory itself. 1375 ;; Add directory itself.
1374 (add-to-list 'res '("" "drwxrwxrwx" 0 (0 0))) 1376 (push '("" "drwxrwxrwx" 0 (0 0)) res)
1375 1377
1376 ;; There's a very strange error (debugged with XEmacs 21.4.14) 1378 ;; There's a very strange error (debugged with XEmacs 21.4.14)
1377 ;; If there's no short delay, it returns nil. No idea about. 1379 ;; If there's no short delay, it returns nil. No idea about.
@@ -1719,11 +1721,15 @@ If ARGUMENT is non-nil, use it as argument for
1719 (error 1721 (error
1720 (with-current-buffer (tramp-get-connection-buffer vec) 1722 (with-current-buffer (tramp-get-connection-buffer vec)
1721 (goto-char (point-min)) 1723 (goto-char (point-min))
1722 (if (search-forward-regexp 1724 (if (and (boundp 'auth-sources)
1723 tramp-smb-wrong-passwd-regexp nil t) 1725 (symbol-value 'auth-sources)
1726 (search-forward-regexp
1727 tramp-smb-wrong-passwd-regexp nil t))
1724 ;; Disable `auth-source' and `password-cache'. 1728 ;; Disable `auth-source' and `password-cache'.
1729 (tramp-message
1730 vec 3 "Retry connection with new password")
1725 (let (auth-sources) 1731 (let (auth-sources)
1726 (tramp-cleanup vec) 1732 (tramp-cleanup-connection vec t)
1727 (tramp-smb-maybe-open-connection vec argument)) 1733 (tramp-smb-maybe-open-connection vec argument))
1728 ;; Propagate the error. 1734 ;; Propagate the error.
1729 (signal (car err) (cdr err))))))))))))) 1735 (signal (car err) (cdr err)))))))))))))
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 5f473a496e2..fe4f7b8bb54 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -690,7 +690,7 @@ Useful for \"rsync\" like methods.")
690;; Tramp only knows how to deal with `file-name-handler-alist', not 690;; Tramp only knows how to deal with `file-name-handler-alist', not
691;; the other places. 691;; the other places.
692 692
693;; Currently, we have the choice between 'ftp, 'sep, and 'url. 693;; Currently, we have the choice between 'ftp and 'sep.
694;;;###autoload 694;;;###autoload
695(defcustom tramp-syntax 695(defcustom tramp-syntax
696 (if (featurep 'xemacs) 'sep 'ftp) 696 (if (featurep 'xemacs) 'sep 'ftp)
@@ -699,20 +699,15 @@ Useful for \"rsync\" like methods.")
699It can have the following values: 699It can have the following values:
700 700
701 'ftp -- Ange-FTP respective EFS like syntax (GNU Emacs default) 701 'ftp -- Ange-FTP respective EFS like syntax (GNU Emacs default)
702 'sep -- Syntax as defined for XEmacs (not available yet for GNU Emacs) 702 'sep -- Syntax as defined for XEmacs."
703 'url -- URL-like syntax."
704 :group 'tramp 703 :group 'tramp
705 :type (if (featurep 'xemacs) 704 :version "24.4"
706 '(choice (const :tag "EFS" ftp) 705 :type `(choice (const :tag ,(if (featurep 'xemacs) "EFS" "Ange-FTP") ftp)
707 (const :tag "XEmacs" sep) 706 (const :tag "XEmacs" sep)))
708 (const :tag "URL" url))
709 '(choice (const :tag "Ange-FTP" ftp)
710 (const :tag "URL" url))))
711 707
712(defconst tramp-prefix-format 708(defconst tramp-prefix-format
713 (cond ((equal tramp-syntax 'ftp) "/") 709 (cond ((equal tramp-syntax 'ftp) "/")
714 ((equal tramp-syntax 'sep) "/[") 710 ((equal tramp-syntax 'sep) "/[")
715 ((equal tramp-syntax 'url) "/")
716 (t (error "Wrong `tramp-syntax' defined"))) 711 (t (error "Wrong `tramp-syntax' defined")))
717 "String matching the very beginning of Tramp file names. 712 "String matching the very beginning of Tramp file names.
718Used in `tramp-make-tramp-file-name'.") 713Used in `tramp-make-tramp-file-name'.")
@@ -729,7 +724,6 @@ Should always start with \"^\". Derived from `tramp-prefix-format'.")
729(defconst tramp-postfix-method-format 724(defconst tramp-postfix-method-format
730 (cond ((equal tramp-syntax 'ftp) ":") 725 (cond ((equal tramp-syntax 'ftp) ":")
731 ((equal tramp-syntax 'sep) "/") 726 ((equal tramp-syntax 'sep) "/")
732 ((equal tramp-syntax 'url) "://")
733 (t (error "Wrong `tramp-syntax' defined"))) 727 (t (error "Wrong `tramp-syntax' defined")))
734 "String matching delimiter between method and user or host names. 728 "String matching delimiter between method and user or host names.
735Used in `tramp-make-tramp-file-name'.") 729Used in `tramp-make-tramp-file-name'.")
@@ -776,7 +770,6 @@ Derived from `tramp-postfix-user-format'.")
776(defconst tramp-prefix-ipv6-format 770(defconst tramp-prefix-ipv6-format
777 (cond ((equal tramp-syntax 'ftp) "[") 771 (cond ((equal tramp-syntax 'ftp) "[")
778 ((equal tramp-syntax 'sep) "") 772 ((equal tramp-syntax 'sep) "")
779 ((equal tramp-syntax 'url) "[")
780 (t (error "Wrong `tramp-syntax' defined"))) 773 (t (error "Wrong `tramp-syntax' defined")))
781 "String matching left hand side of IPv6 addresses. 774 "String matching left hand side of IPv6 addresses.
782Used in `tramp-make-tramp-file-name'.") 775Used in `tramp-make-tramp-file-name'.")
@@ -796,7 +789,6 @@ Derived from `tramp-prefix-ipv6-format'.")
796(defconst tramp-postfix-ipv6-format 789(defconst tramp-postfix-ipv6-format
797 (cond ((equal tramp-syntax 'ftp) "]") 790 (cond ((equal tramp-syntax 'ftp) "]")
798 ((equal tramp-syntax 'sep) "") 791 ((equal tramp-syntax 'sep) "")
799 ((equal tramp-syntax 'url) "]")
800 (t (error "Wrong `tramp-syntax' defined"))) 792 (t (error "Wrong `tramp-syntax' defined")))
801 "String matching right hand side of IPv6 addresses. 793 "String matching right hand side of IPv6 addresses.
802Used in `tramp-make-tramp-file-name'.") 794Used in `tramp-make-tramp-file-name'.")
@@ -809,7 +801,6 @@ Derived from `tramp-postfix-ipv6-format'.")
809(defconst tramp-prefix-port-format 801(defconst tramp-prefix-port-format
810 (cond ((equal tramp-syntax 'ftp) "#") 802 (cond ((equal tramp-syntax 'ftp) "#")
811 ((equal tramp-syntax 'sep) "#") 803 ((equal tramp-syntax 'sep) "#")
812 ((equal tramp-syntax 'url) ":")
813 (t (error "Wrong `tramp-syntax' defined"))) 804 (t (error "Wrong `tramp-syntax' defined")))
814 "String matching delimiter between host names and port numbers.") 805 "String matching delimiter between host names and port numbers.")
815 806
@@ -838,7 +829,6 @@ Derived from `tramp-postfix-hop-format'.")
838(defconst tramp-postfix-host-format 829(defconst tramp-postfix-host-format
839 (cond ((equal tramp-syntax 'ftp) ":") 830 (cond ((equal tramp-syntax 'ftp) ":")
840 ((equal tramp-syntax 'sep) "]") 831 ((equal tramp-syntax 'sep) "]")
841 ((equal tramp-syntax 'url) "")
842 (t (error "Wrong `tramp-syntax' defined"))) 832 (t (error "Wrong `tramp-syntax' defined")))
843 "String matching delimiter between host names and localnames. 833 "String matching delimiter between host names and localnames.
844Used in `tramp-make-tramp-file-name'.") 834Used in `tramp-make-tramp-file-name'.")
@@ -909,15 +899,9 @@ XEmacs uses a separate filename syntax for Tramp and EFS.
909See `tramp-file-name-structure' for more explanations.") 899See `tramp-file-name-structure' for more explanations.")
910 900
911;;;###autoload 901;;;###autoload
912(defconst tramp-file-name-regexp-url "\\`/[^/|:]+://"
913 "Value for `tramp-file-name-regexp' for URL-like remoting.
914See `tramp-file-name-structure' for more explanations.")
915
916;;;###autoload
917(defconst tramp-file-name-regexp 902(defconst tramp-file-name-regexp
918 (cond ((equal tramp-syntax 'ftp) tramp-file-name-regexp-unified) 903 (cond ((equal tramp-syntax 'ftp) tramp-file-name-regexp-unified)
919 ((equal tramp-syntax 'sep) tramp-file-name-regexp-separate) 904 ((equal tramp-syntax 'sep) tramp-file-name-regexp-separate)
920 ((equal tramp-syntax 'url) tramp-file-name-regexp-url)
921 (t (error "Wrong `tramp-syntax' defined"))) 905 (t (error "Wrong `tramp-syntax' defined")))
922 "Regular expression matching file names handled by Tramp. 906 "Regular expression matching file names handled by Tramp.
923This regexp should match Tramp file names but no other file names. 907This regexp should match Tramp file names but no other file names.
@@ -952,16 +936,9 @@ XEmacs uses a separate filename syntax for Tramp and EFS.
952See `tramp-file-name-structure' for more explanations.") 936See `tramp-file-name-structure' for more explanations.")
953 937
954;;;###autoload 938;;;###autoload
955(defconst tramp-completion-file-name-regexp-url
956 "\\`/[^/:]+\\(:\\(/\\(/[^/]*\\)?\\)?\\)?\\'"
957 "Value for `tramp-completion-file-name-regexp' for URL-like remoting.
958See `tramp-file-name-structure' for more explanations.")
959
960;;;###autoload
961(defconst tramp-completion-file-name-regexp 939(defconst tramp-completion-file-name-regexp
962 (cond ((equal tramp-syntax 'ftp) tramp-completion-file-name-regexp-unified) 940 (cond ((equal tramp-syntax 'ftp) tramp-completion-file-name-regexp-unified)
963 ((equal tramp-syntax 'sep) tramp-completion-file-name-regexp-separate) 941 ((equal tramp-syntax 'sep) tramp-completion-file-name-regexp-separate)
964 ((equal tramp-syntax 'url) tramp-completion-file-name-regexp-url)
965 (t (error "Wrong `tramp-syntax' defined"))) 942 (t (error "Wrong `tramp-syntax' defined")))
966 "Regular expression matching file names handled by Tramp completion. 943 "Regular expression matching file names handled by Tramp completion.
967This regexp should match partial Tramp file names only. 944This regexp should match partial Tramp file names only.
@@ -1120,6 +1097,12 @@ calling HANDLER.")
1120 1097
1121;;; Internal functions which must come first: 1098;;; Internal functions which must come first:
1122 1099
1100(defsubst tramp-user-error (vec-or-proc format &rest args)
1101 "Signal a pilot error."
1102 (apply
1103 'tramp-error vec-or-proc
1104 (if (fboundp 'user-error) 'user-error 'error) format args))
1105
1123;; Conversion functions between external representation and 1106;; Conversion functions between external representation and
1124;; internal data structure. Convenience functions for internal 1107;; internal data structure. Convenience functions for internal
1125;; data structure. 1108;; data structure.
@@ -1232,17 +1215,18 @@ their replacement."
1232 (if noninteractive 1215 (if noninteractive
1233 (warn "Method %s is obsolete, using %s" 1216 (warn "Method %s is obsolete, using %s"
1234 result (substring result 0 -1)) 1217 result (substring result 0 -1))
1235 (unless (y-or-n-p (format "Method %s is obsolete, use %s? " 1218 (unless (y-or-n-p (format "Method \"%s\" is obsolete, use \"%s\"? "
1236 result (substring result 0 -1))) 1219 result (substring result 0 -1)))
1237 (tramp-compat-user-error "Method \"%s\" not supported" result))) 1220 (tramp-user-error nil "Method \"%s\" not supported" result)))
1238 (add-to-list 'tramp-warned-obsolete-methods result)) 1221 (add-to-list 'tramp-warned-obsolete-methods result))
1239 ;; This works with the current set of `tramp-obsolete-methods'. 1222 ;; This works with the current set of `tramp-obsolete-methods'.
1240 ;; Must be improved, if their are more sophisticated replacements. 1223 ;; Must be improved, if their are more sophisticated replacements.
1241 (setq result (substring result 0 -1))) 1224 (setq result (substring result 0 -1)))
1242 ;; We must mark, whether a default value has been used. 1225 ;; We must mark, whether a default value has been used. Not
1243 (if (or method (null result)) 1226 ;; applicable for XEmacs.
1227 (if (or method (null result) (null (functionp 'propertize)))
1244 result 1228 result
1245 (propertize result 'tramp-default t)))) 1229 (tramp-compat-funcall 'propertize result 'tramp-default t))))
1246 1230
1247(defun tramp-find-user (method user host) 1231(defun tramp-find-user (method user host)
1248 "Return the right user string to use. 1232 "Return the right user string to use.
@@ -1260,10 +1244,11 @@ This is USER, if non-nil. Otherwise, do a lookup in
1260 (setq choices nil))) 1244 (setq choices nil)))
1261 luser) 1245 luser)
1262 tramp-default-user))) 1246 tramp-default-user)))
1263 ;; We must mark, whether a default value has been used. 1247 ;; We must mark, whether a default value has been used. Not
1264 (if (or user (null result)) 1248 ;; applicable for XEmacs.
1249 (if (or user (null result) (null (functionp 'propertize)))
1265 result 1250 result
1266 (propertize result 'tramp-default t)))) 1251 (tramp-compat-funcall 'propertize result 'tramp-default t))))
1267 1252
1268(defun tramp-find-host (method user host) 1253(defun tramp-find-host (method user host)
1269 "Return the right host string to use. 1254 "Return the right host string to use.
@@ -1289,8 +1274,8 @@ This is HOST, if non-nil. Otherwise, it is `tramp-default-host'."
1289 (or (null method) (get-text-property 0 'tramp-default method)) 1274 (or (null method) (get-text-property 0 'tramp-default method))
1290 (or (null user) (get-text-property 0 'tramp-default user)) 1275 (or (null user) (get-text-property 0 'tramp-default user))
1291 (member host (mapcar 'car tramp-methods))) 1276 (member host (mapcar 'car tramp-methods)))
1292 (tramp-compat-user-error 1277 (tramp-cleanup-connection vec)
1293 "Host name must not match method `%s'" host)))) 1278 (tramp-user-error vec "Host name must not match method \"%s\"" host))))
1294 1279
1295(defun tramp-dissect-file-name (name &optional nodefault) 1280(defun tramp-dissect-file-name (name &optional nodefault)
1296 "Return a `tramp-file-name' structure. 1281 "Return a `tramp-file-name' structure.
@@ -1300,7 +1285,7 @@ non-nil, the file name parts are not expanded to their default
1300values." 1285values."
1301 (save-match-data 1286 (save-match-data
1302 (let ((match (string-match (nth 0 tramp-file-name-structure) name))) 1287 (let ((match (string-match (nth 0 tramp-file-name-structure) name)))
1303 (unless match (tramp-compat-user-error "Not a Tramp file name: %s" name)) 1288 (unless match (tramp-user-error nil "Not a Tramp file name: \"%s\"" name))
1304 (let ((method (match-string (nth 1 tramp-file-name-structure) name)) 1289 (let ((method (match-string (nth 1 tramp-file-name-structure) name))
1305 (user (match-string (nth 2 tramp-file-name-structure) name)) 1290 (user (match-string (nth 2 tramp-file-name-structure) name))
1306 (host (match-string (nth 3 tramp-file-name-structure) name)) 1291 (host (match-string (nth 3 tramp-file-name-structure) name))
@@ -1485,7 +1470,8 @@ ARGUMENTS to actually emit the message (if applicable)."
1485 "tramp-debug-message" 1470 "tramp-debug-message"
1486 "tramp-error" 1471 "tramp-error"
1487 "tramp-error-with-buffer" 1472 "tramp-error-with-buffer"
1488 "tramp-message") 1473 "tramp-message"
1474 "tramp-user-error")
1489 t) 1475 t)
1490 "$") 1476 "$")
1491 fn))) 1477 fn)))
@@ -1625,18 +1611,19 @@ Remaining args are Lisp expressions to be evaluated (inside an implicit
1625 1611
1626If VAR is nil, then we bind `v' to the structure and `method', `user', 1612If VAR is nil, then we bind `v' to the structure and `method', `user',
1627`host', `localname', `hop' to the components." 1613`host', `localname', `hop' to the components."
1628 `(let* ((,(or var 'v) (tramp-dissect-file-name ,filename)) 1614 (let ((bindings
1629 (,(if var (intern (concat (symbol-name var) "-method")) 'method) 1615 (mapcar (lambda (elem)
1630 (tramp-file-name-method ,(or var 'v))) 1616 `(,(if var (intern (format "%s-%s" var elem)) elem)
1631 (,(if var (intern (concat (symbol-name var) "-user")) 'user) 1617 (,(intern (format "tramp-file-name-%s" elem))
1632 (tramp-file-name-user ,(or var 'v))) 1618 ,(or var 'v))))
1633 (,(if var (intern (concat (symbol-name var) "-host")) 'host) 1619 '(method user host localname hop))))
1634 (tramp-file-name-host ,(or var 'v))) 1620 `(let* ((,(or var 'v) (tramp-dissect-file-name ,filename))
1635 (,(if var (intern (concat (symbol-name var) "-localname")) 'localname) 1621 ,@bindings)
1636 (tramp-file-name-localname ,(or var 'v))) 1622 ;; We don't know which of those vars will be used, so we bind them all,
1637 (,(if var (intern (concat (symbol-name var) "-hop")) 'hop) 1623 ;; and then add here a dummy use of all those variables, so we don't get
1638 (tramp-file-name-hop ,(or var 'v)))) 1624 ;; flooded by warnings about those vars `body' didn't use.
1639 ,@body)) 1625 (ignore ,@(mapcar #'car bindings))
1626 ,@body)))
1640 1627
1641(put 'with-parsed-tramp-file-name 'lisp-indent-function 2) 1628(put 'with-parsed-tramp-file-name 'lisp-indent-function 2)
1642(put 'with-parsed-tramp-file-name 'edebug-form-spec '(form symbolp body)) 1629(put 'with-parsed-tramp-file-name 'edebug-form-spec '(form symbolp body))
@@ -1654,24 +1641,27 @@ If VAR is nil, then we bind `v' to the structure and `method', `user',
1654If LEVEL does not fit for visible messages, there are only traces 1641If LEVEL does not fit for visible messages, there are only traces
1655without a visible progress reporter." 1642without a visible progress reporter."
1656 (declare (indent 3) (debug t)) 1643 (declare (indent 3) (debug t))
1657 `(let ((result "failed") 1644 `(progn
1658 pr tm)
1659 (tramp-message ,vec ,level "%s..." ,message) 1645 (tramp-message ,vec ,level "%s..." ,message)
1660 ;; We start a pulsing progress reporter after 3 seconds. Feature 1646 (let ((cookie "failed")
1661 ;; introduced in Emacs 24.1. 1647 (tm
1662 (when (and tramp-message-show-message 1648 ;; We start a pulsing progress reporter after 3 seconds. Feature
1663 ;; Display only when there is a minimum level. 1649 ;; introduced in Emacs 24.1.
1664 (<= ,level (min tramp-verbose 3))) 1650 (when (and tramp-message-show-message
1665 (ignore-errors 1651 ;; Display only when there is a minimum level.
1666 (setq pr (tramp-compat-funcall 'make-progress-reporter ,message) 1652 (<= ,level (min tramp-verbose 3)))
1667 tm (when pr 1653 (ignore-errors
1668 (run-at-time 3 0.1 'tramp-progress-reporter-update pr))))) 1654 (let ((pr (tramp-compat-funcall
1669 (unwind-protect 1655 #'make-progress-reporter ,message)))
1670 ;; Execute the body. 1656 (when pr
1671 (prog1 (progn ,@body) (setq result "done")) 1657 (run-at-time 3 0.1
1672 ;; Stop progress reporter. 1658 #'tramp-progress-reporter-update pr)))))))
1673 (if tm (tramp-compat-funcall 'cancel-timer tm)) 1659 (unwind-protect
1674 (tramp-message ,vec ,level "%s...%s" ,message result)))) 1660 ;; Execute the body.
1661 (prog1 (progn ,@body) (setq cookie "done"))
1662 ;; Stop progress reporter.
1663 (if tm (tramp-compat-funcall 'cancel-timer tm))
1664 (tramp-message ,vec ,level "%s...%s" ,message cookie)))))
1675 1665
1676(tramp-compat-font-lock-add-keywords 1666(tramp-compat-font-lock-add-keywords
1677 'emacs-lisp-mode '("\\<with-tramp-progress-reporter\\>")) 1667 'emacs-lisp-mode '("\\<with-tramp-progress-reporter\\>"))
@@ -1722,19 +1712,6 @@ letter into the file name. This function removes it."
1722 (replace-match "/" nil t name) 1712 (replace-match "/" nil t name)
1723 name))) 1713 name)))
1724 1714
1725(defun tramp-cleanup (vec)
1726 "Cleanup connection VEC, but keep the debug buffer."
1727 (with-current-buffer (tramp-get-debug-buffer vec)
1728 ;; Keep the debug buffer.
1729 (rename-buffer
1730 (generate-new-buffer-name tramp-temp-buffer-name) 'unique)
1731 (tramp-cleanup-connection vec)
1732 (if (= (point-min) (point-max))
1733 (kill-buffer nil)
1734 (rename-buffer (tramp-debug-buffer-name vec) 'unique))
1735 ;; We call `tramp-get-buffer' in order to keep the debug buffer.
1736 (tramp-get-buffer vec)))
1737
1738;;; Config Manipulation Functions: 1715;;; Config Manipulation Functions:
1739 1716
1740;;;###tramp-autoload 1717;;;###tramp-autoload
@@ -2157,7 +2134,7 @@ Falls back to normal file name handler if no Tramp file name handler exists."
2157 (tramp-message 2134 (tramp-message
2158 v 1 "Suppress received in operation %s" 2135 v 1 "Suppress received in operation %s"
2159 (append (list operation) args)) 2136 (append (list operation) args))
2160 (tramp-cleanup v) 2137 (tramp-cleanup-connection v t)
2161 (tramp-run-real-handler operation args))) 2138 (tramp-run-real-handler operation args)))
2162 (t result))) 2139 (t result)))
2163 2140
@@ -2531,64 +2508,40 @@ They are collected by `tramp-completion-dissect-file-name1'."
2531 tramp-prefix-ipv6-regexp 2508 tramp-prefix-ipv6-regexp
2532 "\\(" tramp-completion-ipv6-regexp x-nil "\\)$") 2509 "\\(" tramp-completion-ipv6-regexp x-nil "\\)$")
2533 nil 1 2 nil)) 2510 nil 1 2 nil))
2534 ;; "/method:user" "/[method/user" "/method://user" 2511 ;; "/method:user" "/[method/user"
2535 (tramp-completion-file-name-structure7 2512 (tramp-completion-file-name-structure7
2536 (list (concat tramp-prefix-regexp 2513 (list (concat tramp-prefix-regexp
2537 "\\(" tramp-method-regexp "\\)" tramp-postfix-method-regexp 2514 "\\(" tramp-method-regexp "\\)" tramp-postfix-method-regexp
2538 "\\(" tramp-user-regexp x-nil "\\)$") 2515 "\\(" tramp-user-regexp x-nil "\\)$")
2539 1 2 nil nil)) 2516 1 2 nil nil))
2540 ;; "/method:host" "/[method/host" "/method://host" 2517 ;; "/method:host" "/[method/host"
2541 (tramp-completion-file-name-structure8 2518 (tramp-completion-file-name-structure8
2542 (list (concat tramp-prefix-regexp 2519 (list (concat tramp-prefix-regexp
2543 "\\(" tramp-method-regexp "\\)" tramp-postfix-method-regexp 2520 "\\(" tramp-method-regexp "\\)" tramp-postfix-method-regexp
2544 "\\(" tramp-host-regexp x-nil "\\)$") 2521 "\\(" tramp-host-regexp x-nil "\\)$")
2545 1 nil 2 nil)) 2522 1 nil 2 nil))
2546 ;; "/method:[ipv6" "/[method/ipv6" "/method://[ipv6" 2523 ;; "/method:[ipv6" "/[method/ipv6"
2547 (tramp-completion-file-name-structure9 2524 (tramp-completion-file-name-structure9
2548 (list (concat tramp-prefix-regexp 2525 (list (concat tramp-prefix-regexp
2549 "\\(" tramp-method-regexp "\\)" tramp-postfix-method-regexp 2526 "\\(" tramp-method-regexp "\\)" tramp-postfix-method-regexp
2550 tramp-prefix-ipv6-regexp 2527 tramp-prefix-ipv6-regexp
2551 "\\(" tramp-completion-ipv6-regexp x-nil "\\)$") 2528 "\\(" tramp-completion-ipv6-regexp x-nil "\\)$")
2552 1 nil 2 nil)) 2529 1 nil 2 nil))
2553 ;; "/method:user@host" "/[method/user@host" "/method://user@host" 2530 ;; "/method:user@host" "/[method/user@host"
2554 (tramp-completion-file-name-structure10 2531 (tramp-completion-file-name-structure10
2555 (list (concat tramp-prefix-regexp 2532 (list (concat tramp-prefix-regexp
2556 "\\(" tramp-method-regexp "\\)" tramp-postfix-method-regexp 2533 "\\(" tramp-method-regexp "\\)" tramp-postfix-method-regexp
2557 "\\(" tramp-user-regexp "\\)" tramp-postfix-user-regexp 2534 "\\(" tramp-user-regexp "\\)" tramp-postfix-user-regexp
2558 "\\(" tramp-host-regexp x-nil "\\)$") 2535 "\\(" tramp-host-regexp x-nil "\\)$")
2559 1 2 3 nil)) 2536 1 2 3 nil))
2560 ;; "/method:user@[ipv6" "/[method/user@ipv6" "/method://user@[ipv6" 2537 ;; "/method:user@[ipv6" "/[method/user@ipv6"
2561 (tramp-completion-file-name-structure11 2538 (tramp-completion-file-name-structure11
2562 (list (concat tramp-prefix-regexp 2539 (list (concat tramp-prefix-regexp
2563 "\\(" tramp-method-regexp "\\)" tramp-postfix-method-regexp 2540 "\\(" tramp-method-regexp "\\)" tramp-postfix-method-regexp
2564 "\\(" tramp-user-regexp "\\)" tramp-postfix-user-regexp 2541 "\\(" tramp-user-regexp "\\)" tramp-postfix-user-regexp
2565 tramp-prefix-ipv6-regexp 2542 tramp-prefix-ipv6-regexp
2566 "\\(" tramp-completion-ipv6-regexp x-nil "\\)$") 2543 "\\(" tramp-completion-ipv6-regexp x-nil "\\)$")
2567 1 2 3 nil)) 2544 1 2 3 nil)))
2568 ;; "/method: "/method:/"
2569 (tramp-completion-file-name-structure12
2570 (list
2571 (if (equal tramp-syntax 'url)
2572 (concat tramp-prefix-regexp
2573 "\\(" tramp-method-regexp "\\)"
2574 "\\(" (substring tramp-postfix-method-regexp 0 1)
2575 "\\|" (substring tramp-postfix-method-regexp 1 2) "\\)"
2576 "\\(" "\\)$")
2577 ;; Should not match if not URL syntax.
2578 (concat tramp-prefix-regexp "/$"))
2579 1 3 nil nil))
2580 ;; "/method: "/method:/"
2581 (tramp-completion-file-name-structure13
2582 (list
2583 (if (equal tramp-syntax 'url)
2584 (concat tramp-prefix-regexp
2585 "\\(" tramp-method-regexp "\\)"
2586 "\\(" (substring tramp-postfix-method-regexp 0 1)
2587 "\\|" (substring tramp-postfix-method-regexp 1 2) "\\)"
2588 "\\(" "\\)$")
2589 ;; Should not match if not URL syntax.
2590 (concat tramp-prefix-regexp "/$"))
2591 1 nil 3 nil)))
2592 2545
2593 (mapc (lambda (structure) 2546 (mapc (lambda (structure)
2594 (add-to-list 'result 2547 (add-to-list 'result
@@ -2605,8 +2558,6 @@ They are collected by `tramp-completion-dissect-file-name1'."
2605 tramp-completion-file-name-structure9 2558 tramp-completion-file-name-structure9
2606 tramp-completion-file-name-structure10 2559 tramp-completion-file-name-structure10
2607 tramp-completion-file-name-structure11 2560 tramp-completion-file-name-structure11
2608 tramp-completion-file-name-structure12
2609 tramp-completion-file-name-structure13
2610 tramp-file-name-structure)) 2561 tramp-file-name-structure))
2611 2562
2612 (delq nil result))) 2563 (delq nil result)))
@@ -3233,7 +3184,7 @@ User is always nil."
3233 (when p 3184 (when p
3234 (if (yes-or-no-p "A command is running. Kill it? ") 3185 (if (yes-or-no-p "A command is running. Kill it? ")
3235 (ignore-errors (kill-process p)) 3186 (ignore-errors (kill-process p))
3236 (tramp-compat-user-error "Shell command in progress"))) 3187 (tramp-user-error p "Shell command in progress")))
3237 3188
3238 (if current-buffer-p 3189 (if current-buffer-p
3239 (progn 3190 (progn
@@ -3278,35 +3229,19 @@ User is always nil."
3278 3229
3279(defun tramp-handle-substitute-in-file-name (filename) 3230(defun tramp-handle-substitute-in-file-name (filename)
3280 "Like `substitute-in-file-name' for Tramp files. 3231 "Like `substitute-in-file-name' for Tramp files.
3281\"//\" and \"/~\" substitute only in the local filename part. 3232\"//\" and \"/~\" substitute only in the local filename part."
3282If the URL Tramp syntax is chosen, \"//\" as method delimiter and \"/~\" at
3283beginning of local filename are not substituted."
3284 ;; First, we must replace environment variables. 3233 ;; First, we must replace environment variables.
3285 (setq filename (tramp-replace-environment-variables filename)) 3234 (setq filename (tramp-replace-environment-variables filename))
3286 (with-parsed-tramp-file-name filename nil 3235 (with-parsed-tramp-file-name filename nil
3287 (if (equal tramp-syntax 'url) 3236 ;; Ignore in LOCALNAME everything before "//" or "/~".
3288 ;; We need to check localname only. The other parts cannot contain 3237 (when (and (stringp localname) (string-match ".+?/\\(/\\|~\\)" localname))
3289 ;; "//" or "/~". 3238 (setq filename
3290 (if (and (> (length localname) 1) 3239 (concat (file-remote-p filename)
3291 (or (string-match "//" localname) 3240 (replace-match "\\1" nil nil localname)))
3292 (string-match "/~" localname 1))) 3241 ;; "/m:h:~" does not work for completion. We use "/m:h:~/".
3293 (tramp-run-real-handler 'substitute-in-file-name (list filename)) 3242 (when (string-match "~$" filename)
3294 (tramp-make-tramp-file-name 3243 (setq filename (concat filename "/"))))
3295 (when method (substitute-in-file-name method)) 3244 (tramp-run-real-handler 'substitute-in-file-name (list filename))))
3296 (when user (substitute-in-file-name user))
3297 (when host (substitute-in-file-name host))
3298 (when localname
3299 (tramp-run-real-handler
3300 'substitute-in-file-name (list localname)))))
3301 ;; Ignore in LOCALNAME everything before "//" or "/~".
3302 (when (and (stringp localname) (string-match ".+?/\\(/\\|~\\)" localname))
3303 (setq filename
3304 (concat (file-remote-p filename)
3305 (replace-match "\\1" nil nil localname)))
3306 ;; "/m:h:~" does not work for completion. We use "/m:h:~/".
3307 (when (string-match "~$" filename)
3308 (setq filename (concat filename "/"))))
3309 (tramp-run-real-handler 'substitute-in-file-name (list filename)))))
3310 3245
3311(defun tramp-handle-unhandled-file-name-directory (_filename) 3246(defun tramp-handle-unhandled-file-name-directory (_filename)
3312 "Like `unhandled-file-name-directory' for Tramp files." 3247 "Like `unhandled-file-name-directory' for Tramp files."
@@ -3974,6 +3909,48 @@ Return the local name of the temporary file."
3974 3909
3975;;; Auto saving to a special directory: 3910;;; Auto saving to a special directory:
3976 3911
3912(defun tramp-handle-make-auto-save-file-name ()
3913 "Like `make-auto-save-file-name' for Tramp files.
3914Returns a file name in `tramp-auto-save-directory' for autosaving this file."
3915 (let ((tramp-auto-save-directory tramp-auto-save-directory)
3916 (buffer-file-name
3917 (tramp-subst-strs-in-string
3918 '(("_" . "|")
3919 ("/" . "_a")
3920 (":" . "_b")
3921 ("|" . "__")
3922 ("[" . "_l")
3923 ("]" . "_r"))
3924 (buffer-file-name))))
3925 ;; File name must be unique. This is ensured with Emacs 22 (see
3926 ;; UNIQUIFY element of `auto-save-file-name-transforms'); but for
3927 ;; all other cases we must do it ourselves.
3928 (when (boundp 'auto-save-file-name-transforms)
3929 (mapc
3930 (lambda (x)
3931 (when (and (string-match (car x) buffer-file-name)
3932 (not (car (cddr x))))
3933 (setq tramp-auto-save-directory
3934 (or tramp-auto-save-directory
3935 (tramp-compat-temporary-file-directory)))))
3936 (symbol-value 'auto-save-file-name-transforms)))
3937 ;; Create directory.
3938 (when tramp-auto-save-directory
3939 (setq buffer-file-name
3940 (expand-file-name buffer-file-name tramp-auto-save-directory))
3941 (unless (file-exists-p tramp-auto-save-directory)
3942 (make-directory tramp-auto-save-directory t)))
3943 ;; Run plain `make-auto-save-file-name'. There might be an advice when
3944 ;; it is not a magic file name operation (since Emacs 22).
3945 ;; We must deactivate it temporarily.
3946 (if (not (ad-is-active 'make-auto-save-file-name))
3947 (tramp-run-real-handler 'make-auto-save-file-name nil)
3948 ;; else
3949 (ad-deactivate 'make-auto-save-file-name)
3950 (prog1
3951 (tramp-run-real-handler 'make-auto-save-file-name nil)
3952 (ad-activate 'make-auto-save-file-name)))))
3953
3977(unless (tramp-exists-file-name-handler 'make-auto-save-file-name) 3954(unless (tramp-exists-file-name-handler 'make-auto-save-file-name)
3978 (defadvice make-auto-save-file-name 3955 (defadvice make-auto-save-file-name
3979 (around tramp-advice-make-auto-save-file-name () activate) 3956 (around tramp-advice-make-auto-save-file-name () activate)
diff --git a/lisp/nxml/nxml-util.el b/lisp/nxml/nxml-util.el
index 75479160cbb..c410aa12c83 100644
--- a/lisp/nxml/nxml-util.el
+++ b/lisp/nxml/nxml-util.el
@@ -45,7 +45,7 @@
45 45
46(defmacro nxml-debug-clear-inside (start end) 46(defmacro nxml-debug-clear-inside (start end)
47 (when nxml-debug 47 (when nxml-debug
48 `(loop for overlay in (overlays-in ,start ,end) 48 `(cl-loop for overlay in (overlays-in ,start ,end)
49 if (overlay-get overlay 'nxml-inside-debug) 49 if (overlay-get overlay 'nxml-inside-debug)
50 do (delete-overlay overlay) 50 do (delete-overlay overlay)
51 finally (nxml-debug-change "nxml-clear-inside" ,start ,end)))) 51 finally (nxml-debug-change "nxml-clear-inside" ,start ,end))))
diff --git a/lisp/printing.el b/lisp/printing.el
index 2c807b078f5..e814c3a06f2 100644
--- a/lisp/printing.el
+++ b/lisp/printing.el
@@ -4627,21 +4627,21 @@ bottom."
4627 4627
4628 4628
4629;;;###autoload 4629;;;###autoload
4630(defun pr-customize (&rest ignore) 4630(defun pr-customize (&rest _ignore)
4631 "Customization of the `printing' group." 4631 "Customization of the `printing' group."
4632 (interactive) 4632 (interactive)
4633 (customize-group 'printing)) 4633 (customize-group 'printing))
4634 4634
4635 4635
4636;;;###autoload 4636;;;###autoload
4637(defun lpr-customize (&rest ignore) 4637(defun lpr-customize (&rest _ignore)
4638 "Customization of the `lpr' group." 4638 "Customization of the `lpr' group."
4639 (interactive) 4639 (interactive)
4640 (customize-group 'lpr)) 4640 (customize-group 'lpr))
4641 4641
4642 4642
4643;;;###autoload 4643;;;###autoload
4644(defun pr-help (&rest ignore) 4644(defun pr-help (&rest _ignore)
4645 "Help for the printing package." 4645 "Help for the printing package."
4646 (interactive) 4646 (interactive)
4647 (pr-show-setup pr-help-message "*Printing Help*")) 4647 (pr-show-setup pr-help-message "*Printing Help*"))
@@ -4675,21 +4675,21 @@ bottom."
4675 4675
4676 4676
4677;;;###autoload 4677;;;###autoload
4678(defun pr-show-ps-setup (&rest ignore) 4678(defun pr-show-ps-setup (&rest _ignore)
4679 "Show current ps-print settings." 4679 "Show current ps-print settings."
4680 (interactive) 4680 (interactive)
4681 (pr-show-setup (ps-setup) "*PS Setup*")) 4681 (pr-show-setup (ps-setup) "*PS Setup*"))
4682 4682
4683 4683
4684;;;###autoload 4684;;;###autoload
4685(defun pr-show-pr-setup (&rest ignore) 4685(defun pr-show-pr-setup (&rest _ignore)
4686 "Show current printing settings." 4686 "Show current printing settings."
4687 (interactive) 4687 (interactive)
4688 (pr-show-setup (pr-setup) "*PR Setup*")) 4688 (pr-show-setup (pr-setup) "*PR Setup*"))
4689 4689
4690 4690
4691;;;###autoload 4691;;;###autoload
4692(defun pr-show-lpr-setup (&rest ignore) 4692(defun pr-show-lpr-setup (&rest _ignore)
4693 "Show current lpr settings." 4693 "Show current lpr settings."
4694 (interactive) 4694 (interactive)
4695 (pr-show-setup (lpr-setup) "*LPR Setup*")) 4695 (pr-show-setup (lpr-setup) "*LPR Setup*"))
@@ -6125,7 +6125,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
6125 (pr-insert-checkbox 6125 (pr-insert-checkbox
6126 "\n " 6126 "\n "
6127 'pr-i-region 6127 'pr-i-region
6128 #'(lambda (widget &rest ignore) 6128 #'(lambda (widget &rest _ignore)
6129 (let ((region-p (pr-interface-save 6129 (let ((region-p (pr-interface-save
6130 (ps-mark-active-p)))) 6130 (ps-mark-active-p))))
6131 (cond ((null (widget-value widget)) ; widget is nil 6131 (cond ((null (widget-value widget)) ; widget is nil
@@ -6146,7 +6146,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
6146 (pr-insert-checkbox 6146 (pr-insert-checkbox
6147 " " 6147 " "
6148 'pr-i-mode 6148 'pr-i-mode
6149 #'(lambda (widget &rest ignore) 6149 #'(lambda (widget &rest _ignore)
6150 (let ((mode-p (pr-interface-save 6150 (let ((mode-p (pr-interface-save
6151 (pr-mode-alist-p)))) 6151 (pr-mode-alist-p))))
6152 (cond 6152 (cond
@@ -6182,7 +6182,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
6182 (widget-create 'regexp 6182 (widget-create 'regexp
6183 :size 58 6183 :size 58
6184 :format "\n File Regexp : %v\n" 6184 :format "\n File Regexp : %v\n"
6185 :notify (lambda (widget &rest ignore) 6185 :notify (lambda (widget &rest _ignore)
6186 (setq pr-i-regexp (widget-value widget))) 6186 (setq pr-i-regexp (widget-value widget)))
6187 pr-i-regexp) 6187 pr-i-regexp)
6188 ;; 1b. Directory: List Directory Entry 6188 ;; 1b. Directory: List Directory Entry
@@ -6222,7 +6222,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
6222 (pr-insert-checkbox 6222 (pr-insert-checkbox
6223 " " 6223 " "
6224 'pr-i-despool 6224 'pr-i-despool
6225 #'(lambda (widget &rest ignore) 6225 #'(lambda (widget &rest _ignore)
6226 (if pr-spool-p 6226 (if pr-spool-p
6227 (setq pr-i-despool (not pr-i-despool)) 6227 (setq pr-i-despool (not pr-i-despool))
6228 (ding) 6228 (ding)
@@ -6259,7 +6259,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
6259 'integer 6259 'integer
6260 :size 3 6260 :size 3
6261 :format "\n N-Up : %v" 6261 :format "\n N-Up : %v"
6262 :notify (lambda (widget &rest ignore) 6262 :notify (lambda (widget &rest _ignore)
6263 (let ((value (if (string= (widget-apply widget :value-get) "") 6263 (let ((value (if (string= (widget-apply widget :value-get) "")
6264 0 6264 0
6265 (widget-value widget)))) 6265 (widget-value widget))))
@@ -6288,7 +6288,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
6288 ;; 4. Settings: 6288 ;; 4. Settings:
6289 ;; 4. Settings: Landscape Auto Region Verbose 6289 ;; 4. Settings: Landscape Auto Region Verbose
6290 (pr-insert-checkbox "\n\n " 'ps-landscape-mode 6290 (pr-insert-checkbox "\n\n " 'ps-landscape-mode
6291 #'(lambda (&rest ignore) 6291 #'(lambda (&rest _ignore)
6292 (setq ps-landscape-mode (not ps-landscape-mode) 6292 (setq ps-landscape-mode (not ps-landscape-mode)
6293 pr-file-landscape ps-landscape-mode)) 6293 pr-file-landscape ps-landscape-mode))
6294 " Landscape ") 6294 " Landscape ")
@@ -6310,7 +6310,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
6310 (pr-insert-toggle 'ps-zebra-stripes " Zebra Stripes") 6310 (pr-insert-toggle 'ps-zebra-stripes " Zebra Stripes")
6311 (pr-insert-checkbox " " 6311 (pr-insert-checkbox " "
6312 'pr-spool-p 6312 'pr-spool-p
6313 #'(lambda (&rest ignore) 6313 #'(lambda (&rest _ignore)
6314 (setq pr-spool-p (not pr-spool-p)) 6314 (setq pr-spool-p (not pr-spool-p))
6315 (unless pr-spool-p 6315 (unless pr-spool-p
6316 (setq pr-i-despool nil) 6316 (setq pr-i-despool nil)
@@ -6320,7 +6320,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
6320 ;; 4. Settings: Duplex Print with faces 6320 ;; 4. Settings: Duplex Print with faces
6321 (pr-insert-checkbox "\n " 6321 (pr-insert-checkbox "\n "
6322 'ps-spool-duplex 6322 'ps-spool-duplex
6323 #'(lambda (&rest ignore) 6323 #'(lambda (&rest _ignore)
6324 (setq ps-spool-duplex (not ps-spool-duplex) 6324 (setq ps-spool-duplex (not ps-spool-duplex)
6325 pr-file-duplex ps-spool-duplex)) 6325 pr-file-duplex ps-spool-duplex))
6326 " Duplex ") 6326 " Duplex ")
@@ -6329,7 +6329,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
6329 ;; 4. Settings: Tumble Print via Ghostscript 6329 ;; 4. Settings: Tumble Print via Ghostscript
6330 (pr-insert-checkbox "\n " 6330 (pr-insert-checkbox "\n "
6331 'ps-spool-tumble 6331 'ps-spool-tumble
6332 #'(lambda (&rest ignore) 6332 #'(lambda (&rest _ignore)
6333 (setq ps-spool-tumble (not ps-spool-tumble) 6333 (setq ps-spool-tumble (not ps-spool-tumble)
6334 pr-file-tumble ps-spool-tumble)) 6334 pr-file-tumble ps-spool-tumble))
6335 " Tumble ") 6335 " Tumble ")
@@ -6352,7 +6352,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
6352 ;; 5. Customize: 6352 ;; 5. Customize:
6353 (pr-insert-italic "\n\nCustomize : " 2 11) 6353 (pr-insert-italic "\n\nCustomize : " 2 11)
6354 (pr-insert-button 'pr-customize "printing" " ") 6354 (pr-insert-button 'pr-customize "printing" " ")
6355 (pr-insert-button #'(lambda (&rest ignore) (ps-print-customize)) 6355 (pr-insert-button #'(lambda (&rest _ignore) (ps-print-customize))
6356 "ps-print" " ") 6356 "ps-print" " ")
6357 (pr-insert-button 'lpr-customize "lpr")) 6357 (pr-insert-button 'lpr-customize "lpr"))
6358 6358
@@ -6374,7 +6374,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
6374 (pr-insert-button 'pr-kill-help "Kill All Printing Help Buffer")) 6374 (pr-insert-button 'pr-kill-help "Kill All Printing Help Buffer"))
6375 6375
6376 6376
6377(defun pr-kill-help (&rest ignore) 6377(defun pr-kill-help (&rest _ignore)
6378 "Kill all printing help buffer." 6378 "Kill all printing help buffer."
6379 (interactive) 6379 (interactive)
6380 (let ((help '("*Printing Interface Help*" "*Printing Help*" 6380 (let ((help '("*Printing Interface Help*" "*Printing Help*"
@@ -6388,20 +6388,20 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
6388 (recenter (- (window-height) 2))) 6388 (recenter (- (window-height) 2)))
6389 6389
6390 6390
6391(defun pr-interface-quit (&rest ignore) 6391(defun pr-interface-quit (&rest _ignore)
6392 "Kill the printing buffer interface and quit." 6392 "Kill the printing buffer interface and quit."
6393 (interactive) 6393 (interactive)
6394 (kill-buffer pr-buffer-name) 6394 (kill-buffer pr-buffer-name)
6395 (set-window-configuration pr-i-window-configuration)) 6395 (set-window-configuration pr-i-window-configuration))
6396 6396
6397 6397
6398(defun pr-interface-help (&rest ignore) 6398(defun pr-interface-help (&rest _ignore)
6399 "printing buffer interface help." 6399 "printing buffer interface help."
6400 (interactive) 6400 (interactive)
6401 (pr-show-setup pr-interface-help-message "*Printing Interface Help*")) 6401 (pr-show-setup pr-interface-help-message "*Printing Interface Help*"))
6402 6402
6403 6403
6404(defun pr-interface-txt-print (&rest ignore) 6404(defun pr-interface-txt-print (&rest _ignore)
6405 "Print using lpr package." 6405 "Print using lpr package."
6406 (interactive) 6406 (interactive)
6407 (condition-case data 6407 (condition-case data
@@ -6433,7 +6433,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
6433 (message "%s" (error-message-string data))))) 6433 (message "%s" (error-message-string data)))))
6434 6434
6435 6435
6436(defun pr-interface-printify (&rest ignore) 6436(defun pr-interface-printify (&rest _ignore)
6437 "Printify a buffer." 6437 "Printify a buffer."
6438 (interactive) 6438 (interactive)
6439 (condition-case data 6439 (condition-case data
@@ -6458,7 +6458,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
6458 (message "%s" (error-message-string data))))) 6458 (message "%s" (error-message-string data)))))
6459 6459
6460 6460
6461(defun pr-interface-ps-print (&rest ignore) 6461(defun pr-interface-ps-print (&rest _ignore)
6462 "Print using ps-print package." 6462 "Print using ps-print package."
6463 (interactive) 6463 (interactive)
6464 (pr-interface-ps 'pr-despool-ps-print 'pr-ps-directory-ps-print 6464 (pr-interface-ps 'pr-despool-ps-print 'pr-ps-directory-ps-print
@@ -6467,7 +6467,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
6467 'pr-ps-buffer-ps-print)) 6467 'pr-ps-buffer-ps-print))
6468 6468
6469 6469
6470(defun pr-interface-preview (&rest ignore) 6470(defun pr-interface-preview (&rest _ignore)
6471 "Preview a PostScript file." 6471 "Preview a PostScript file."
6472 (interactive) 6472 (interactive)
6473 (pr-interface-ps 'pr-despool-preview 'pr-ps-directory-preview 6473 (pr-interface-ps 'pr-despool-preview 'pr-ps-directory-preview
@@ -6548,7 +6548,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
6548 (error "Please specify be a readable directory"))) 6548 (error "Please specify be a readable directory")))
6549 6549
6550 6550
6551(defun pr-interface-directory (widget &rest ignore) 6551(defun pr-interface-directory (widget &rest _ignore)
6552 (and pr-buffer-verbose 6552 (and pr-buffer-verbose
6553 (message "You can use M-TAB or ESC TAB for file completion")) 6553 (message "You can use M-TAB or ESC TAB for file completion"))
6554 (let ((dir (widget-value widget))) 6554 (let ((dir (widget-value widget)))
@@ -6557,7 +6557,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
6557 (setq pr-i-directory dir)))) 6557 (setq pr-i-directory dir))))
6558 6558
6559 6559
6560(defun pr-interface-infile (widget &rest ignore) 6560(defun pr-interface-infile (widget &rest _ignore)
6561 (and pr-buffer-verbose 6561 (and pr-buffer-verbose
6562 (message "You can use M-TAB or ESC TAB for file completion")) 6562 (message "You can use M-TAB or ESC TAB for file completion"))
6563 (let ((file (widget-value widget))) 6563 (let ((file (widget-value widget)))
@@ -6566,7 +6566,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
6566 (setq pr-i-ps-file file)))) 6566 (setq pr-i-ps-file file))))
6567 6567
6568 6568
6569(defun pr-interface-outfile (widget &rest ignore) 6569(defun pr-interface-outfile (widget &rest _ignore)
6570 (setq pr-i-answer-yes nil) 6570 (setq pr-i-answer-yes nil)
6571 (and pr-buffer-verbose 6571 (and pr-buffer-verbose
6572 (message "You can use M-TAB or ESC TAB for file completion")) 6572 (message "You can use M-TAB or ESC TAB for file completion"))
@@ -6602,7 +6602,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
6602 6602
6603(defun pr-insert-toggle (var-sym label) 6603(defun pr-insert-toggle (var-sym label)
6604 (widget-create 'checkbox 6604 (widget-create 'checkbox
6605 :notify `(lambda (&rest ignore) 6605 :notify `(lambda (&rest _ignore)
6606 (setq ,var-sym (not ,var-sym))) 6606 (setq ,var-sym (not ,var-sym)))
6607 (symbol-value var-sym)) 6607 (symbol-value var-sym))
6608 (widget-insert label)) 6608 (widget-insert label))
@@ -6623,7 +6623,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
6623 :format "%v" 6623 :format "%v"
6624 :inline t 6624 :inline t
6625 :value ,var-sym 6625 :value ,var-sym
6626 :notify (lambda (widget &rest ignore) 6626 :notify (lambda (widget &rest _ignore)
6627 (setq ,var-sym (widget-value widget)) 6627 (setq ,var-sym (widget-value widget))
6628 ,@body) 6628 ,@body)
6629 :void '(choice-item :format "%[%t%]" 6629 :void '(choice-item :format "%[%t%]"
@@ -6639,7 +6639,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
6639 'radio-button 6639 'radio-button
6640 :format " %[%v%]" 6640 :format " %[%v%]"
6641 :value (eq ,var-sym (quote ,sym)) 6641 :value (eq ,var-sym (quote ,sym))
6642 :notify (lambda (&rest ignore) 6642 :notify (lambda (&rest _ignore)
6643 (setq ,var-sym (quote ,sym)) 6643 (setq ,var-sym (quote ,sym))
6644 (pr-update-radio-button (quote ,var-sym))))))) 6644 (pr-update-radio-button (quote ,var-sym)))))))
6645 (put var-sym 'pr-widget-list (cons (cons wid sym) wid-list)))) 6645 (put var-sym 'pr-widget-list (cons (cons wid sym) wid-list))))
diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el
index d29fa8c1d36..1ca83a97a59 100644
--- a/lisp/progmodes/ada-xref.el
+++ b/lisp/progmodes/ada-xref.el
@@ -342,9 +342,9 @@ CROSS-PREFIX is the prefix to use for the `gnatls' command."
342 ) 342 )
343 (kill-buffer nil)))) 343 (kill-buffer nil))))
344 344
345 (set 'ada-xref-runtime-library-specs-path 345 (setq ada-xref-runtime-library-specs-path
346 (reverse ada-xref-runtime-library-specs-path)) 346 (reverse ada-xref-runtime-library-specs-path))
347 (set 'ada-xref-runtime-library-ali-path 347 (setq ada-xref-runtime-library-ali-path
348 (reverse ada-xref-runtime-library-ali-path)) 348 (reverse ada-xref-runtime-library-ali-path))
349 )) 349 ))
350 350
@@ -582,8 +582,8 @@ as defined in the project file."
582 582
583 (while dirs 583 (while dirs
584 (if (file-directory-p (car dirs)) 584 (if (file-directory-p (car dirs))
585 (set 'list (append list (file-name-all-completions string (car dirs))))) 585 (setq list (append list (file-name-all-completions string (car dirs)))))
586 (set 'dirs (cdr dirs))) 586 (setq dirs (cdr dirs)))
587 (cond ((equal flag 'lambda) 587 (cond ((equal flag 'lambda)
588 (assoc string list)) 588 (assoc string list))
589 (flag 589 (flag
@@ -702,11 +702,11 @@ is non-nil, prompt the user to select one. If none are found, return
702 702
703 ((file-exists-p first-choice) 703 ((file-exists-p first-choice)
704 ;; filename.adp 704 ;; filename.adp
705 (set 'selected first-choice)) 705 (setq selected first-choice))
706 706
707 ((= (length prj-files) 1) 707 ((= (length prj-files) 1)
708 ;; Exactly one project file was found in the current directory 708 ;; Exactly one project file was found in the current directory
709 (set 'selected (car prj-files))) 709 (setq selected (car prj-files)))
710 710
711 ((and (> (length prj-files) 1) (not no-user-question)) 711 ((and (> (length prj-files) 1) (not no-user-question))
712 ;; multiple project files in current directory, ask the user 712 ;; multiple project files in current directory, ask the user
@@ -732,7 +732,7 @@ is non-nil, prompt the user to select one. If none are found, return
732 (> choice (length prj-files))) 732 (> choice (length prj-files)))
733 (setq choice (string-to-number 733 (setq choice (string-to-number
734 (read-from-minibuffer "Enter No. of your choice: ")))) 734 (read-from-minibuffer "Enter No. of your choice: "))))
735 (set 'selected (nth (1- choice) prj-files)))) 735 (setq selected (nth (1- choice) prj-files))))
736 736
737 ((= (length prj-files) 0) 737 ((= (length prj-files) 0)
738 ;; No project file in the current directory; ask user 738 ;; No project file in the current directory; ask user
@@ -742,7 +742,7 @@ is non-nil, prompt the user to select one. If none are found, return
742 (concat "project file [" ada-last-prj-file "]:") 742 (concat "project file [" ada-last-prj-file "]:")
743 nil ada-last-prj-file)) 743 nil ada-last-prj-file))
744 (unless (string= ada-last-prj-file "") 744 (unless (string= ada-last-prj-file "")
745 (set 'selected ada-last-prj-file)))) 745 (setq selected ada-last-prj-file))))
746 ))) 746 )))
747 747
748 (or selected "default.adp") 748 (or selected "default.adp")
@@ -792,9 +792,9 @@ is non-nil, prompt the user to select one. If none are found, return
792 792
793 (setq prj-file (expand-file-name prj-file)) 793 (setq prj-file (expand-file-name prj-file))
794 (if (string= (file-name-extension prj-file) "gpr") 794 (if (string= (file-name-extension prj-file) "gpr")
795 (set 'project (ada-gnat-parse-gpr project prj-file)) 795 (setq project (ada-gnat-parse-gpr project prj-file))
796 796
797 (set 'project (ada-parse-prj-file-1 prj-file project)) 797 (setq project (ada-parse-prj-file-1 prj-file project))
798 ) 798 )
799 799
800 ;; Store the project properties 800 ;; Store the project properties
@@ -842,7 +842,7 @@ Return new value of PROJECT."
842 (substitute-in-file-name (match-string 2))))) 842 (substitute-in-file-name (match-string 2)))))
843 843
844 ((string= (match-string 1) "build_dir") 844 ((string= (match-string 1) "build_dir")
845 (set 'project 845 (setq project
846 (plist-put project 'build_dir 846 (plist-put project 'build_dir
847 (file-name-as-directory (match-string 2))))) 847 (file-name-as-directory (match-string 2)))))
848 848
@@ -884,7 +884,7 @@ Return new value of PROJECT."
884 884
885 (t 885 (t
886 ;; any other field in the file is just copied 886 ;; any other field in the file is just copied
887 (set 'project (plist-put project 887 (setq project (plist-put project
888 (intern (match-string 1)) 888 (intern (match-string 1))
889 (match-string 2)))))) 889 (match-string 2))))))
890 890
@@ -900,21 +900,21 @@ Return new value of PROJECT."
900 (let ((sep (plist-get project 'ada_project_path_sep))) 900 (let ((sep (plist-get project 'ada_project_path_sep)))
901 (setq ada_project_path (reverse ada_project_path)) 901 (setq ada_project_path (reverse ada_project_path))
902 (setq ada_project_path (mapconcat 'identity ada_project_path sep)) 902 (setq ada_project_path (mapconcat 'identity ada_project_path sep))
903 (set 'project (plist-put project 'ada_project_path ada_project_path)) 903 (setq project (plist-put project 'ada_project_path ada_project_path))
904 ;; env var needed now for ada-gnat-parse-gpr 904 ;; env var needed now for ada-gnat-parse-gpr
905 (setenv "ADA_PROJECT_PATH" ada_project_path))) 905 (setenv "ADA_PROJECT_PATH" ada_project_path)))
906 906
907 (if debug_post_cmd (set 'project (plist-put project 'debug_post_cmd (reverse debug_post_cmd)))) 907 (if debug_post_cmd (setq project (plist-put project 'debug_post_cmd (reverse debug_post_cmd))))
908 (if debug_pre_cmd (set 'project (plist-put project 'debug_pre_cmd (reverse debug_pre_cmd)))) 908 (if debug_pre_cmd (setq project (plist-put project 'debug_pre_cmd (reverse debug_pre_cmd))))
909 (if casing (set 'project (plist-put project 'casing (reverse casing)))) 909 (if casing (setq project (plist-put project 'casing (reverse casing))))
910 (if check_cmd (set 'project (plist-put project 'check_cmd (reverse check_cmd)))) 910 (if check_cmd (setq project (plist-put project 'check_cmd (reverse check_cmd))))
911 (if comp_cmd (set 'project (plist-put project 'comp_cmd (reverse comp_cmd)))) 911 (if comp_cmd (setq project (plist-put project 'comp_cmd (reverse comp_cmd))))
912 (if make_cmd (set 'project (plist-put project 'make_cmd (reverse make_cmd)))) 912 (if make_cmd (setq project (plist-put project 'make_cmd (reverse make_cmd))))
913 (if run_cmd (set 'project (plist-put project 'run_cmd (reverse run_cmd)))) 913 (if run_cmd (setq project (plist-put project 'run_cmd (reverse run_cmd))))
914 914
915 (if gpr_file 915 (if gpr_file
916 (progn 916 (progn
917 (set 'project (ada-gnat-parse-gpr project gpr_file)) 917 (setq project (ada-gnat-parse-gpr project gpr_file))
918 ;; append Ada source and object directories to others from Emacs project file 918 ;; append Ada source and object directories to others from Emacs project file
919 (setq src_dir (append (plist-get project 'src_dir) src_dir)) 919 (setq src_dir (append (plist-get project 'src_dir) src_dir))
920 (setq obj_dir (append (plist-get project 'obj_dir) obj_dir)) 920 (setq obj_dir (append (plist-get project 'obj_dir) obj_dir))
@@ -930,8 +930,8 @@ Return new value of PROJECT."
930 (ada-initialize-runtime-library (or (ada-xref-get-project-field 'cross_prefix) "")) 930 (ada-initialize-runtime-library (or (ada-xref-get-project-field 'cross_prefix) ""))
931 ;;) 931 ;;)
932 932
933 (if obj_dir (set 'project (plist-put project 'obj_dir (reverse obj_dir)))) 933 (if obj_dir (setq project (plist-put project 'obj_dir (reverse obj_dir))))
934 (if src_dir (set 'project (plist-put project 'src_dir (reverse src_dir)))) 934 (if src_dir (setq project (plist-put project 'src_dir (reverse src_dir))))
935 935
936 project 936 project
937 )) 937 ))
@@ -1052,9 +1052,9 @@ existing buffer `*gnatfind*', if there is one."
1052 (if old-contents 1052 (if old-contents
1053 (progn 1053 (progn
1054 (goto-char 1) 1054 (goto-char 1)
1055 (set 'buffer-read-only nil) 1055 (setq buffer-read-only nil)
1056 (insert old-contents) 1056 (insert old-contents)
1057 (set 'buffer-read-only t) 1057 (setq buffer-read-only t)
1058 (goto-char (point-max))))) 1058 (goto-char (point-max)))))
1059 ) 1059 )
1060 ) 1060 )
@@ -1194,9 +1194,9 @@ project file."
1194 (objects (getenv "ADA_OBJECTS_PATH")) 1194 (objects (getenv "ADA_OBJECTS_PATH"))
1195 (build-dir (ada-xref-get-project-field 'build_dir))) 1195 (build-dir (ada-xref-get-project-field 'build_dir)))
1196 (if include 1196 (if include
1197 (set 'include (concat path-separator include))) 1197 (setq include (concat path-separator include)))
1198 (if objects 1198 (if objects
1199 (set 'objects (concat path-separator objects))) 1199 (setq objects (concat path-separator objects)))
1200 (cons 1200 (cons
1201 (concat "ADA_INCLUDE_PATH=" 1201 (concat "ADA_INCLUDE_PATH="
1202 (mapconcat (lambda(x) (expand-file-name x build-dir)) 1202 (mapconcat (lambda(x) (expand-file-name x build-dir))
@@ -1303,7 +1303,7 @@ If ARG is non-nil, ask for user confirmation."
1303 1303
1304 ;; Guess the command if it wasn't specified 1304 ;; Guess the command if it wasn't specified
1305 (if (not command) 1305 (if (not command)
1306 (set 'command (list (file-name-sans-extension (buffer-name))))) 1306 (setq command (list (file-name-sans-extension (buffer-name)))))
1307 1307
1308 ;; Modify the command to run remotely 1308 ;; Modify the command to run remotely
1309 (setq command (ada-remote (mapconcat 'identity command 1309 (setq command (ada-remote (mapconcat 'identity command
@@ -1316,7 +1316,7 @@ If ARG is non-nil, ask for user confirmation."
1316 1316
1317 ;; Run the command 1317 ;; Run the command
1318 (with-current-buffer (get-buffer-create "*run*") 1318 (with-current-buffer (get-buffer-create "*run*")
1319 (set 'buffer-read-only nil) 1319 (setq buffer-read-only nil)
1320 1320
1321 (erase-buffer) 1321 (erase-buffer)
1322 (start-process "run" (current-buffer) shell-file-name 1322 (start-process "run" (current-buffer) shell-file-name
@@ -1352,7 +1352,7 @@ project file."
1352 1352
1353 ;; If the command was not given in the project file, start a bare gdb 1353 ;; If the command was not given in the project file, start a bare gdb
1354 (if (not cmd) 1354 (if (not cmd)
1355 (set 'cmd (concat ada-prj-default-debugger 1355 (setq cmd (concat ada-prj-default-debugger
1356 " " 1356 " "
1357 (or executable-name 1357 (or executable-name
1358 (file-name-sans-extension (buffer-file-name)))))) 1358 (file-name-sans-extension (buffer-file-name))))))
@@ -1368,18 +1368,18 @@ project file."
1368 ;; chance to fully manage it. Then it works fine with Enlightenment 1368 ;; chance to fully manage it. Then it works fine with Enlightenment
1369 ;; as well 1369 ;; as well
1370 (let ((frame (make-frame '((visibility . nil))))) 1370 (let ((frame (make-frame '((visibility . nil)))))
1371 (set 'cmd (concat 1371 (setq cmd (concat
1372 cmd " --editor-window=" 1372 cmd " --editor-window="
1373 (cdr (assoc 'outer-window-id (frame-parameters frame))))) 1373 (cdr (assoc 'outer-window-id (frame-parameters frame)))))
1374 (select-frame frame))) 1374 (select-frame frame)))
1375 1375
1376 ;; Add a -fullname switch 1376 ;; Add a -fullname switch
1377 ;; Use the remote machine 1377 ;; Use the remote machine
1378 (set 'cmd (ada-remote (concat cmd " -fullname "))) 1378 (setq cmd (ada-remote (concat cmd " -fullname ")))
1379 1379
1380 ;; Ask for confirmation if required 1380 ;; Ask for confirmation if required
1381 (if (or arg ada-xref-confirm-compile) 1381 (if (or arg ada-xref-confirm-compile)
1382 (set 'cmd (read-from-minibuffer "enter command to debug: " cmd))) 1382 (setq cmd (read-from-minibuffer "enter command to debug: " cmd)))
1383 1383
1384 (let ((old-comint-exec (symbol-function 'comint-exec))) 1384 (let ((old-comint-exec (symbol-function 'comint-exec)))
1385 1385
@@ -1387,13 +1387,13 @@ project file."
1387 ;; FIXME: This is evil but luckily a nop under Emacs-21.3.50 ! -stef 1387 ;; FIXME: This is evil but luckily a nop under Emacs-21.3.50 ! -stef
1388 (fset 'gud-gdb-massage-args (lambda (_file args) args)) 1388 (fset 'gud-gdb-massage-args (lambda (_file args) args))
1389 1389
1390 (set 'pre-cmd (mapconcat 'identity pre-cmd ada-command-separator)) 1390 (setq pre-cmd (mapconcat 'identity pre-cmd ada-command-separator))
1391 (if (not (equal pre-cmd "")) 1391 (if (not (equal pre-cmd ""))
1392 (setq pre-cmd (concat pre-cmd ada-command-separator))) 1392 (setq pre-cmd (concat pre-cmd ada-command-separator)))
1393 1393
1394 (set 'post-cmd (mapconcat 'identity post-cmd "\n")) 1394 (setq post-cmd (mapconcat 'identity post-cmd "\n"))
1395 (if post-cmd 1395 (if post-cmd
1396 (set 'post-cmd (concat post-cmd "\n"))) 1396 (setq post-cmd (concat post-cmd "\n")))
1397 1397
1398 1398
1399 ;; Temporarily replaces the definition of `comint-exec' so that we 1399 ;; Temporarily replaces the definition of `comint-exec' so that we
@@ -1403,7 +1403,7 @@ project file."
1403 `(lambda (buffer name command startfile switches) 1403 `(lambda (buffer name command startfile switches)
1404 (let (compilation-buffer-name-function) 1404 (let (compilation-buffer-name-function)
1405 (save-excursion 1405 (save-excursion
1406 (set 'compilation-buffer-name-function 1406 (setq compilation-buffer-name-function
1407 (lambda(x) (buffer-name buffer))) 1407 (lambda(x) (buffer-name buffer)))
1408 (compile (ada-quote-cmd 1408 (compile (ada-quote-cmd
1409 (concat ,pre-cmd 1409 (concat ,pre-cmd
@@ -1498,12 +1498,12 @@ by replacing the file extension with `.ali'."
1498 "Search for FILE in DIR-LIST." 1498 "Search for FILE in DIR-LIST."
1499 (let (found) 1499 (let (found)
1500 (while (and (not found) dir-list) 1500 (while (and (not found) dir-list)
1501 (set 'found (concat (file-name-as-directory (car dir-list)) 1501 (setq found (concat (file-name-as-directory (car dir-list))
1502 (file-name-nondirectory file))) 1502 (file-name-nondirectory file)))
1503 1503
1504 (unless (file-exists-p found) 1504 (unless (file-exists-p found)
1505 (set 'found nil)) 1505 (setq found nil))
1506 (set 'dir-list (cdr dir-list))) 1506 (setq dir-list (cdr dir-list)))
1507 found)) 1507 found))
1508 1508
1509(defun ada-find-ali-file-in-dir (file) 1509(defun ada-find-ali-file-in-dir (file)
@@ -1558,11 +1558,11 @@ the project file."
1558 (while specs 1558 (while specs
1559 (if (string-match (concat (regexp-quote (car specs)) "$") 1559 (if (string-match (concat (regexp-quote (car specs)) "$")
1560 file) 1560 file)
1561 (set 'is-spec t)) 1561 (setq is-spec t))
1562 (set 'specs (cdr specs))))) 1562 (setq specs (cdr specs)))))
1563 1563
1564 (if is-spec 1564 (if is-spec
1565 (set 'ali-file-name 1565 (setq ali-file-name
1566 (ada-find-ali-file-in-dir 1566 (ada-find-ali-file-in-dir
1567 (concat (file-name-base (ada-other-file-name)) ".ali")))) 1567 (concat (file-name-base (ada-other-file-name)) ".ali"))))
1568 1568
@@ -1589,8 +1589,8 @@ the project file."
1589 (while (and (not ali-file-name) 1589 (while (and (not ali-file-name)
1590 (string-match "^\\(.*\\)[.-][^.-]*" parent-name)) 1590 (string-match "^\\(.*\\)[.-][^.-]*" parent-name))
1591 1591
1592 (set 'parent-name (match-string 1 parent-name)) 1592 (setq parent-name (match-string 1 parent-name))
1593 (set 'ali-file-name (ada-find-ali-file-in-dir 1593 (setq ali-file-name (ada-find-ali-file-in-dir
1594 (concat parent-name ".ali"))) 1594 (concat parent-name ".ali")))
1595 ) 1595 )
1596 ali-file-name))) 1596 ali-file-name)))
@@ -1686,18 +1686,18 @@ macros `ada-name-of', `ada-line-of', `ada-column-of', `ada-file-of',..."
1686 (if (and (= (char-before) ?\") 1686 (if (and (= (char-before) ?\")
1687 (= (char-after (+ (length (match-string 0)) (point))) ?\")) 1687 (= (char-after (+ (length (match-string 0)) (point))) ?\"))
1688 (forward-char -1)) 1688 (forward-char -1))
1689 (set 'identifier (regexp-quote (concat "\"" (match-string 0) "\"")))) 1689 (setq identifier (regexp-quote (concat "\"" (match-string 0) "\""))))
1690 1690
1691 (if (ada-in-string-p) 1691 (if (ada-in-string-p)
1692 (error "Inside string or character constant")) 1692 (error "Inside string or character constant"))
1693 (if (looking-at (concat ada-keywords "[^a-zA-Z_]")) 1693 (if (looking-at (concat ada-keywords "[^a-zA-Z_]"))
1694 (error "No cross-reference available for reserved keyword")) 1694 (error "No cross-reference available for reserved keyword"))
1695 (if (looking-at "[a-zA-Z0-9_]+") 1695 (if (looking-at "[a-zA-Z0-9_]+")
1696 (set 'identifier (match-string 0)) 1696 (setq identifier (match-string 0))
1697 (error "No identifier around"))) 1697 (error "No identifier around")))
1698 1698
1699 ;; Build the identlist 1699 ;; Build the identlist
1700 (set 'identlist (ada-make-identlist)) 1700 (setq identlist (ada-make-identlist))
1701 (ada-set-name identlist (downcase identifier)) 1701 (ada-set-name identlist (downcase identifier))
1702 (ada-set-line identlist 1702 (ada-set-line identlist
1703 (number-to-string (count-lines 1 (point)))) 1703 (number-to-string (count-lines 1 (point))))
@@ -1725,7 +1725,7 @@ Information is extracted from the ali file."
1725 (concat "^X [0-9]+ " (file-name-nondirectory (ada-file-of identlist))) 1725 (concat "^X [0-9]+ " (file-name-nondirectory (ada-file-of identlist)))
1726 nil t) 1726 nil t)
1727 (let ((bound (save-excursion (re-search-forward "^X " nil t)))) 1727 (let ((bound (save-excursion (re-search-forward "^X " nil t))))
1728 (set 'declaration-found 1728 (setq declaration-found
1729 (re-search-forward 1729 (re-search-forward
1730 (concat "^" (ada-line-of identlist) 1730 (concat "^" (ada-line-of identlist)
1731 "." (ada-column-of identlist) 1731 "." (ada-column-of identlist)
@@ -1743,7 +1743,7 @@ Information is extracted from the ali file."
1743 ;; Since we already know the number of the file, search for a direct 1743 ;; Since we already know the number of the file, search for a direct
1744 ;; reference to it 1744 ;; reference to it
1745 (goto-char (point-min)) 1745 (goto-char (point-min))
1746 (set 'declaration-found t) 1746 (setq declaration-found t)
1747 (ada-set-ali-index 1747 (ada-set-ali-index
1748 identlist 1748 identlist
1749 (number-to-string (ada-find-file-number-in-ali 1749 (number-to-string (ada-find-file-number-in-ali
@@ -1771,7 +1771,7 @@ Information is extracted from the ali file."
1771 ;; If still not found, then either the declaration is unknown 1771 ;; If still not found, then either the declaration is unknown
1772 ;; or the source file has been modified since the ali file was 1772 ;; or the source file has been modified since the ali file was
1773 ;; created 1773 ;; created
1774 (set 'declaration-found nil) 1774 (setq declaration-found nil)
1775 ) 1775 )
1776 ) 1776 )
1777 1777
@@ -1786,7 +1786,7 @@ Information is extracted from the ali file."
1786 (beginning-of-line)) 1786 (beginning-of-line))
1787 (unless (looking-at (concat "[0-9]+.[0-9]+[ *]" 1787 (unless (looking-at (concat "[0-9]+.[0-9]+[ *]"
1788 (ada-name-of identlist) "[ <{=\(\[]")) 1788 (ada-name-of identlist) "[ <{=\(\[]"))
1789 (set 'declaration-found nil)))) 1789 (setq declaration-found nil))))
1790 1790
1791 ;; Still no success ! The ali file must be too old, and we need to 1791 ;; Still no success ! The ali file must be too old, and we need to
1792 ;; use a basic algorithm based on guesses. Note that this only happens 1792 ;; use a basic algorithm based on guesses. Note that this only happens
@@ -1794,7 +1794,7 @@ Information is extracted from the ali file."
1794 ;; automatically 1794 ;; automatically
1795 (unless declaration-found 1795 (unless declaration-found
1796 (if (ada-xref-find-in-modified-ali identlist) 1796 (if (ada-xref-find-in-modified-ali identlist)
1797 (set 'declaration-found t) 1797 (setq declaration-found t)
1798 ;; No more idea to find the declaration. Give up 1798 ;; No more idea to find the declaration. Give up
1799 (progn 1799 (progn
1800 (kill-buffer ali-buffer) 1800 (kill-buffer ali-buffer)
@@ -1814,7 +1814,7 @@ Information is extracted from the ali file."
1814 (forward-line 1) 1814 (forward-line 1)
1815 (beginning-of-line) 1815 (beginning-of-line)
1816 (while (looking-at "^\\.\\(.*\\)") 1816 (while (looking-at "^\\.\\(.*\\)")
1817 (set 'current-line (concat current-line (match-string 1))) 1817 (setq current-line (concat current-line (match-string 1)))
1818 (forward-line 1)) 1818 (forward-line 1))
1819 ) 1819 )
1820 1820
@@ -1860,7 +1860,7 @@ This function is disabled for operators, and only works for identifiers."
1860 (goto-char (point-max)) 1860 (goto-char (point-max))
1861 (while (re-search-backward my-regexp nil t) 1861 (while (re-search-backward my-regexp nil t)
1862 (save-excursion 1862 (save-excursion
1863 (set 'line-ali (count-lines 1 (point))) 1863 (setq line-ali (count-lines 1 (point)))
1864 (beginning-of-line) 1864 (beginning-of-line)
1865 ;; have a look at the line and column numbers 1865 ;; have a look at the line and column numbers
1866 (if (looking-at "^\\([0-9]+\\).\\([0-9]+\\)[ *]") 1866 (if (looking-at "^\\([0-9]+\\).\\([0-9]+\\)[ *]")
@@ -1948,7 +1948,7 @@ opens a new window to show the declaration."
1948 1948
1949 ;; Get all the possible locations 1949 ;; Get all the possible locations
1950 (string-match "^\\([0-9]+\\)[a-zA-Z+*]\\([0-9]+\\)[ *]" ali-line) 1950 (string-match "^\\([0-9]+\\)[a-zA-Z+*]\\([0-9]+\\)[ *]" ali-line)
1951 (set 'locations (list (list (match-string 1 ali-line) ;; line 1951 (setq locations (list (list (match-string 1 ali-line) ;; line
1952 (match-string 2 ali-line) ;; column 1952 (match-string 2 ali-line) ;; column
1953 (ada-declare-file-of identlist)))) 1953 (ada-declare-file-of identlist))))
1954 (while (string-match "\\([0-9]+\\)[bc]\\(<[^>]+>\\)?\\([0-9]+\\)" 1954 (while (string-match "\\([0-9]+\\)[bc]\\(<[^>]+>\\)?\\([0-9]+\\)"
@@ -1968,16 +1968,16 @@ opens a new window to show the declaration."
1968 (goto-char (point-min)) 1968 (goto-char (point-min))
1969 (re-search-forward "^D \\([a-zA-Z0-9_.-]+\\)" nil t 1969 (re-search-forward "^D \\([a-zA-Z0-9_.-]+\\)" nil t
1970 (string-to-number file-number)) 1970 (string-to-number file-number))
1971 (set 'file (match-string 1)) 1971 (setq file (match-string 1))
1972 ) 1972 )
1973 ;; Else get the nearest file 1973 ;; Else get the nearest file
1974 (set 'file (ada-declare-file-of identlist))) 1974 (setq file (ada-declare-file-of identlist)))
1975 1975
1976 (set 'locations (append locations (list (list line col file))))) 1976 (setq locations (append locations (list (list line col file)))))
1977 1977
1978 ;; Add the specs at the end again, so that from the last body we go to 1978 ;; Add the specs at the end again, so that from the last body we go to
1979 ;; the specs 1979 ;; the specs
1980 (set 'locations (append locations (list (car locations)))) 1980 (setq locations (append locations (list (car locations))))
1981 1981
1982 ;; Find the new location we want to go to. 1982 ;; Find the new location we want to go to.
1983 ;; If we are on none of the locations listed, we simply go to the specs. 1983 ;; If we are on none of the locations listed, we simply go to the specs.
@@ -1996,10 +1996,10 @@ opens a new window to show the declaration."
1996 col (nth 1 locations) 1996 col (nth 1 locations)
1997 file (nth 2 locations) 1997 file (nth 2 locations)
1998 locations nil) 1998 locations nil)
1999 (set 'locations (cdr locations)))) 1999 (setq locations (cdr locations))))
2000 2000
2001 ;; Find the file in the source path 2001 ;; Find the file in the source path
2002 (set 'file (ada-get-ada-file-name file (ada-file-of identlist))) 2002 (setq file (ada-get-ada-file-name file (ada-file-of identlist)))
2003 2003
2004 ;; Kill the .ali buffer 2004 ;; Kill the .ali buffer
2005 (kill-buffer (current-buffer)) 2005 (kill-buffer (current-buffer))
@@ -2044,10 +2044,10 @@ the declaration and documentation of the subprograms one is using."
2044 " " 2044 " "
2045 (shell-quote-argument (file-name-as-directory (car dirs))) 2045 (shell-quote-argument (file-name-as-directory (car dirs)))
2046 "*.ali"))) 2046 "*.ali")))
2047 (set 'dirs (cdr dirs))) 2047 (setq dirs (cdr dirs)))
2048 2048
2049 ;; Now parse the output 2049 ;; Now parse the output
2050 (set 'case-fold-search t) 2050 (setq case-fold-search t)
2051 (goto-char (point-min)) 2051 (goto-char (point-min))
2052 (while (re-search-forward regexp nil t) 2052 (while (re-search-forward regexp nil t)
2053 (save-excursion 2053 (save-excursion
@@ -2058,12 +2058,12 @@ the declaration and documentation of the subprograms one is using."
2058 (setq line (match-string 1) 2058 (setq line (match-string 1)
2059 column (match-string 2)) 2059 column (match-string 2))
2060 (re-search-backward "^X [0-9]+ \\(.*\\)$") 2060 (re-search-backward "^X [0-9]+ \\(.*\\)$")
2061 (set 'file (list (match-string 1) line column)) 2061 (setq file (list (match-string 1) line column))
2062 2062
2063 ;; There could be duplicate choices, because of the structure 2063 ;; There could be duplicate choices, because of the structure
2064 ;; of the .ali files 2064 ;; of the .ali files
2065 (unless (member file list) 2065 (unless (member file list)
2066 (set 'list (append list (list file)))))))) 2066 (setq list (append list (list file))))))))
2067 2067
2068 ;; Current buffer is still "*grep*" 2068 ;; Current buffer is still "*grep*"
2069 (kill-buffer "*grep*") 2069 (kill-buffer "*grep*")
@@ -2078,7 +2078,7 @@ the declaration and documentation of the subprograms one is using."
2078 2078
2079 ;; Only one choice => Do the cross-reference 2079 ;; Only one choice => Do the cross-reference
2080 ((= (length list) 1) 2080 ((= (length list) 1)
2081 (set 'file (ada-find-src-file-in-dir (caar list))) 2081 (setq file (ada-find-src-file-in-dir (caar list)))
2082 (if file 2082 (if file
2083 (ada-xref-change-buffer file 2083 (ada-xref-change-buffer file
2084 (string-to-number (nth 1 (car list))) 2084 (string-to-number (nth 1 (car list)))
@@ -2117,10 +2117,10 @@ the declaration and documentation of the subprograms one is using."
2117 (string-to-number 2117 (string-to-number
2118 (read-from-minibuffer "Enter No. of your choice: ")))) 2118 (read-from-minibuffer "Enter No. of your choice: "))))
2119 ) 2119 )
2120 (set 'choice (1- choice)) 2120 (setq choice (1- choice))
2121 (kill-buffer "*choice list*") 2121 (kill-buffer "*choice list*")
2122 2122
2123 (set 'file (ada-find-src-file-in-dir (car (nth choice list)))) 2123 (setq file (ada-find-src-file-in-dir (car (nth choice list))))
2124 (if file 2124 (if file
2125 (ada-xref-change-buffer file 2125 (ada-xref-change-buffer file
2126 (string-to-number (nth 1 (nth choice list))) 2126 (string-to-number (nth 1 (nth choice list)))
@@ -2144,7 +2144,7 @@ If OTHER-FRAME is non-nil, creates a new frame to show the file."
2144 (if ada-xref-other-buffer 2144 (if ada-xref-other-buffer
2145 (if other-frame 2145 (if other-frame
2146 (find-file-other-frame file) 2146 (find-file-other-frame file)
2147 (set 'declaration-buffer (find-file-noselect file)) 2147 (setq declaration-buffer (find-file-noselect file))
2148 (set-buffer declaration-buffer) 2148 (set-buffer declaration-buffer)
2149 (switch-to-buffer-other-window declaration-buffer) 2149 (switch-to-buffer-other-window declaration-buffer)
2150 ) 2150 )
diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el
index 56680f23a8e..bf90db54002 100644
--- a/lisp/progmodes/antlr-mode.el
+++ b/lisp/progmodes/antlr-mode.el
@@ -178,10 +178,6 @@
178 (set-buffer-modified-p nil))))))) 178 (set-buffer-modified-p nil)))))))
179(put 'save-buffer-state-x 'lisp-indent-function 0) 179(put 'save-buffer-state-x 'lisp-indent-function 0)
180 180
181;; get rid of byte-compile warnings
182(eval-when-compile
183 (require 'cc-mode))
184
185(defvar outline-level) 181(defvar outline-level)
186(defvar imenu-use-markers) 182(defvar imenu-use-markers)
187(defvar imenu-create-index-function) 183(defvar imenu-create-index-function)
diff --git a/lisp/progmodes/bat-mode.el b/lisp/progmodes/bat-mode.el
index 2b6f9d3434d..60b332170b0 100644
--- a/lisp/progmodes/bat-mode.el
+++ b/lisp/progmodes/bat-mode.el
@@ -120,6 +120,7 @@
120(defvar bat-mode-syntax-table 120(defvar bat-mode-syntax-table
121 (let ((table (make-syntax-table))) 121 (let ((table (make-syntax-table)))
122 (modify-syntax-entry ?\n ">" table) 122 (modify-syntax-entry ?\n ">" table)
123 (modify-syntax-entry ?\" "\"" table)
123 ;; Beware: `w' should not be used for non-alphabetic chars. 124 ;; Beware: `w' should not be used for non-alphabetic chars.
124 (modify-syntax-entry ?~ "_" table) 125 (modify-syntax-entry ?~ "_" table)
125 (modify-syntax-entry ?% "." table) 126 (modify-syntax-entry ?% "." table)
diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el
index b5216b43ed9..3ef9730ecdb 100644
--- a/lisp/progmodes/cc-awk.el
+++ b/lisp/progmodes/cc-awk.el
@@ -61,6 +61,7 @@
61(cc-bytecomp-defun c-backward-token-1) 61(cc-bytecomp-defun c-backward-token-1)
62(cc-bytecomp-defun c-beginning-of-statement-1) 62(cc-bytecomp-defun c-beginning-of-statement-1)
63(cc-bytecomp-defun c-backward-sws) 63(cc-bytecomp-defun c-backward-sws)
64(cc-bytecomp-defun c-forward-sws)
64 65
65(defvar awk-mode-syntax-table 66(defvar awk-mode-syntax-table
66 (let ((st (make-syntax-table))) 67 (let ((st (make-syntax-table)))
diff --git a/lisp/progmodes/cc-bytecomp.el b/lisp/progmodes/cc-bytecomp.el
index 337a5292417..c9835bbefe2 100644
--- a/lisp/progmodes/cc-bytecomp.el
+++ b/lisp/progmodes/cc-bytecomp.el
@@ -244,7 +244,9 @@ Having cyclic cc-require's will result in infinite recursion. That's
244somewhat intentional." 244somewhat intentional."
245 `(progn 245 `(progn
246 (eval-when-compile 246 (eval-when-compile
247 (setq cc-bytecomp-noruntime-functions byte-compile-noruntime-functions) 247 (if (boundp 'byte-compile-noruntime-functions) ; in case load uncompiled
248 (setq cc-bytecomp-noruntime-functions
249 byte-compile-noruntime-functions))
248 (cc-bytecomp-load (symbol-name ,cc-part))) 250 (cc-bytecomp-load (symbol-name ,cc-part)))
249 ;; Hack to suppress spurious "might not be defined at runtime" warnings. 251 ;; Hack to suppress spurious "might not be defined at runtime" warnings.
250 ;; The basic issue is that 252 ;; The basic issue is that
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index b9345b2ae6a..c8a9c461a9d 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -6479,6 +6479,15 @@ comment at the start of cc-engine.el for more info."
6479 (c-go-list-forward) 6479 (c-go-list-forward)
6480 t))) 6480 t)))
6481 6481
6482(defmacro c-pull-open-brace (ps)
6483 ;; Pull the next open brace from PS (which has the form of paren-state),
6484 ;; skipping over any brace pairs. Returns NIL when PS is exhausted.
6485 `(progn
6486 (while (consp (car ,ps))
6487 (setq ,ps (cdr ,ps)))
6488 (prog1 (car ,ps)
6489 (setq ,ps (cdr ,ps)))))
6490
6482(defun c-back-over-member-initializers () 6491(defun c-back-over-member-initializers ()
6483 ;; Test whether we are in a C++ member initializer list, and if so, go back 6492 ;; Test whether we are in a C++ member initializer list, and if so, go back
6484 ;; to the introducing ":", returning the position of the opening paren of 6493 ;; to the introducing ":", returning the position of the opening paren of
@@ -6896,32 +6905,38 @@ comment at the start of cc-engine.el for more info."
6896 6905
6897 ;; Skip over type decl prefix operators. (Note similar code in 6906 ;; Skip over type decl prefix operators. (Note similar code in
6898 ;; `c-font-lock-declarators'.) 6907 ;; `c-font-lock-declarators'.)
6899 (while (and (looking-at c-type-decl-prefix-key) 6908 (if (and c-recognize-typeless-decls
6900 (if (and (c-major-mode-is 'c++-mode) 6909 (equal c-type-decl-prefix-key "\\<\\>"))
6901 (match-beginning 3)) 6910 (when (eq (char-after) ?\()
6902 ;; If the third submatch matches in C++ then
6903 ;; we're looking at an identifier that's a
6904 ;; prefix only if it specifies a member pointer.
6905 (when (setq got-identifier (c-forward-name))
6906 (if (looking-at "\\(::\\)")
6907 ;; We only check for a trailing "::" and
6908 ;; let the "*" that should follow be
6909 ;; matched in the next round.
6910 (progn (setq got-identifier nil) t)
6911 ;; It turned out to be the real identifier,
6912 ;; so stop.
6913 nil))
6914 t))
6915
6916 (if (eq (char-after) ?\()
6917 (progn 6911 (progn
6918 (setq paren-depth (1+ paren-depth)) 6912 (setq paren-depth (1+ paren-depth))
6919 (forward-char)) 6913 (forward-char)))
6920 (unless got-prefix-before-parens 6914 (while (and (looking-at c-type-decl-prefix-key)
6921 (setq got-prefix-before-parens (= paren-depth 0))) 6915 (if (and (c-major-mode-is 'c++-mode)
6922 (setq got-prefix t) 6916 (match-beginning 3))
6923 (goto-char (match-end 1))) 6917 ;; If the third submatch matches in C++ then
6924 (c-forward-syntactic-ws)) 6918 ;; we're looking at an identifier that's a
6919 ;; prefix only if it specifies a member pointer.
6920 (when (setq got-identifier (c-forward-name))
6921 (if (looking-at "\\(::\\)")
6922 ;; We only check for a trailing "::" and
6923 ;; let the "*" that should follow be
6924 ;; matched in the next round.
6925 (progn (setq got-identifier nil) t)
6926 ;; It turned out to be the real identifier,
6927 ;; so stop.
6928 nil))
6929 t))
6930
6931 (if (eq (char-after) ?\()
6932 (progn
6933 (setq paren-depth (1+ paren-depth))
6934 (forward-char))
6935 (unless got-prefix-before-parens
6936 (setq got-prefix-before-parens (= paren-depth 0)))
6937 (setq got-prefix t)
6938 (goto-char (match-end 1)))
6939 (c-forward-syntactic-ws)))
6925 6940
6926 (setq got-parens (> paren-depth 0)) 6941 (setq got-parens (> paren-depth 0))
6927 6942
@@ -8403,15 +8418,6 @@ comment at the start of cc-engine.el for more info."
8403 (back-to-indentation) 8418 (back-to-indentation)
8404 (vector (point) open-paren-pos)))))) 8419 (vector (point) open-paren-pos))))))
8405 8420
8406(defmacro c-pull-open-brace (ps)
8407 ;; Pull the next open brace from PS (which has the form of paren-state),
8408 ;; skipping over any brace pairs. Returns NIL when PS is exhausted.
8409 `(progn
8410 (while (consp (car ,ps))
8411 (setq ,ps (cdr ,ps)))
8412 (prog1 (car ,ps)
8413 (setq ,ps (cdr ,ps)))))
8414
8415(defun c-most-enclosing-decl-block (paren-state) 8421(defun c-most-enclosing-decl-block (paren-state)
8416 ;; Return the buffer position of the most enclosing decl-block brace (in the 8422 ;; Return the buffer position of the most enclosing decl-block brace (in the
8417 ;; sense of c-looking-at-decl-block) in the PAREN-STATE structure, or nil if 8423 ;; sense of c-looking-at-decl-block) in the PAREN-STATE structure, or nil if
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 0116e9ec3dd..80e6189822b 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -2816,7 +2816,8 @@ is in effect when this is matched (see `c-identifier-syntax-table')."
2816 "\\>") 2816 "\\>")
2817 "") 2817 "")
2818 "\\)") 2818 "\\)")
2819 (java idl) "\\([\[\(]\\)") 2819 java "\\([\[\(\)]\\)"
2820 idl "\\([\[\(]\\)")
2820(c-lang-defvar c-type-decl-suffix-key (c-lang-const c-type-decl-suffix-key) 2821(c-lang-defvar c-type-decl-suffix-key (c-lang-const c-type-decl-suffix-key)
2821 'dont-doc) 2822 'dont-doc)
2822 2823
@@ -2937,7 +2938,7 @@ calls before a brace block. This setting does not affect declarations
2937that are preceded by a declaration starting keyword, so 2938that are preceded by a declaration starting keyword, so
2938e.g. `c-typeless-decl-kwds' may still be used when it's set to nil." 2939e.g. `c-typeless-decl-kwds' may still be used when it's set to nil."
2939 t nil 2940 t nil
2940 (c c++ objc) t) 2941 (c c++ objc java) t)
2941(c-lang-defvar c-recognize-typeless-decls 2942(c-lang-defvar c-recognize-typeless-decls
2942 (c-lang-const c-recognize-typeless-decls)) 2943 (c-lang-const c-recognize-typeless-decls))
2943 2944
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 74818b7e1ea..4c776290722 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -217,12 +217,16 @@ control). See \"cc-mode.el\" for more info."
217 (t (error "CC Mode is incompatible with this version of Emacs"))) 217 (t (error "CC Mode is incompatible with this version of Emacs")))
218 map)) 218 map))
219 219
220(defun c-define-abbrev-table (name defs) 220(defun c-define-abbrev-table (name defs &optional doc)
221 ;; Compatibility wrapper for `define-abbrev' which passes a non-nil 221 ;; Compatibility wrapper for `define-abbrev' which passes a non-nil
222 ;; sixth argument for SYSTEM-FLAG in emacsen that support it 222 ;; sixth argument for SYSTEM-FLAG in emacsen that support it
223 ;; (currently only Emacs >= 21.2). 223 ;; (currently only Emacs >= 21.2).
224 (let ((table (or (symbol-value name) 224 (let ((table (or (and (boundp name) (symbol-value name))
225 (progn (define-abbrev-table name nil) 225 (progn (condition-case nil
226 (define-abbrev-table name nil doc)
227 (wrong-number-of-arguments ;E.g. Emacs<23.
228 (eval `(defvar ,name nil ,doc))
229 (define-abbrev-table name nil)))
226 (symbol-value name))))) 230 (symbol-value name)))))
227 (while defs 231 (while defs
228 (condition-case nil 232 (condition-case nil
@@ -1241,27 +1245,22 @@ This function is called from `c-common-init', once per mode initialization."
1241 1245
1242;; Support for C 1246;; Support for C
1243 1247
1244;;;###autoload 1248(defvar c-mode-syntax-table
1245(defvar c-mode-syntax-table nil 1249 (funcall (c-lang-const c-make-mode-syntax-table c))
1246 "Syntax table used in c-mode buffers.") 1250 "Syntax table used in c-mode buffers.")
1247(or c-mode-syntax-table
1248 (setq c-mode-syntax-table
1249 (funcall (c-lang-const c-make-mode-syntax-table c))))
1250 1251
1251(defvar c-mode-abbrev-table nil
1252 "Abbreviation table used in c-mode buffers.")
1253(c-define-abbrev-table 'c-mode-abbrev-table 1252(c-define-abbrev-table 'c-mode-abbrev-table
1254 '(("else" "else" c-electric-continued-statement 0) 1253 '(("else" "else" c-electric-continued-statement 0)
1255 ("while" "while" c-electric-continued-statement 0))) 1254 ("while" "while" c-electric-continued-statement 0))
1255 "Abbreviation table used in c-mode buffers.")
1256 1256
1257(defvar c-mode-map () 1257(defvar c-mode-map
1258 (let ((map (c-make-inherited-keymap)))
1259 ;; Add bindings which are only useful for C.
1260 (define-key map "\C-c\C-e" 'c-macro-expand)
1261 map)
1258 "Keymap used in c-mode buffers.") 1262 "Keymap used in c-mode buffers.")
1259(if c-mode-map 1263
1260 nil
1261 (setq c-mode-map (c-make-inherited-keymap))
1262 ;; add bindings which are only useful for C
1263 (define-key c-mode-map "\C-c\C-e" 'c-macro-expand)
1264 )
1265 1264
1266(easy-menu-define c-c-menu c-mode-map "C Mode Commands" 1265(easy-menu-define c-c-menu c-mode-map "C Mode Commands"
1267 (cons "C" (c-lang-const c-mode-menu c))) 1266 (cons "C" (c-lang-const c-mode-menu c)))
@@ -1326,30 +1325,25 @@ Key bindings:
1326 1325
1327;; Support for C++ 1326;; Support for C++
1328 1327
1329;;;###autoload 1328(defvar c++-mode-syntax-table
1330(defvar c++-mode-syntax-table nil 1329 (funcall (c-lang-const c-make-mode-syntax-table c++))
1331 "Syntax table used in c++-mode buffers.") 1330 "Syntax table used in c++-mode buffers.")
1332(or c++-mode-syntax-table
1333 (setq c++-mode-syntax-table
1334 (funcall (c-lang-const c-make-mode-syntax-table c++))))
1335 1331
1336(defvar c++-mode-abbrev-table nil
1337 "Abbreviation table used in c++-mode buffers.")
1338(c-define-abbrev-table 'c++-mode-abbrev-table 1332(c-define-abbrev-table 'c++-mode-abbrev-table
1339 '(("else" "else" c-electric-continued-statement 0) 1333 '(("else" "else" c-electric-continued-statement 0)
1340 ("while" "while" c-electric-continued-statement 0) 1334 ("while" "while" c-electric-continued-statement 0)
1341 ("catch" "catch" c-electric-continued-statement 0))) 1335 ("catch" "catch" c-electric-continued-statement 0))
1336 "Abbreviation table used in c++-mode buffers.")
1342 1337
1343(defvar c++-mode-map () 1338(defvar c++-mode-map
1339 (let ((map (c-make-inherited-keymap)))
1340 ;; Add bindings which are only useful for C++.
1341 (define-key map "\C-c\C-e" 'c-macro-expand)
1342 (define-key map "\C-c:" 'c-scope-operator)
1343 (define-key map "<" 'c-electric-lt-gt)
1344 (define-key map ">" 'c-electric-lt-gt)
1345 map)
1344 "Keymap used in c++-mode buffers.") 1346 "Keymap used in c++-mode buffers.")
1345(if c++-mode-map
1346 nil
1347 (setq c++-mode-map (c-make-inherited-keymap))
1348 ;; add bindings which are only useful for C++
1349 (define-key c++-mode-map "\C-c\C-e" 'c-macro-expand)
1350 (define-key c++-mode-map "\C-c:" 'c-scope-operator)
1351 (define-key c++-mode-map "<" 'c-electric-lt-gt)
1352 (define-key c++-mode-map ">" 'c-electric-lt-gt))
1353 1347
1354(easy-menu-define c-c++-menu c++-mode-map "C++ Mode Commands" 1348(easy-menu-define c-c++-menu c++-mode-map "C++ Mode Commands"
1355 (cons "C++" (c-lang-const c-mode-menu c++))) 1349 (cons "C++" (c-lang-const c-mode-menu c++)))
@@ -1386,26 +1380,21 @@ Key bindings:
1386 1380
1387;; Support for Objective-C 1381;; Support for Objective-C
1388 1382
1389;;;###autoload 1383(defvar objc-mode-syntax-table
1390(defvar objc-mode-syntax-table nil 1384 (funcall (c-lang-const c-make-mode-syntax-table objc))
1391 "Syntax table used in objc-mode buffers.") 1385 "Syntax table used in objc-mode buffers.")
1392(or objc-mode-syntax-table
1393 (setq objc-mode-syntax-table
1394 (funcall (c-lang-const c-make-mode-syntax-table objc))))
1395 1386
1396(defvar objc-mode-abbrev-table nil
1397 "Abbreviation table used in objc-mode buffers.")
1398(c-define-abbrev-table 'objc-mode-abbrev-table 1387(c-define-abbrev-table 'objc-mode-abbrev-table
1399 '(("else" "else" c-electric-continued-statement 0) 1388 '(("else" "else" c-electric-continued-statement 0)
1400 ("while" "while" c-electric-continued-statement 0))) 1389 ("while" "while" c-electric-continued-statement 0))
1390 "Abbreviation table used in objc-mode buffers.")
1401 1391
1402(defvar objc-mode-map () 1392(defvar objc-mode-map
1393 (let ((map (c-make-inherited-keymap)))
1394 ;; Add bindings which are only useful for Objective-C.
1395 (define-key map "\C-c\C-e" 'c-macro-expand)
1396 map)
1403 "Keymap used in objc-mode buffers.") 1397 "Keymap used in objc-mode buffers.")
1404(if objc-mode-map
1405 nil
1406 (setq objc-mode-map (c-make-inherited-keymap))
1407 ;; add bindings which are only useful for Objective-C
1408 (define-key objc-mode-map "\C-c\C-e" 'c-macro-expand))
1409 1398
1410(easy-menu-define c-objc-menu objc-mode-map "ObjC Mode Commands" 1399(easy-menu-define c-objc-menu objc-mode-map "ObjC Mode Commands"
1411 (cons "ObjC" (c-lang-const c-mode-menu objc))) 1400 (cons "ObjC" (c-lang-const c-mode-menu objc)))
@@ -1444,28 +1433,22 @@ Key bindings:
1444 1433
1445;; Support for Java 1434;; Support for Java
1446 1435
1447;;;###autoload 1436(defvar java-mode-syntax-table
1448(defvar java-mode-syntax-table nil 1437 (funcall (c-lang-const c-make-mode-syntax-table java))
1449 "Syntax table used in java-mode buffers.") 1438 "Syntax table used in java-mode buffers.")
1450(or java-mode-syntax-table
1451 (setq java-mode-syntax-table
1452 (funcall (c-lang-const c-make-mode-syntax-table java))))
1453 1439
1454(defvar java-mode-abbrev-table nil
1455 "Abbreviation table used in java-mode buffers.")
1456(c-define-abbrev-table 'java-mode-abbrev-table 1440(c-define-abbrev-table 'java-mode-abbrev-table
1457 '(("else" "else" c-electric-continued-statement 0) 1441 '(("else" "else" c-electric-continued-statement 0)
1458 ("while" "while" c-electric-continued-statement 0) 1442 ("while" "while" c-electric-continued-statement 0)
1459 ("catch" "catch" c-electric-continued-statement 0) 1443 ("catch" "catch" c-electric-continued-statement 0)
1460 ("finally" "finally" c-electric-continued-statement 0))) 1444 ("finally" "finally" c-electric-continued-statement 0))
1445 "Abbreviation table used in java-mode buffers.")
1461 1446
1462(defvar java-mode-map () 1447(defvar java-mode-map
1448 (let ((map (c-make-inherited-keymap)))
1449 ;; Add bindings which are only useful for Java.
1450 map)
1463 "Keymap used in java-mode buffers.") 1451 "Keymap used in java-mode buffers.")
1464(if java-mode-map
1465 nil
1466 (setq java-mode-map (c-make-inherited-keymap))
1467 ;; add bindings which are only useful for Java
1468 )
1469 1452
1470;; Regexp trying to describe the beginning of a Java top-level 1453;; Regexp trying to describe the beginning of a Java top-level
1471;; definition. This is not used by CC Mode, nor is it maintained 1454;; definition. This is not used by CC Mode, nor is it maintained
@@ -1510,24 +1493,18 @@ Key bindings:
1510 1493
1511;; Support for CORBA's IDL language 1494;; Support for CORBA's IDL language
1512 1495
1513;;;###autoload 1496(defvar idl-mode-syntax-table
1514(defvar idl-mode-syntax-table nil 1497 (funcall (c-lang-const c-make-mode-syntax-table idl))
1515 "Syntax table used in idl-mode buffers.") 1498 "Syntax table used in idl-mode buffers.")
1516(or idl-mode-syntax-table
1517 (setq idl-mode-syntax-table
1518 (funcall (c-lang-const c-make-mode-syntax-table idl))))
1519 1499
1520(defvar idl-mode-abbrev-table nil 1500(c-define-abbrev-table 'idl-mode-abbrev-table nil
1521 "Abbreviation table used in idl-mode buffers.") 1501 "Abbreviation table used in idl-mode buffers.")
1522(c-define-abbrev-table 'idl-mode-abbrev-table nil)
1523 1502
1524(defvar idl-mode-map () 1503(defvar idl-mode-map
1504 (let ((map (c-make-inherited-keymap)))
1505 ;; Add bindings which are only useful for IDL.
1506 map)
1525 "Keymap used in idl-mode buffers.") 1507 "Keymap used in idl-mode buffers.")
1526(if idl-mode-map
1527 nil
1528 (setq idl-mode-map (c-make-inherited-keymap))
1529 ;; add bindings which are only useful for IDL
1530 )
1531 1508
1532(easy-menu-define c-idl-menu idl-mode-map "IDL Mode Commands" 1509(easy-menu-define c-idl-menu idl-mode-map "IDL Mode Commands"
1533 (cons "IDL" (c-lang-const c-mode-menu idl))) 1510 (cons "IDL" (c-lang-const c-mode-menu idl)))
@@ -1564,32 +1541,27 @@ Key bindings:
1564 1541
1565;; Support for Pike 1542;; Support for Pike
1566 1543
1567;;;###autoload 1544(defvar pike-mode-syntax-table
1568(defvar pike-mode-syntax-table nil 1545 (funcall (c-lang-const c-make-mode-syntax-table pike))
1569 "Syntax table used in pike-mode buffers.") 1546 "Syntax table used in pike-mode buffers.")
1570(or pike-mode-syntax-table
1571 (setq pike-mode-syntax-table
1572 (funcall (c-lang-const c-make-mode-syntax-table pike))))
1573 1547
1574(defvar pike-mode-abbrev-table nil
1575 "Abbreviation table used in pike-mode buffers.")
1576(c-define-abbrev-table 'pike-mode-abbrev-table 1548(c-define-abbrev-table 'pike-mode-abbrev-table
1577 '(("else" "else" c-electric-continued-statement 0) 1549 '(("else" "else" c-electric-continued-statement 0)
1578 ("while" "while" c-electric-continued-statement 0))) 1550 ("while" "while" c-electric-continued-statement 0))
1551 "Abbreviation table used in pike-mode buffers.")
1579 1552
1580(defvar pike-mode-map () 1553(defvar pike-mode-map
1554 (let ((map (c-make-inherited-keymap)))
1555 ;; Additional bindings.
1556 (define-key map "\C-c\C-e" 'c-macro-expand)
1557 map)
1581 "Keymap used in pike-mode buffers.") 1558 "Keymap used in pike-mode buffers.")
1582(if pike-mode-map
1583 nil
1584 (setq pike-mode-map (c-make-inherited-keymap))
1585 ;; additional bindings
1586 (define-key pike-mode-map "\C-c\C-e" 'c-macro-expand))
1587 1559
1588(easy-menu-define c-pike-menu pike-mode-map "Pike Mode Commands" 1560(easy-menu-define c-pike-menu pike-mode-map "Pike Mode Commands"
1589 (cons "Pike" (c-lang-const c-mode-menu pike))) 1561 (cons "Pike" (c-lang-const c-mode-menu pike)))
1590 1562
1591;;;###autoload (add-to-list 'auto-mode-alist '("\\.\\(u?lpc\\|pike\\|pmod\\(\\.in\\)?\\)\\'" . pike-mode)) 1563;;;###autoload (add-to-list 'auto-mode-alist '("\\.\\(u?lpc\\|pike\\|pmod\\(\\.in\\)?\\)\\'" . pike-mode))
1592;;;###autoload (add-to-list 'interpreter-mode-alist '("pike" . pike-mode)) 1564;;;###autoload (add-to-list 'interpreter-mode-alist '("\\`pike\\'" . pike-mode))
1593 1565
1594;;;###autoload 1566;;;###autoload
1595(define-derived-mode pike-mode prog-mode "Pike" 1567(define-derived-mode pike-mode prog-mode "Pike"
@@ -1623,37 +1595,28 @@ Key bindings:
1623;; Support for AWK 1595;; Support for AWK
1624 1596
1625;;;###autoload (add-to-list 'auto-mode-alist '("\\.awk\\'" . awk-mode)) 1597;;;###autoload (add-to-list 'auto-mode-alist '("\\.awk\\'" . awk-mode))
1626;;;###autoload (add-to-list 'interpreter-mode-alist '("awk" . awk-mode)) 1598;;;###autoload (add-to-list 'interpreter-mode-alist '("\\`[gmn]?awk\\'" . awk-mode))
1627;;;###autoload (add-to-list 'interpreter-mode-alist '("mawk" . awk-mode))
1628;;;###autoload (add-to-list 'interpreter-mode-alist '("nawk" . awk-mode))
1629;;;###autoload (add-to-list 'interpreter-mode-alist '("gawk" . awk-mode))
1630
1631;;; Autoload directives must be on the top level, so we construct an
1632;;; autoload form instead.
1633;;;###autoload (autoload 'awk-mode "cc-mode" "Major mode for editing AWK code." t)
1634 1599
1635(defvar awk-mode-abbrev-table nil
1636 "Abbreviation table used in awk-mode buffers.")
1637(c-define-abbrev-table 'awk-mode-abbrev-table 1600(c-define-abbrev-table 'awk-mode-abbrev-table
1638 '(("else" "else" c-electric-continued-statement 0) 1601 '(("else" "else" c-electric-continued-statement 0)
1639 ("while" "while" c-electric-continued-statement 0))) 1602 ("while" "while" c-electric-continued-statement 0))
1603 "Abbreviation table used in awk-mode buffers.")
1640 1604
1641(defvar awk-mode-map () 1605(defvar awk-mode-map
1606 (let ((map (c-make-inherited-keymap)))
1607 ;; Add bindings which are only useful for awk.
1608 (define-key map "#" 'self-insert-command)
1609 (define-key map "/" 'self-insert-command)
1610 (define-key map "*" 'self-insert-command)
1611 (define-key map "\C-c\C-n" 'undefined) ; #if doesn't exist in awk.
1612 (define-key map "\C-c\C-p" 'undefined)
1613 (define-key map "\C-c\C-u" 'undefined)
1614 (define-key map "\M-a" 'c-beginning-of-statement) ; 2003/10/7
1615 (define-key map "\M-e" 'c-end-of-statement) ; 2003/10/7
1616 (define-key map "\C-\M-a" 'c-awk-beginning-of-defun)
1617 (define-key map "\C-\M-e" 'c-awk-end-of-defun)
1618 map)
1642 "Keymap used in awk-mode buffers.") 1619 "Keymap used in awk-mode buffers.")
1643(if awk-mode-map
1644 nil
1645 (setq awk-mode-map (c-make-inherited-keymap))
1646 ;; add bindings which are only useful for awk.
1647 (define-key awk-mode-map "#" 'self-insert-command)
1648 (define-key awk-mode-map "/" 'self-insert-command)
1649 (define-key awk-mode-map "*" 'self-insert-command)
1650 (define-key awk-mode-map "\C-c\C-n" 'undefined) ; #if doesn't exist in awk.
1651 (define-key awk-mode-map "\C-c\C-p" 'undefined)
1652 (define-key awk-mode-map "\C-c\C-u" 'undefined)
1653 (define-key awk-mode-map "\M-a" 'c-beginning-of-statement) ; 2003/10/7
1654 (define-key awk-mode-map "\M-e" 'c-end-of-statement) ; 2003/10/7
1655 (define-key awk-mode-map "\C-\M-a" 'c-awk-beginning-of-defun)
1656 (define-key awk-mode-map "\C-\M-e" 'c-awk-end-of-defun))
1657 1620
1658(easy-menu-define c-awk-menu awk-mode-map "AWK Mode Commands" 1621(easy-menu-define c-awk-menu awk-mode-map "AWK Mode Commands"
1659 (cons "AWK" (c-lang-const c-mode-menu awk))) 1622 (cons "AWK" (c-lang-const c-mode-menu awk)))
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 770e78bb3b1..1eea6972707 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -412,15 +412,15 @@ Affects: `cperl-font-lock', `cperl-electric-lbrace-space',
412 "use cperl-vc-rcs-header or cperl-vc-sccs-header instead." 412 "use cperl-vc-rcs-header or cperl-vc-sccs-header instead."
413 "22.1") 413 "22.1")
414 414
415(defcustom cperl-clobber-mode-lists 415;;; (defcustom cperl-clobber-mode-lists
416 (not 416;;; (not
417 (and 417;;; (and
418 (boundp 'interpreter-mode-alist) 418;;; (boundp 'interpreter-mode-alist)
419 (assoc "miniperl" interpreter-mode-alist) 419;;; (assoc "miniperl" interpreter-mode-alist)
420 (assoc "\\.\\([pP][Llm]\\|al\\)$" auto-mode-alist))) 420;;; (assoc "\\.\\([pP][Llm]\\|al\\)$" auto-mode-alist)))
421 "*Whether to install us into `interpreter-' and `extension' mode lists." 421;;; "*Whether to install us into `interpreter-' and `extension' mode lists."
422 :type 'boolean 422;;; :type 'boolean
423 :group 'cperl) 423;;; :group 'cperl)
424 424
425(defcustom cperl-info-on-command-no-prompt nil 425(defcustom cperl-info-on-command-no-prompt nil
426 "*Not-nil (and non-null) means not to prompt on C-h f. 426 "*Not-nil (and non-null) means not to prompt on C-h f.
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 7004836e69f..5eecc347f03 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -52,12 +52,12 @@
52;; Extra functions `python-nav-forward-statement', 52;; Extra functions `python-nav-forward-statement',
53;; `python-nav-backward-statement', 53;; `python-nav-backward-statement',
54;; `python-nav-beginning-of-statement', `python-nav-end-of-statement', 54;; `python-nav-beginning-of-statement', `python-nav-end-of-statement',
55;; `python-nav-beginning-of-block' and `python-nav-end-of-block' are 55;; `python-nav-beginning-of-block', `python-nav-end-of-block' and
56;; included but no bound to any key. At last but not least the 56;; `python-nav-if-name-main' are included but no bound to any key. At
57;; specialized `python-nav-forward-sexp' allows easy navigation 57;; last but not least the specialized `python-nav-forward-sexp' allows
58;; between code blocks. If you prefer `cc-mode'-like `forward-sexp' 58;; easy navigation between code blocks. If you prefer `cc-mode'-like
59;; movement, setting `forward-sexp-function' to nil is enough, You can 59;; `forward-sexp' movement, setting `forward-sexp-function' to nil is
60;; do that using the `python-mode-hook': 60;; enough, You can do that using the `python-mode-hook':
61 61
62;; (add-hook 'python-mode-hook 62;; (add-hook 'python-mode-hook
63;; (lambda () (setq forward-sexp-function nil))) 63;; (lambda () (setq forward-sexp-function nil)))
@@ -225,7 +225,7 @@
225;;;###autoload 225;;;###autoload
226(add-to-list 'auto-mode-alist (cons (purecopy "\\.py\\'") 'python-mode)) 226(add-to-list 'auto-mode-alist (cons (purecopy "\\.py\\'") 'python-mode))
227;;;###autoload 227;;;###autoload
228(add-to-list 'interpreter-mode-alist (cons (purecopy "python") 'python-mode)) 228(add-to-list 'interpreter-mode-alist (cons (purecopy "\\`python[0-9.]*\\'") 'python-mode))
229 229
230(defgroup python nil 230(defgroup python nil
231 "Python Language's flying circus support for Emacs." 231 "Python Language's flying circus support for Emacs."
@@ -1327,9 +1327,7 @@ backward to previous statement."
1327(defun python-nav-beginning-of-block () 1327(defun python-nav-beginning-of-block ()
1328 "Move to start of current block." 1328 "Move to start of current block."
1329 (interactive "^") 1329 (interactive "^")
1330 (let ((starting-pos (point)) 1330 (let ((starting-pos (point)))
1331 (block-regexp (python-rx
1332 line-start (* whitespace) block-start)))
1333 (if (progn 1331 (if (progn
1334 (python-nav-beginning-of-statement) 1332 (python-nav-beginning-of-statement)
1335 (looking-at (python-rx block-start))) 1333 (looking-at (python-rx block-start)))
@@ -1422,9 +1420,6 @@ backwards."
1422 (let* ((forward-p (if (> dir 0) 1420 (let* ((forward-p (if (> dir 0)
1423 (and (setq dir 1) t) 1421 (and (setq dir 1) t)
1424 (and (setq dir -1) nil))) 1422 (and (setq dir -1) nil)))
1425 (re-search-fn (if forward-p
1426 're-search-forward
1427 're-search-backward))
1428 (context-type (python-syntax-context-type))) 1423 (context-type (python-syntax-context-type)))
1429 (cond 1424 (cond
1430 ((memq context-type '(string comment)) 1425 ((memq context-type '(string comment))
@@ -1583,6 +1578,29 @@ This command assumes point is not in a string or comment."
1583 (or arg (setq arg 1)) 1578 (or arg (setq arg 1))
1584 (python-nav-up-list (- arg))) 1579 (python-nav-up-list (- arg)))
1585 1580
1581(defun python-nav-if-name-main ()
1582 "Move point at the beginning the __main__ block.
1583When \"if __name__ == '__main__':\" is found returns its
1584position, else returns nil."
1585 (interactive)
1586 (let ((point (point))
1587 (found (catch 'found
1588 (goto-char (point-min))
1589 (while (re-search-forward
1590 (python-rx line-start
1591 "if" (+ space)
1592 "__name__" (+ space)
1593 "==" (+ space)
1594 (group-n 1 (or ?\" ?\'))
1595 "__main__" (backref 1) (* space) ":")
1596 nil t)
1597 (when (not (python-syntax-context-type))
1598 (beginning-of-line)
1599 (throw 'found t))))))
1600 (if found
1601 (point)
1602 (ignore (goto-char point)))))
1603
1586 1604
1587;;; Shell integration 1605;;; Shell integration
1588 1606
@@ -2114,17 +2132,58 @@ Returns the output. See `python-shell-send-string-no-output'."
2114(define-obsolete-function-alias 2132(define-obsolete-function-alias
2115 'python-send-string 'python-shell-internal-send-string "24.3") 2133 'python-send-string 'python-shell-internal-send-string "24.3")
2116 2134
2135(defun python-shell-buffer-substring (start end &optional nomain)
2136 "Send buffer substring from START to END formatted for shell.
2137This is a wrapper over `buffer-substring' that takes care of
2138different transformations for the code sent to be evaluated in
2139the python shell:
2140 1. When Optional Argument NOMAIN is non-nil everything under an
2141 \"if __name__ == '__main__'\" block will be removed.
2142 2. When a subregion of the buffer is sent, it takes care of
2143 appending extra empty lines so tracebacks are correct.
2144 3. Wraps indented regions under an \"if True:\" block so the
2145 interpreter evaluates them correctly."
2146 (let ((substring (buffer-substring-no-properties start end))
2147 (fillstr (make-string (1- (line-number-at-pos start)) ?\n))
2148 (toplevel-block-p (save-excursion
2149 (goto-char start)
2150 (or (zerop (line-number-at-pos start))
2151 (progn
2152 (python-util-forward-comment 1)
2153 (zerop (current-indentation)))))))
2154 (with-temp-buffer
2155 (python-mode)
2156 (insert fillstr)
2157 (insert substring)
2158 (goto-char (point-min))
2159 (when (not toplevel-block-p)
2160 (insert "if True:")
2161 (delete-region (point) (line-end-position)))
2162 (when nomain
2163 (let* ((if-name-main-start-end
2164 (and nomain
2165 (save-excursion
2166 (when (python-nav-if-name-main)
2167 (cons (point)
2168 (progn (python-nav-forward-sexp)
2169 (point)))))))
2170 ;; Oh destructuring bind, how I miss you.
2171 (if-name-main-start (car if-name-main-start-end))
2172 (if-name-main-end (cdr if-name-main-start-end)))
2173 (when if-name-main-start-end
2174 (goto-char if-name-main-start)
2175 (delete-region if-name-main-start if-name-main-end)
2176 (insert
2177 (make-string
2178 (- (line-number-at-pos if-name-main-end)
2179 (line-number-at-pos if-name-main-start)) ?\n)))))
2180 (buffer-substring-no-properties (point-min) (point-max)))))
2181
2117(defun python-shell-send-region (start end) 2182(defun python-shell-send-region (start end)
2118 "Send the region delimited by START and END to inferior Python process." 2183 "Send the region delimited by START and END to inferior Python process."
2119 (interactive "r") 2184 (interactive "r")
2120 (python-shell-send-string 2185 (python-shell-send-string
2121 (concat 2186 (python-shell-buffer-substring start end) nil t))
2122 (let ((line-num (line-number-at-pos start)))
2123 ;; When sending a region, add blank lines for non sent code so
2124 ;; backtraces remain correct.
2125 (make-string (1- line-num) ?\n))
2126 (buffer-substring start end))
2127 nil t))
2128 2187
2129(defun python-shell-send-buffer (&optional arg) 2188(defun python-shell-send-buffer (&optional arg)
2130 "Send the entire buffer to inferior Python process. 2189 "Send the entire buffer to inferior Python process.
@@ -2133,13 +2192,9 @@ by \"if __name__== '__main__':\""
2133 (interactive "P") 2192 (interactive "P")
2134 (save-restriction 2193 (save-restriction
2135 (widen) 2194 (widen)
2136 (let ((str (buffer-substring (point-min) (point-max)))) 2195 (python-shell-send-string
2137 (and 2196 (python-shell-buffer-substring
2138 (not arg) 2197 (point-min) (point-max) (not arg)))))
2139 (setq str (replace-regexp-in-string
2140 (python-rx if-name-main)
2141 "if __name__ == '__main__ ':" str)))
2142 (python-shell-send-string str))))
2143 2198
2144(defun python-shell-send-defun (arg) 2199(defun python-shell-send-defun (arg)
2145 "Send the current defun to inferior Python process. 2200 "Send the current defun to inferior Python process.
@@ -2266,13 +2321,17 @@ and use the following as the value of this variable:
2266LINE is used to detect the context on how to complete given 2321LINE is used to detect the context on how to complete given
2267INPUT." 2322INPUT."
2268 (let* ((prompt 2323 (let* ((prompt
2269 ;; Get the last prompt for the inferior process 2324 ;; Get last prompt of the inferior process buffer (this
2270 ;; buffer. This is used for the completion code selection 2325 ;; intentionally avoids using `comint-last-prompt' because
2271 ;; heuristic. 2326 ;; of incompatibilities with Emacs 24.x).
2272 (with-current-buffer (process-buffer process) 2327 (with-current-buffer (process-buffer process)
2273 (buffer-substring-no-properties 2328 (save-excursion
2274 (overlay-start comint-last-prompt-overlay) 2329 (buffer-substring-no-properties
2275 (overlay-end comint-last-prompt-overlay)))) 2330 (- (point) (length line))
2331 (progn
2332 (re-search-backward "^")
2333 (python-util-forward-comment)
2334 (point))))))
2276 (completion-context 2335 (completion-context
2277 ;; Check whether a prompt matches a pdb string, an import 2336 ;; Check whether a prompt matches a pdb string, an import
2278 ;; statement or just the standard prompt and use the 2337 ;; statement or just the standard prompt and use the
@@ -2602,8 +2661,7 @@ JUSTIFY should be used (if applicable) as in `fill-paragraph'."
2602(defun python-fill-string (&optional justify) 2661(defun python-fill-string (&optional justify)
2603 "String fill function for `python-fill-paragraph'. 2662 "String fill function for `python-fill-paragraph'.
2604JUSTIFY should be used (if applicable) as in `fill-paragraph'." 2663JUSTIFY should be used (if applicable) as in `fill-paragraph'."
2605 (let* ((marker (point-marker)) 2664 (let* ((str-start-pos
2606 (str-start-pos
2607 (set-marker 2665 (set-marker
2608 (make-marker) 2666 (make-marker)
2609 (or (python-syntax-context 'string) 2667 (or (python-syntax-context 'string)
@@ -2669,7 +2727,7 @@ JUSTIFY should be used (if applicable) as in `fill-paragraph'."
2669 ;; Again indent only if a newline is added. 2727 ;; Again indent only if a newline is added.
2670 (indent-according-to-mode))))) t) 2728 (indent-according-to-mode))))) t)
2671 2729
2672(defun python-fill-decorator (&optional justify) 2730(defun python-fill-decorator (&optional _justify)
2673 "Decorator fill function for `python-fill-paragraph'. 2731 "Decorator fill function for `python-fill-paragraph'.
2674JUSTIFY should be used (if applicable) as in `fill-paragraph'." 2732JUSTIFY should be used (if applicable) as in `fill-paragraph'."
2675 t) 2733 t)
@@ -2831,8 +2889,7 @@ The skeleton will be bound to python-skeleton-NAME."
2831 2889
2832(defun python-skeleton-add-menu-items () 2890(defun python-skeleton-add-menu-items ()
2833 "Add menu items to Python->Skeletons menu." 2891 "Add menu items to Python->Skeletons menu."
2834 (let ((skeletons (sort python-skeleton-available 'string<)) 2892 (let ((skeletons (sort python-skeleton-available 'string<)))
2835 (items))
2836 (dolist (skeleton skeletons) 2893 (dolist (skeleton skeletons)
2837 (easy-menu-add-item 2894 (easy-menu-add-item
2838 nil '("Python" "Skeletons") 2895 nil '("Python" "Skeletons")
@@ -2920,7 +2977,7 @@ Runs COMMAND, a shell command, as if by `compile'. See
2920 (let ((process-environment (python-shell-calculate-process-environment)) 2977 (let ((process-environment (python-shell-calculate-process-environment))
2921 (exec-path (python-shell-calculate-exec-path))) 2978 (exec-path (python-shell-calculate-exec-path)))
2922 (compilation-start command nil 2979 (compilation-start command nil
2923 (lambda (mode-name) 2980 (lambda (_modename)
2924 (format python-check-buffer-name command))))) 2981 (format python-check-buffer-name command)))))
2925 2982
2926 2983
@@ -3031,7 +3088,7 @@ It must be a function with two arguments: TYPE and NAME.")
3031 "Return imenu label for parent node using TYPE and NAME." 3088 "Return imenu label for parent node using TYPE and NAME."
3032 (format "%s..." (python-imenu-format-item-label type name))) 3089 (format "%s..." (python-imenu-format-item-label type name)))
3033 3090
3034(defun python-imenu-format-parent-item-jump-label (type name) 3091(defun python-imenu-format-parent-item-jump-label (type _name)
3035 "Return imenu label for parent node jump using TYPE and NAME." 3092 "Return imenu label for parent node jump using TYPE and NAME."
3036 (if (string= type "class") 3093 (if (string= type "class")
3037 "*class definition*" 3094 "*class definition*"
@@ -3145,7 +3202,7 @@ To this:
3145 (cons name (cdar pos)) 3202 (cons name (cdar pos))
3146 (python-imenu-create-flat-index (cddr item) name)))))) 3203 (python-imenu-create-flat-index (cddr item) name))))))
3147 (or alist 3204 (or alist
3148 (let* ((fn (lambda (type name) name)) 3205 (let* ((fn (lambda (_type name) name))
3149 (python-imenu-format-item-label-function fn) 3206 (python-imenu-format-item-label-function fn)
3150 (python-imenu-format-parent-item-label-function fn) 3207 (python-imenu-format-parent-item-label-function fn)
3151 (python-imenu-format-parent-item-jump-label-function fn)) 3208 (python-imenu-format-parent-item-jump-label-function fn))
@@ -3550,7 +3607,7 @@ if that value is non-nil."
3550 3607
3551 (add-to-list 'hs-special-modes-alist 3608 (add-to-list 'hs-special-modes-alist
3552 `(python-mode "^\\s-*\\(?:def\\|class\\)\\>" nil "#" 3609 `(python-mode "^\\s-*\\(?:def\\|class\\)\\>" nil "#"
3553 ,(lambda (arg) 3610 ,(lambda (_arg)
3554 (python-nav-end-of-defun)) nil)) 3611 (python-nav-end-of-defun)) nil))
3555 3612
3556 (set (make-local-variable 'mode-require-final-newline) t) 3613 (set (make-local-variable 'mode-require-final-newline) t)
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index c8fae7ba1e6..9dc2c4fb6c9 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -137,6 +137,7 @@ This should only be called after matching against `ruby-here-doc-beg-re'."
137 137
138(defconst ruby-symbol-chars "a-zA-Z0-9_" 138(defconst ruby-symbol-chars "a-zA-Z0-9_"
139 "List of characters that symbol names may contain.") 139 "List of characters that symbol names may contain.")
140
140(defconst ruby-symbol-re (concat "[" ruby-symbol-chars "]") 141(defconst ruby-symbol-re (concat "[" ruby-symbol-chars "]")
141 "Regexp to match symbols.") 142 "Regexp to match symbols.")
142 143
@@ -254,11 +255,13 @@ Also ignores spaces after parenthesis when 'space."
254 ("for" for-body "end") 255 ("for" for-body "end")
255 ("[" expseq "]") 256 ("[" expseq "]")
256 ("{" hashvals "}") 257 ("{" hashvals "}")
258 ("{" insts "}")
257 ("while" insts "end") 259 ("while" insts "end")
258 ("until" insts "end") 260 ("until" insts "end")
259 ("unless" insts "end") 261 ("unless" insts "end")
260 ("if" if-body "end") 262 ("if" if-body "end")
261 ("case" cases "end")) 263 ("case" cases "end"))
264 (formal-params ("opening-|" exp "|"))
262 (for-body (for-head ";" insts)) 265 (for-body (for-head ";" insts))
263 (for-head (id "in" exp)) 266 (for-head (id "in" exp))
264 (cases (exp "then" insts) ;; FIXME: Ruby also allows (exp ":" insts). 267 (cases (exp "then" insts) ;; FIXME: Ruby also allows (exp ":" insts).
@@ -285,10 +288,20 @@ Also ignores spaces after parenthesis when 'space."
285 (save-excursion 288 (save-excursion
286 (skip-chars-backward " \t") 289 (skip-chars-backward " \t")
287 (not (or (bolp) 290 (not (or (bolp)
288 (memq (char-before) '(?\; ?- ?+ ?* ?/ ?:)) 291 (and (memq (char-before) '(?\; ?- ?+ ?* ?/ ?: ?.))
292 ;; Make sure it's not the end of a regexp.
293 (not (eq (car (syntax-after (1- (point)))) 7)))
289 (and (memq (char-before) '(?\? ?=)) 294 (and (memq (char-before) '(?\? ?=))
290 (not (memq (char-syntax (char-before (1- (point)))) 295 (let ((tok (ruby-smie--backward-token)))
291 '(?w ?_)))))))) 296 (or (equal tok "?")
297 (string-match "\\`\\s." tok))))))))
298
299(defun ruby-smie--opening-pipe-p ()
300 (save-excursion
301 (if (eq ?| (char-before)) (forward-char -1))
302 (skip-chars-backward " \t\n")
303 (or (eq ?\{ (char-before))
304 (looking-back "\\_<do" (- (point) 2)))))
292 305
293(defun ruby-smie--forward-token () 306(defun ruby-smie--forward-token ()
294 (skip-chars-forward " \t") 307 (skip-chars-forward " \t")
@@ -299,12 +312,16 @@ Also ignores spaces after parenthesis when 'space."
299 (if (eolp) (forward-char 1) (forward-comment 1)) 312 (if (eolp) (forward-char 1) (forward-comment 1))
300 ";") 313 ";")
301 (forward-comment (point-max)) 314 (forward-comment (point-max))
315 (if (looking-at ":\\s.+")
316 (progn (goto-char (match-end 0)) (match-string 0)) ;; bug#15208.
302 (let ((tok (smie-default-forward-token))) 317 (let ((tok (smie-default-forward-token)))
303 (cond 318 (cond
304 ((member tok '("unless" "if" "while" "until")) 319 ((member tok '("unless" "if" "while" "until"))
305 (if (save-excursion (forward-word -1) (ruby-smie--bosp)) 320 (if (save-excursion (forward-word -1) (ruby-smie--bosp))
306 tok "iuwu-mod")) 321 tok "iuwu-mod"))
307 (t tok))))) 322 ((equal tok "|")
323 (if (ruby-smie--opening-pipe-p) "opening-|" tok))
324 (t tok))))))
308 325
309(defun ruby-smie--backward-token () 326(defun ruby-smie--backward-token ()
310 (let ((pos (point))) 327 (let ((pos (point)))
@@ -314,10 +331,14 @@ Also ignores spaces after parenthesis when 'space."
314 (progn (skip-chars-forward " \t") 331 (progn (skip-chars-forward " \t")
315 ";") 332 ";")
316 (let ((tok (smie-default-backward-token))) 333 (let ((tok (smie-default-backward-token)))
334 (when (and (eq ?: (char-before)) (string-match "\\`\\s." tok))
335 (forward-char -1) (setq tok (concat ":" tok))) ;; bug#15208.
317 (cond 336 (cond
318 ((member tok '("unless" "if" "while" "until")) 337 ((member tok '("unless" "if" "while" "until"))
319 (if (ruby-smie--bosp) 338 (if (ruby-smie--bosp)
320 tok "iuwu-mod")) 339 tok "iuwu-mod"))
340 ((equal tok "|")
341 (if (ruby-smie--opening-pipe-p) "opening-|" tok))
321 (t tok)))))) 342 (t tok))))))
322 343
323(defun ruby-smie-rules (kind token) 344(defun ruby-smie-rules (kind token)
@@ -332,7 +353,19 @@ Also ignores spaces after parenthesis when 'space."
332 ;; For (invalid) code between switch and case. 353 ;; For (invalid) code between switch and case.
333 ;; (if (smie-parent-p "switch") 4) 354 ;; (if (smie-parent-p "switch") 4)
334 0)) 355 0))
335 (`(:before . ,(or `"else" `"then" `"elsif")) 0) 356 (`(:before . "do")
357 (when
358 (save-excursion
359 (forward-word 1) ;Skip "do"
360 (skip-chars-forward " \t")
361 (and (equal (save-excursion (ruby-smie--forward-token)) "opening-|")
362 (save-excursion (forward-sexp 1)
363 (skip-chars-forward " \t")
364 (or (eolp)
365 (looking-at comment-start-skip)))))
366 ;; `(column . ,(smie-indent-virtual))
367 (smie-rule-parent)))
368 (`(:before . ,(or `"else" `"then" `"elsif" `"rescue")) 0)
336 (`(:before . ,(or `"when")) 369 (`(:before . ,(or `"when"))
337 (if (not (smie-rule-sibling-p)) 0)) ;; ruby-indent-level 370 (if (not (smie-rule-sibling-p)) 0)) ;; ruby-indent-level
338 ;; Hack attack: Since newlines are separators, don't try to align args that 371 ;; Hack attack: Since newlines are separators, don't try to align args that
@@ -903,6 +936,10 @@ Can be one of `heredoc', `modifier', `expr-qstr', `expr-re'."
903 (not (looking-at "[a-z_]")))) 936 (not (looking-at "[a-z_]"))))
904 (and (looking-at ruby-operator-re) 937 (and (looking-at ruby-operator-re)
905 (not (ruby-special-char-p)) 938 (not (ruby-special-char-p))
939 (save-excursion
940 (forward-char -1)
941 (or (not (looking-at ruby-operator-re))
942 (not (eq (char-before) ?:))))
906 ;; Operator at the end of line. 943 ;; Operator at the end of line.
907 (let ((c (char-after (point)))) 944 (let ((c (char-after (point))))
908 (and 945 (and
@@ -1825,11 +1862,11 @@ See `font-lock-syntax-table'.")
1825 "using") 1862 "using")
1826 'symbols)) 1863 'symbols))
1827 1 'font-lock-builtin-face) 1864 1 'font-lock-builtin-face)
1828 ;; Perl-ish keywords
1829 "\\_<\\(?:BEGIN\\|END\\)\\_>\\|^__END__$"
1830 ;; here-doc beginnings 1865 ;; here-doc beginnings
1831 `(,ruby-here-doc-beg-re 0 (unless (ruby-singleton-class-p (match-beginning 0)) 1866 `(,ruby-here-doc-beg-re 0 (unless (ruby-singleton-class-p (match-beginning 0))
1832 'font-lock-string-face)) 1867 'font-lock-string-face))
1868 ;; Perl-ish keywords
1869 "\\_<\\(?:BEGIN\\|END\\)\\_>\\|^__END__$"
1833 ;; variables 1870 ;; variables
1834 `(,(concat ruby-font-lock-keyword-beg-re 1871 `(,(concat ruby-font-lock-keyword-beg-re
1835 "\\_<\\(nil\\|self\\|true\\|false\\)\\>") 1872 "\\_<\\(nil\\|self\\|true\\|false\\)\\>")
@@ -1931,8 +1968,7 @@ The variable `ruby-indent-level' controls the amount of indentation.
1931 "\\)\\'")) 'ruby-mode)) 1968 "\\)\\'")) 'ruby-mode))
1932 1969
1933;;;###autoload 1970;;;###autoload
1934(dolist (name (list "ruby" "rbx" "jruby" "ruby1.9" "ruby1.8")) 1971(add-to-list 'interpreter-mode-alist (cons (purecopy "\\`\\(rbx\\|j?ruby\\(1\\.[89]\\)?\\)\\'") 'ruby-mode))
1935 (add-to-list 'interpreter-mode-alist (cons (purecopy name) 'ruby-mode)))
1936 1972
1937(provide 'ruby-mode) 1973(provide 'ruby-mode)
1938 1974
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index c8b65e0a029..3ea2afb6fc3 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -1,7 +1,6 @@
1;;; sh-script.el --- shell-script editing commands for Emacs 1;;; sh-script.el --- shell-script editing commands for Emacs
2 2
3;; Copyright (C) 1993-1997, 1999, 2001-2013 Free Software Foundation, 3;; Copyright (C) 1993-1997, 1999, 2001-2013 Free Software Foundation, Inc.
4;; Inc.
5 4
6;; Author: Daniel Pfeiffer <occitan@esperanto.org> 5;; Author: Daniel Pfeiffer <occitan@esperanto.org>
7;; Version: 2.0f 6;; Version: 2.0f
@@ -673,7 +672,9 @@ removed when closing the here document."
673 "." "alias" "bg" "bind" "builtin" "caller" "compgen" "complete" 672 "." "alias" "bg" "bind" "builtin" "caller" "compgen" "complete"
674 "declare" "dirs" "disown" "enable" "fc" "fg" "help" "history" 673 "declare" "dirs" "disown" "enable" "fc" "fg" "help" "history"
675 "jobs" "kill" "let" "local" "popd" "printf" "pushd" "shopt" 674 "jobs" "kill" "let" "local" "popd" "printf" "pushd" "shopt"
676 "source" "suspend" "typeset" "unalias") 675 "source" "suspend" "typeset" "unalias"
676 ;; bash4
677 "mapfile" "readarray")
677 678
678 ;; The next entry is only used for defining the others 679 ;; The next entry is only used for defining the others
679 (bourne sh-append shell 680 (bourne sh-append shell
@@ -737,6 +738,7 @@ implemented as aliases. See `sh-feature'."
737 :type '(repeat (cons (symbol :tag "Shell") 738 :type '(repeat (cons (symbol :tag "Shell")
738 (choice (repeat string) 739 (choice (repeat string)
739 (sexp :format "Evaluate: %v")))) 740 (sexp :format "Evaluate: %v"))))
741 :version "24.4" ; bash4 additions
740 :group 'sh-script) 742 :group 'sh-script)
741 743
742 744
@@ -2168,11 +2170,18 @@ the visited file executable, and NO-QUERY-FLAG (the second argument)
2168controls whether to query about making the visited file executable. 2170controls whether to query about making the visited file executable.
2169 2171
2170Calls the value of `sh-set-shell-hook' if set." 2172Calls the value of `sh-set-shell-hook' if set."
2171 (interactive (list (completing-read (format "Shell \(default %s\): " 2173 (interactive (list (completing-read
2172 sh-shell-file) 2174 (format "Shell \(default %s\): "
2173 interpreter-mode-alist 2175 sh-shell-file)
2174 (lambda (x) (eq (cdr x) 'sh-mode)) 2176 ;; This used to use interpreter-mode-alist, but that is
2175 nil nil nil sh-shell-file) 2177 ;; no longer appropriate now that uses regexps.
2178 ;; Maybe there could be a separate variable that lists
2179 ;; the shells, used here and to construct i-mode-alist.
2180 ;; But the following is probably good enough:
2181 (append (mapcar (lambda (e) (symbol-name (car e)))
2182 sh-ancestor-alist)
2183 '("csh" "rc" "sh"))
2184 nil nil nil nil sh-shell-file)
2176 (eq executable-query 'function) 2185 (eq executable-query 'function)
2177 t)) 2186 t))
2178 (if (string-match "\\.exe\\'" shell) 2187 (if (string-match "\\.exe\\'" shell)
diff --git a/lisp/replace.el b/lisp/replace.el
index 5e44677b0f8..abb59a674e3 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -490,12 +490,13 @@ If `replace-lax-whitespace' is non-nil, a space or spaces in the string
490to be replaced will match a sequence of whitespace chars defined by the 490to be replaced will match a sequence of whitespace chars defined by the
491regexp in `search-whitespace-regexp'. 491regexp in `search-whitespace-regexp'.
492 492
493In Transient Mark mode, if the mark is active, operate on the contents
494of the region. Otherwise, operate from point to the end of the buffer.
495
496Third arg DELIMITED (prefix arg if interactive), if non-nil, means replace 493Third arg DELIMITED (prefix arg if interactive), if non-nil, means replace
497only matches surrounded by word boundaries. 494only matches surrounded by word boundaries.
498Fourth and fifth arg START and END specify the region to operate on. 495
496Operates on the region between START and END (if both are nil, from point
497to the end of the buffer). Interactively, if Transient Mark mode is
498enabled and the mark is active, operates on the contents of the region;
499otherwise from point to the end of the buffer.
499 500
500Use \\<minibuffer-local-map>\\[next-history-element] \ 501Use \\<minibuffer-local-map>\\[next-history-element] \
501to pull the last incremental search string to the minibuffer 502to pull the last incremental search string to the minibuffer
diff --git a/lisp/saveplace.el b/lisp/saveplace.el
index 2ddac6d6c43..e9dc12b00fe 100644
--- a/lisp/saveplace.el
+++ b/lisp/saveplace.el
@@ -255,8 +255,13 @@ may have changed\) back to `save-place-alist'."
255 (insert-file-contents file) 255 (insert-file-contents file)
256 (goto-char (point-min)) 256 (goto-char (point-min))
257 (setq save-place-alist 257 (setq save-place-alist
258 (car (read-from-string 258 ;; This is with-demoted-errors, but we want to
259 (buffer-substring (point-min) (point-max))))) 259 ;; mention save-place in any error message.
260 (condition-case err
261 (car (read-from-string
262 (buffer-substring (point-min) (point-max))))
263 (error (message "Error reading save-place-file: %S" err)
264 nil)))
260 265
261 ;; If there is a limit, and we're over it, then we'll 266 ;; If there is a limit, and we're over it, then we'll
262 ;; have to truncate the end of the list: 267 ;; have to truncate the end of the list:
diff --git a/lisp/simple.el b/lisp/simple.el
index 6825c41becc..593f36d1ee1 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1231,7 +1231,7 @@ is a string to insert in the minibuffer before reading.
1231Such arguments are used as in `read-from-minibuffer'.)" 1231Such arguments are used as in `read-from-minibuffer'.)"
1232 ;; Used for interactive spec `x'. 1232 ;; Used for interactive spec `x'.
1233 (read-from-minibuffer prompt initial-contents minibuffer-local-map 1233 (read-from-minibuffer prompt initial-contents minibuffer-local-map
1234 t minibuffer-history)) 1234 t 'minibuffer-history))
1235 1235
1236(defun eval-minibuffer (prompt &optional initial-contents) 1236(defun eval-minibuffer (prompt &optional initial-contents)
1237 "Return value of Lisp expression read using the minibuffer. 1237 "Return value of Lisp expression read using the minibuffer.
@@ -1404,11 +1404,25 @@ to get different commands to edit and resubmit."
1404 ;; add it to the history. 1404 ;; add it to the history.
1405 (or (equal newcmd (car command-history)) 1405 (or (equal newcmd (car command-history))
1406 (setq command-history (cons newcmd command-history))) 1406 (setq command-history (cons newcmd command-history)))
1407 (eval newcmd)) 1407 (unwind-protect
1408 (progn
1409 ;; Trick called-interactively-p into thinking that `newcmd' is
1410 ;; an interactive call (bug#14136).
1411 (add-hook 'called-interactively-p-functions
1412 #'repeat-complex-command--called-interactively-skip)
1413 (eval newcmd))
1414 (remove-hook 'called-interactively-p-functions
1415 #'repeat-complex-command--called-interactively-skip)))
1408 (if command-history 1416 (if command-history
1409 (error "Argument %d is beyond length of command history" arg) 1417 (error "Argument %d is beyond length of command history" arg)
1410 (error "There are no previous complex commands to repeat"))))) 1418 (error "There are no previous complex commands to repeat")))))
1411 1419
1420(defun repeat-complex-command--called-interactively-skip (i _frame1 frame2)
1421 (and (eq 'eval (cadr frame2))
1422 (eq 'repeat-complex-command
1423 (cadr (backtrace-frame i #'called-interactively-p)))
1424 1))
1425
1412(defvar extended-command-history nil) 1426(defvar extended-command-history nil)
1413 1427
1414(defun read-extended-command () 1428(defun read-extended-command ()
@@ -3166,12 +3180,18 @@ see other processes running on the system, use `list-system-processes'."
3166 nil) 3180 nil)
3167 3181
3168(defvar universal-argument-map 3182(defvar universal-argument-map
3169 (let ((map (make-sparse-keymap))) 3183 (let ((map (make-sparse-keymap))
3170 (define-key map [t] 'universal-argument-other-key) 3184 (universal-argument-minus
3171 (define-key map (vector meta-prefix-char t) 'universal-argument-other-key) 3185 ;; For backward compatibility, minus with no modifiers is an ordinary
3172 (define-key map [switch-frame] nil) 3186 ;; command if digits have already been entered.
3187 `(menu-item "" negative-argument
3188 :filter ,(lambda (cmd)
3189 (if (integerp prefix-arg) nil cmd)))))
3190 (define-key map [switch-frame]
3191 (lambda (e) (interactive "e")
3192 (handle-switch-frame e) (universal-argument--mode)))
3173 (define-key map [?\C-u] 'universal-argument-more) 3193 (define-key map [?\C-u] 'universal-argument-more)
3174 (define-key map [?-] 'universal-argument-minus) 3194 (define-key map [?-] universal-argument-minus)
3175 (define-key map [?0] 'digit-argument) 3195 (define-key map [?0] 'digit-argument)
3176 (define-key map [?1] 'digit-argument) 3196 (define-key map [?1] 'digit-argument)
3177 (define-key map [?2] 'digit-argument) 3197 (define-key map [?2] 'digit-argument)
@@ -3192,30 +3212,12 @@ see other processes running on the system, use `list-system-processes'."
3192 (define-key map [kp-7] 'digit-argument) 3212 (define-key map [kp-7] 'digit-argument)
3193 (define-key map [kp-8] 'digit-argument) 3213 (define-key map [kp-8] 'digit-argument)
3194 (define-key map [kp-9] 'digit-argument) 3214 (define-key map [kp-9] 'digit-argument)
3195 (define-key map [kp-subtract] 'universal-argument-minus) 3215 (define-key map [kp-subtract] universal-argument-minus)
3196 map) 3216 map)
3197 "Keymap used while processing \\[universal-argument].") 3217 "Keymap used while processing \\[universal-argument].")
3198 3218
3199(defvar universal-argument-num-events nil 3219(defun universal-argument--mode ()
3200 "Number of argument-specifying events read by `universal-argument'. 3220 (set-temporary-overlay-map universal-argument-map))
3201`universal-argument-other-key' uses this to discard those events
3202from (this-command-keys), and reread only the final command.")
3203
3204(defvar saved-overriding-map t
3205 "The saved value of `overriding-terminal-local-map'.
3206That variable gets restored to this value on exiting \"universal
3207argument mode\".")
3208
3209(defun save&set-overriding-map (map)
3210 "Set `overriding-terminal-local-map' to MAP."
3211 (when (eq saved-overriding-map t)
3212 (setq saved-overriding-map overriding-terminal-local-map)
3213 (setq overriding-terminal-local-map map)))
3214
3215(defun restore-overriding-map ()
3216 "Restore `overriding-terminal-local-map' to its saved value."
3217 (setq overriding-terminal-local-map saved-overriding-map)
3218 (setq saved-overriding-map t))
3219 3221
3220(defun universal-argument () 3222(defun universal-argument ()
3221 "Begin a numeric argument for the following command. 3223 "Begin a numeric argument for the following command.
@@ -3229,33 +3231,27 @@ which is different in effect from any particular numeric argument.
3229These commands include \\[set-mark-command] and \\[start-kbd-macro]." 3231These commands include \\[set-mark-command] and \\[start-kbd-macro]."
3230 (interactive) 3232 (interactive)
3231 (setq prefix-arg (list 4)) 3233 (setq prefix-arg (list 4))
3232 (setq universal-argument-num-events (length (this-command-keys))) 3234 (universal-argument--mode))
3233 (save&set-overriding-map universal-argument-map))
3234 3235
3235;; A subsequent C-u means to multiply the factor by 4 if we've typed
3236;; nothing but C-u's; otherwise it means to terminate the prefix arg.
3237(defun universal-argument-more (arg) 3236(defun universal-argument-more (arg)
3237 ;; A subsequent C-u means to multiply the factor by 4 if we've typed
3238 ;; nothing but C-u's; otherwise it means to terminate the prefix arg.
3238 (interactive "P") 3239 (interactive "P")
3239 (if (consp arg) 3240 (setq prefix-arg (if (consp arg)
3240 (setq prefix-arg (list (* 4 (car arg)))) 3241 (list (* 4 (car arg)))
3241 (if (eq arg '-) 3242 (if (eq arg '-)
3242 (setq prefix-arg (list -4)) 3243 (list -4)
3243 (setq prefix-arg arg) 3244 arg)))
3244 (restore-overriding-map))) 3245 (when (consp prefix-arg) (universal-argument--mode)))
3245 (setq universal-argument-num-events (length (this-command-keys))))
3246 3246
3247(defun negative-argument (arg) 3247(defun negative-argument (arg)
3248 "Begin a negative numeric argument for the next command. 3248 "Begin a negative numeric argument for the next command.
3249\\[universal-argument] following digits or minus sign ends the argument." 3249\\[universal-argument] following digits or minus sign ends the argument."
3250 (interactive "P") 3250 (interactive "P")
3251 (cond ((integerp arg) 3251 (setq prefix-arg (cond ((integerp arg) (- arg))
3252 (setq prefix-arg (- arg))) 3252 ((eq arg '-) nil)
3253 ((eq arg '-) 3253 (t '-)))
3254 (setq prefix-arg nil)) 3254 (universal-argument--mode))
3255 (t
3256 (setq prefix-arg '-)))
3257 (setq universal-argument-num-events (length (this-command-keys)))
3258 (save&set-overriding-map universal-argument-map))
3259 3255
3260(defun digit-argument (arg) 3256(defun digit-argument (arg)
3261 "Part of the numeric argument for the next command. 3257 "Part of the numeric argument for the next command.
@@ -3265,37 +3261,15 @@ These commands include \\[set-mark-command] and \\[start-kbd-macro]."
3265 last-command-event 3261 last-command-event
3266 (get last-command-event 'ascii-character))) 3262 (get last-command-event 'ascii-character)))
3267 (digit (- (logand char ?\177) ?0))) 3263 (digit (- (logand char ?\177) ?0)))
3268 (cond ((integerp arg) 3264 (setq prefix-arg (cond ((integerp arg)
3269 (setq prefix-arg (+ (* arg 10) 3265 (+ (* arg 10)
3270 (if (< arg 0) (- digit) digit)))) 3266 (if (< arg 0) (- digit) digit)))
3271 ((eq arg '-) 3267 ((eq arg '-)
3272 ;; Treat -0 as just -, so that -01 will work. 3268 ;; Treat -0 as just -, so that -01 will work.
3273 (setq prefix-arg (if (zerop digit) '- (- digit)))) 3269 (if (zerop digit) '- (- digit)))
3274 (t 3270 (t
3275 (setq prefix-arg digit)))) 3271 digit))))
3276 (setq universal-argument-num-events (length (this-command-keys))) 3272 (universal-argument--mode))
3277 (save&set-overriding-map universal-argument-map))
3278
3279;; For backward compatibility, minus with no modifiers is an ordinary
3280;; command if digits have already been entered.
3281(defun universal-argument-minus (arg)
3282 (interactive "P")
3283 (if (integerp arg)
3284 (universal-argument-other-key arg)
3285 (negative-argument arg)))
3286
3287;; Anything else terminates the argument and is left in the queue to be
3288;; executed as a command.
3289(defun universal-argument-other-key (arg)
3290 (interactive "P")
3291 (setq prefix-arg arg)
3292 (let* ((key (this-command-keys))
3293 (keylist (listify-key-sequence key)))
3294 (setq unread-command-events
3295 (append (nthcdr universal-argument-num-events keylist)
3296 unread-command-events)))
3297 (reset-this-command-lengths)
3298 (restore-overriding-map))
3299 3273
3300 3274
3301(defvar filter-buffer-substring-functions nil 3275(defvar filter-buffer-substring-functions nil
diff --git a/lisp/speedbar.el b/lisp/speedbar.el
index d9f59b3a665..52796755625 100644
--- a/lisp/speedbar.el
+++ b/lisp/speedbar.el
@@ -1007,9 +1007,9 @@ supported at a time.
1007 ;; with the selected frame. 1007 ;; with the selected frame.
1008 (list 'parent (selected-frame))) 1008 (list 'parent (selected-frame)))
1009 speedbar-frame-parameters) 1009 speedbar-frame-parameters)
1010 speedbar-before-delete-hook 1010 'speedbar-before-delete-hook
1011 speedbar-before-popup-hook 1011 'speedbar-before-popup-hook
1012 speedbar-after-create-hook) 1012 'speedbar-after-create-hook)
1013 ;; Start up the timer 1013 ;; Start up the timer
1014 (if (not speedbar-frame) 1014 (if (not speedbar-frame)
1015 (speedbar-set-timer nil) 1015 (speedbar-set-timer nil)
diff --git a/lisp/subr.el b/lisp/subr.el
index b8b0d5af3b8..de7c629b208 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -170,12 +170,16 @@ PLACE must be a generalized variable whose value is a list.
170If the value is nil, `pop' returns nil but does not actually 170If the value is nil, `pop' returns nil but does not actually
171change the list." 171change the list."
172 (declare (debug (gv-place))) 172 (declare (debug (gv-place)))
173 (list 'car 173 ;; We use `car-safe' here instead of `car' because the behavior is the same
174 (if (symbolp place) 174 ;; (if it's not a cons cell, the `cdr' would have signaled an error already),
175 ;; So we can use `pop' in the bootstrap before `gv' can be used. 175 ;; but `car-safe' is total, so the byte-compiler can safely remove it if the
176 (list 'prog1 place (list 'setq place (list 'cdr place))) 176 ;; result is not used.
177 (gv-letplace (getter setter) place 177 `(car-safe
178 `(prog1 ,getter ,(funcall setter `(cdr ,getter))))))) 178 ,(if (symbolp place)
179 ;; So we can use `pop' in the bootstrap before `gv' can be used.
180 (list 'prog1 place (list 'setq place (list 'cdr place)))
181 (gv-letplace (getter setter) place
182 `(prog1 ,getter ,(funcall setter `(cdr ,getter)))))))
179 183
180(defmacro when (cond &rest body) 184(defmacro when (cond &rest body)
181 "If COND yields non-nil, do BODY, else return nil. 185 "If COND yields non-nil, do BODY, else return nil.
@@ -3346,16 +3350,22 @@ even if this catches the signal."
3346(define-obsolete-function-alias 'condition-case-no-debug 3350(define-obsolete-function-alias 'condition-case-no-debug
3347 'condition-case-unless-debug "24.1") 3351 'condition-case-unless-debug "24.1")
3348 3352
3349(defmacro with-demoted-errors (&rest body) 3353(defmacro with-demoted-errors (format &rest body)
3350 "Run BODY and demote any errors to simple messages. 3354 "Run BODY and demote any errors to simple messages.
3351If `debug-on-error' is non-nil, run BODY without catching its errors. 3355If `debug-on-error' is non-nil, run BODY without catching its errors.
3352This is to be used around code which is not expected to signal an error 3356This is to be used around code which is not expected to signal an error
3353but which should be robust in the unexpected case that an error is signaled." 3357but which should be robust in the unexpected case that an error is signaled.
3354 (declare (debug t) (indent 0)) 3358For backward compatibility, if FORMAT is not a constant string, it
3355 (let ((err (make-symbol "err"))) 3359is assumed to be part of BODY, in which case the message format
3360used is \"Error: %S\"."
3361 (declare (debug t) (indent 1))
3362 (let ((err (make-symbol "err"))
3363 (format (if (and (stringp format) body) format
3364 (prog1 "Error: %S"
3365 (if format (push format body))))))
3356 `(condition-case-unless-debug ,err 3366 `(condition-case-unless-debug ,err
3357 (progn ,@body) 3367 ,(macroexp-progn body)
3358 (error (message "Error: %S" ,err) nil)))) 3368 (error (message ,format ,err) nil))))
3359 3369
3360(defmacro combine-after-change-calls (&rest body) 3370(defmacro combine-after-change-calls (&rest body)
3361 "Execute BODY, but don't call the after-change functions till the end. 3371 "Execute BODY, but don't call the after-change functions till the end.
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el
index 171f373317a..795c04e31e1 100644
--- a/lisp/textmodes/bibtex.el
+++ b/lisp/textmodes/bibtex.el
@@ -468,7 +468,7 @@ alternatives, starting from zero."
468 nil 468 nil
469 (("editor") ("editora") ("editorb") ("editorc") 469 (("editor") ("editora") ("editorb") ("editorc")
470 ("translator") ("annotator") ("commentator") 470 ("translator") ("annotator") ("commentator")
471 ("introduction") ("foreword") ("afterword") ("titleaddon") 471 ("introduction") ("foreword") ("afterword") ("subtitle") ("titleaddon")
472 ("maintitle") ("mainsubtitle") ("maintitleaddon") 472 ("maintitle") ("mainsubtitle") ("maintitleaddon")
473 ("language") ("origlanguage") ("volume") ("part") ("edition") ("volumes") 473 ("language") ("origlanguage") ("volume") ("part") ("edition") ("volumes")
474 ("series") ("number") ("note") ("publisher") ("location") ("isbn") 474 ("series") ("number") ("note") ("publisher") ("location") ("isbn")
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index cb19c018839..9c32604b4f4 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -263,6 +263,48 @@
263(defvar css-font-lock-defaults 263(defvar css-font-lock-defaults
264 '(css-font-lock-keywords nil t)) 264 '(css-font-lock-keywords nil t))
265 265
266(defcustom css-indent-offset 4
267 "Basic size of one indentation step."
268 :version "22.2"
269 :type 'integer)
270
271(require 'smie)
272
273(defconst css-smie-grammar
274 (smie-prec2->grammar
275 (smie-precs->prec2 '((assoc ";") (assoc ",") (left ":")))))
276
277(defun css-smie--forward-token ()
278 (cond
279 ((and (eq (char-before) ?\})
280 ;; FIXME: If the next char is not whitespace, what should we do?
281 (or (memq (char-after) '(?\s ?\t ?\n))
282 (looking-at comment-start-skip)))
283 (if (memq (char-after) '(?\s ?\t ?\n))
284 (forward-char 1) (forward-comment 1))
285 ";")
286 ((progn (forward-comment (point-max))
287 (looking-at "[;,:]"))
288 (forward-char 1) (match-string 0))
289 (t (smie-default-forward-token))))
290
291(defun css-smie--backward-token ()
292 (let ((pos (point)))
293 (forward-comment (- (point)))
294 (cond
295 ;; FIXME: If the next char is not whitespace, what should we do?
296 ((and (eq (char-before) ?\}) (> pos (point))) ";")
297 ((memq (char-before) '(?\; ?\, ?\:))
298 (forward-char -1) (string (char-after)))
299 (t (smie-default-backward-token)))))
300
301(defun css-smie-rules (kind token)
302 (pcase (cons kind token)
303 (`(:elem . basic) css-indent-offset)
304 (`(:elem . arg) 0)
305 (`(:before . "{") (if (smie-rule-hanging-p)
306 (smie-rule-parent 0)))))
307
266;;;###autoload 308;;;###autoload
267(define-derived-mode css-mode fundamental-mode "CSS" 309(define-derived-mode css-mode fundamental-mode "CSS"
268 "Major mode to edit Cascading Style Sheets." 310 "Major mode to edit Cascading Style Sheets."
@@ -271,11 +313,13 @@
271 (setq-local comment-start-skip "/\\*+[ \t]*") 313 (setq-local comment-start-skip "/\\*+[ \t]*")
272 (setq-local comment-end "*/") 314 (setq-local comment-end "*/")
273 (setq-local comment-end-skip "[ \t]*\\*+/") 315 (setq-local comment-end-skip "[ \t]*\\*+/")
274 (setq-local forward-sexp-function 'css-forward-sexp)
275 (setq-local parse-sexp-ignore-comments t) 316 (setq-local parse-sexp-ignore-comments t)
276 (setq-local indent-line-function 'css-indent-line) 317 (setq-local indent-line-function 'css-indent-line)
277 (setq-local fill-paragraph-function 'css-fill-paragraph) 318 (setq-local fill-paragraph-function 'css-fill-paragraph)
278 (setq-local add-log-current-defun-function #'css-current-defun-name) 319 (setq-local add-log-current-defun-function #'css-current-defun-name)
320 (smie-setup css-smie-grammar #'css-smie-rules
321 :forward-token #'css-smie--forward-token
322 :backward-token #'css-smie--backward-token)
279 (when css-electric-keys 323 (when css-electric-keys
280 (let ((fc (make-char-table 'auto-fill-chars))) 324 (let ((fc (make-char-table 'auto-fill-chars)))
281 (set-char-table-parent fc auto-fill-chars) 325 (set-char-table-parent fc auto-fill-chars)
@@ -355,132 +399,6 @@
355 ;; Don't use the default filling code. 399 ;; Don't use the default filling code.
356 t))))))) 400 t)))))))
357 401
358;;; Navigation and indentation.
359
360(defconst css-navigation-syntax-table
361 (let ((st (make-syntax-table css-mode-syntax-table)))
362 (map-char-table (lambda (c v)
363 ;; Turn punctuation (code = 1) into symbol (code = 1).
364 (if (eq (car-safe v) 1)
365 (set-char-table-range st c (cons 3 (cdr v)))))
366 st)
367 st))
368
369(defun css-backward-sexp (n)
370 (let ((forward-sexp-function nil))
371 (if (< n 0) (css-forward-sexp (- n))
372 (while (> n 0)
373 (setq n (1- n))
374 (forward-comment (- (point-max)))
375 (if (not (eq (char-before) ?\;))
376 (backward-sexp 1)
377 (while (progn (backward-sexp 1)
378 (save-excursion
379 (forward-comment (- (point-max)))
380 ;; FIXME: We should also skip punctuation.
381 (not (or (bobp) (memq (char-before) '(?\; ?\{))))))))))))
382
383(defun css-forward-sexp (n)
384 (let ((forward-sexp-function nil))
385 (if (< n 0) (css-backward-sexp (- n))
386 (while (> n 0)
387 (setq n (1- n))
388 (forward-comment (point-max))
389 (if (not (eq (char-after) ?\;))
390 (forward-sexp 1)
391 (while (progn (forward-sexp 1)
392 (save-excursion
393 (forward-comment (point-max))
394 ;; FIXME: We should also skip punctuation.
395 (not (memq (char-after) '(?\; ?\})))))))))))
396
397(defun css-indent-calculate-virtual ()
398 (if (or (save-excursion (skip-chars-backward " \t") (bolp))
399 (if (looking-at "\\s(")
400 (save-excursion
401 (forward-char 1) (skip-chars-forward " \t")
402 (not (or (eolp) (looking-at comment-start-skip))))))
403 (current-column)
404 (css-indent-calculate)))
405
406(defcustom css-indent-offset 4
407 "Basic size of one indentation step."
408 :version "22.2"
409 :type 'integer
410 :group 'css)
411
412(defun css-indent-calculate ()
413 (let ((ppss (syntax-ppss))
414 pos)
415 (with-syntax-table css-navigation-syntax-table
416 (save-excursion
417 (cond
418 ;; Inside a string.
419 ((nth 3 ppss) 'noindent)
420 ;; Inside a comment.
421 ((nth 4 ppss)
422 (setq pos (point))
423 (forward-line -1)
424 (skip-chars-forward " \t")
425 (if (>= (nth 8 ppss) (point))
426 (progn
427 (goto-char (nth 8 ppss))
428 (if (eq (char-after pos) ?*)
429 (forward-char 1)
430 (if (not (looking-at comment-start-skip))
431 (error "Internal css-mode error")
432 (goto-char (match-end 0))))
433 (current-column))
434 (if (and (eq (char-after pos) ?*) (eq (char-after) ?*))
435 (current-column)
436 ;; 'noindent
437 (current-column)
438 )))
439 ;; In normal code.
440 (t
441 (or
442 (when (looking-at "\\s)")
443 (forward-char 1)
444 (backward-sexp 1)
445 (css-indent-calculate-virtual))
446 (when (looking-at comment-start-skip)
447 (forward-comment (point-max))
448 (css-indent-calculate))
449 (when (save-excursion (forward-comment (- (point-max)))
450 (setq pos (point))
451 (eq (char-syntax (preceding-char)) ?\())
452 (goto-char (1- pos))
453 (if (not (looking-at "\\s([ \t]*"))
454 (error "Internal css-mode error")
455 (if (or (memq (char-after (match-end 0)) '(?\n nil))
456 (save-excursion (goto-char (match-end 0))
457 (looking-at comment-start-skip)))
458 (+ (css-indent-calculate-virtual) css-indent-offset)
459 (progn (goto-char (match-end 0)) (current-column)))))
460 (progn
461 (css-backward-sexp 1)
462 (if (looking-at "\\s(")
463 (css-indent-calculate)
464 (css-indent-calculate-virtual))))))))))
465
466
467(defun css-indent-line ()
468 "Indent current line according to CSS indentation rules."
469 (interactive)
470 (let* ((savep (point))
471 (forward-sexp-function nil)
472 (indent (condition-case nil
473 (save-excursion
474 (forward-line 0)
475 (skip-chars-forward " \t")
476 (if (>= (point) savep) (setq savep nil))
477 (css-indent-calculate))
478 (error nil))))
479 (if (not (numberp indent)) 'noindent
480 (if savep
481 (save-excursion (indent-line-to indent))
482 (indent-line-to indent)))))
483
484(defun css-current-defun-name () 402(defun css-current-defun-name ()
485 "Return the name of the CSS section at point, or nil." 403 "Return the name of the CSS section at point, or nil."
486 (save-excursion 404 (save-excursion
diff --git a/lisp/vc/ediff-diff.el b/lisp/vc/ediff-diff.el
index 3e64250d1a7..3f0ef3a7a61 100644
--- a/lisp/vc/ediff-diff.el
+++ b/lisp/vc/ediff-diff.el
@@ -211,7 +211,7 @@ one optional arguments, diff-number to refine.")
211;; ediff-setup-diff-regions is called via a funcall to 211;; ediff-setup-diff-regions is called via a funcall to
212;; ediff-setup-diff-regions-function, which can also have the value 212;; ediff-setup-diff-regions-function, which can also have the value
213;; ediff-setup-diff-regions3, which takes 4 arguments. 213;; ediff-setup-diff-regions3, which takes 4 arguments.
214(defun ediff-setup-diff-regions (file-A file-B file-C) 214(defun ediff-setup-diff-regions (file-A file-B _file-C)
215 ;; looking for '-c', '-i', '-u', or 'c', 'i', 'u' among clustered non-long options 215 ;; looking for '-c', '-i', '-u', or 'c', 'i', 'u' among clustered non-long options
216 (if (string-match "^-[ciu]\\| -[ciu]\\|\\(^\\| \\)-[^- ]+[ciu]" 216 (if (string-match "^-[ciu]\\| -[ciu]\\|\\(^\\| \\)-[^- ]+[ciu]"
217 ediff-diff-options) 217 ediff-diff-options)
@@ -1223,7 +1223,7 @@ delimiter regions"))
1223;; like shell-command-sentinel but doesn't print an exit status message 1223;; like shell-command-sentinel but doesn't print an exit status message
1224;; we do this because diff always exits with status 1, if diffs are found 1224;; we do this because diff always exits with status 1, if diffs are found
1225;; so shell-command-sentinel displays a confusing message to the user 1225;; so shell-command-sentinel displays a confusing message to the user
1226(defun ediff-process-sentinel (process signal) 1226(defun ediff-process-sentinel (process _signal)
1227 (if (and (memq (process-status process) '(exit signal)) 1227 (if (and (memq (process-status process) '(exit signal))
1228 (buffer-name (process-buffer process))) 1228 (buffer-name (process-buffer process)))
1229 (progn 1229 (progn
diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el
index 075775923a5..c9f3583a437 100644
--- a/lisp/vc/ediff-init.el
+++ b/lisp/vc/ediff-init.el
@@ -810,7 +810,7 @@ TYPE-OF-EMACS is either 'xemacs or 'emacs."
810 (ediff-overlay-put extent 'face face) 810 (ediff-overlay-put extent 'face face)
811 (ediff-overlay-put extent 'help-echo 'ediff-region-help-echo)) 811 (ediff-overlay-put extent 'help-echo 'ediff-region-help-echo))
812 812
813(defun ediff-region-help-echo (extent-or-window &optional overlay point) 813(defun ediff-region-help-echo (extent-or-window &optional overlay _point)
814 (unless overlay 814 (unless overlay
815 (setq overlay extent-or-window)) 815 (setq overlay extent-or-window))
816 (let ((is-current (ediff-overlay-get overlay 'ediff)) 816 (let ((is-current (ediff-overlay-get overlay 'ediff))
@@ -1768,7 +1768,7 @@ Unless optional argument INPLACE is non-nil, return a new string."
1768 (or n (setq n ediff-current-difference)) 1768 (or n (setq n ediff-current-difference))
1769 (and (>= n 0) (< n ediff-number-of-differences))) 1769 (and (>= n 0) (< n ediff-number-of-differences)))
1770 1770
1771(defsubst ediff-show-all-diffs (n) 1771(defsubst ediff-show-all-diffs (_n)
1772 "Don't skip difference regions." 1772 "Don't skip difference regions."
1773 nil) 1773 nil)
1774 1774
diff --git a/lisp/vc/ediff-merg.el b/lisp/vc/ediff-merg.el
index a1f4d4f5d78..a319d8de9b6 100644
--- a/lisp/vc/ediff-merg.el
+++ b/lisp/vc/ediff-merg.el
@@ -92,6 +92,8 @@ Buffer B."
92 ) 92 )
93(make-variable-buffer-local 'ediff-skip-merge-regions-that-differ-from-default) 93(make-variable-buffer-local 'ediff-skip-merge-regions-that-differ-from-default)
94 94
95(defvar state-of-merge) ; dynamic var
96
95;; check if there is no clash between the ancestor and one of the variants. 97;; check if there is no clash between the ancestor and one of the variants.
96;; if it is not a merge job then return true 98;; if it is not a merge job then return true
97(defun ediff-merge-region-is-non-clash (n) 99(defun ediff-merge-region-is-non-clash (n)
@@ -351,8 +353,6 @@ Combining is done according to the specifications in variable
351 (reverse delim-regs-list) 353 (reverse delim-regs-list)
352 ))) 354 )))
353 355
354(defvar state-of-merge) ; dynamic var
355
356;; Check if the non-preferred merge has been modified since originally set. 356;; Check if the non-preferred merge has been modified since originally set.
357;; This affects only the regions that are marked as default-A/B or combined. 357;; This affects only the regions that are marked as default-A/B or combined.
358;; If PREFERS-TOO is non-nil, then look at the regions marked as prefers-A/B as 358;; If PREFERS-TOO is non-nil, then look at the regions marked as prefers-A/B as
diff --git a/lisp/vc/ediff-mult.el b/lisp/vc/ediff-mult.el
index 58e10819a30..55e9465d48a 100644
--- a/lisp/vc/ediff-mult.el
+++ b/lisp/vc/ediff-mult.el
@@ -1115,7 +1115,7 @@ behavior."
1115 (setq overl 1115 (setq overl
1116 (if (featurep 'xemacs) 1116 (if (featurep 'xemacs)
1117 (map-extents 1117 (map-extents
1118 (lambda (ext maparg) 1118 (lambda (ext _maparg)
1119 (if (and 1119 (if (and
1120 (ediff-overlay-get ext 'ediff-meta-info) 1120 (ediff-overlay-get ext 'ediff-meta-info)
1121 (eq (ediff-overlay-get ext 'ediff-meta-session-number) 1121 (eq (ediff-overlay-get ext 'ediff-meta-session-number)
@@ -1444,7 +1444,7 @@ Useful commands:
1444 1444
1445 1445
1446;; argument is ignored 1446;; argument is ignored
1447(defun ediff-redraw-registry-buffer (&optional ignore) 1447(defun ediff-redraw-registry-buffer (&optional _ignore)
1448 (ediff-with-current-buffer ediff-registry-buffer 1448 (ediff-with-current-buffer ediff-registry-buffer
1449 (let ((point (point)) 1449 (let ((point (point))
1450 elt bufAname bufBname bufCname cur-diff total-diffs pt 1450 elt bufAname bufBname bufCname cur-diff total-diffs pt
diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el
index 2f2c71a71e6..fe791f6bcee 100644
--- a/lisp/vc/ediff-util.el
+++ b/lisp/vc/ediff-util.el
@@ -40,7 +40,7 @@
40(defvar ediff-after-quit-hook-internal nil) 40(defvar ediff-after-quit-hook-internal nil)
41 41
42(eval-and-compile 42(eval-and-compile
43 (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) 43 (unless (fboundp 'declare-function) (defmacro declare-function (&rest _r))))
44 44
45;; end pacifier 45;; end pacifier
46 46
@@ -1602,7 +1602,7 @@ the width of the A/B/C windows."
1602;;BEG, END show the region to be positioned. 1602;;BEG, END show the region to be positioned.
1603;;JOB-NAME holds ediff-job-name. The ediff-windows job positions regions 1603;;JOB-NAME holds ediff-job-name. The ediff-windows job positions regions
1604;;differently. 1604;;differently.
1605(defun ediff-position-region (beg end pos job-name) 1605(defun ediff-position-region (beg end pos _job-name)
1606 (if (> end (point-max)) 1606 (if (> end (point-max))
1607 (setq end (point-max))) 1607 (setq end (point-max)))
1608 (if ediff-windows-job 1608 (if ediff-windows-job
@@ -1685,7 +1685,7 @@ the width of the A/B/C windows."
1685 'ediff-get-lines-to-region-start) 1685 'ediff-get-lines-to-region-start)
1686 ((eq op 'scroll-up) 1686 ((eq op 'scroll-up)
1687 'ediff-get-lines-to-region-end) 1687 'ediff-get-lines-to-region-end)
1688 (t (lambda (a b c) 0)))) 1688 (t (lambda (_a _b _c) 0))))
1689 (max-lines (max (funcall func 'A n ctl-buf) 1689 (max-lines (max (funcall func 'A n ctl-buf)
1690 (funcall func 'B n ctl-buf) 1690 (funcall func 'B n ctl-buf)
1691 (if (ediff-buffer-live-p ediff-buffer-C) 1691 (if (ediff-buffer-live-p ediff-buffer-C)
diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el
index 5a14c193344..785535b82df 100644
--- a/lisp/vc/ediff-wind.el
+++ b/lisp/vc/ediff-wind.el
@@ -40,7 +40,7 @@
40 40
41;; declare-function does not exist in XEmacs 41;; declare-function does not exist in XEmacs
42(eval-and-compile 42(eval-and-compile
43 (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) 43 (unless (fboundp 'declare-function) (defmacro declare-function (&rest _r))))
44 44
45(require 'ediff-init) 45(require 'ediff-init)
46(require 'ediff-help) 46(require 'ediff-help)
@@ -280,7 +280,7 @@ into icons, regardless of the window manager."
280 280
281;;; Functions 281;;; Functions
282 282
283(defun ediff-get-window-by-clicking (wind prev-wind wind-number) 283(defun ediff-get-window-by-clicking (_wind _prev-wind wind-number)
284 (let (event) 284 (let (event)
285 (message 285 (message
286 "Select windows by clicking. Please click on Window %d " wind-number) 286 "Select windows by clicking. Please click on Window %d " wind-number)
@@ -289,9 +289,9 @@ into icons, regardless of the window manager."
289 (beep 1)) 289 (beep 1))
290 (message "Please click on Window %d " wind-number)) 290 (message "Please click on Window %d " wind-number))
291 (ediff-read-event) ; discard event 291 (ediff-read-event) ; discard event
292 (setq wind (if (featurep 'xemacs) 292 (if (featurep 'xemacs)
293 (event-window event) 293 (event-window event)
294 (posn-window (event-start event)))))) 294 (posn-window (event-start event)))))
295 295
296 296
297;; Select the lowest window on the frame. 297;; Select the lowest window on the frame.
diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el
index d35c3e53e9a..9ab592587c9 100644
--- a/lisp/vc/ediff.el
+++ b/lisp/vc/ediff.el
@@ -114,7 +114,7 @@
114 114
115;; Compiler pacifier 115;; Compiler pacifier
116(eval-and-compile 116(eval-and-compile
117 (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) 117 (unless (fboundp 'declare-function) (defmacro declare-function (&rest _r))))
118 118
119(require 'ediff-util) 119(require 'ediff-util)
120;; end pacifier 120;; end pacifier
diff --git a/lisp/vc/emerge.el b/lisp/vc/emerge.el
index 8d0e8efc75c..af13665fc2a 100644
--- a/lisp/vc/emerge.el
+++ b/lisp/vc/emerge.el
@@ -849,7 +849,7 @@ This is *not* a user option, since Emerge uses it for its own processing.")
849;;; Functions to start Emerge on files 849;;; Functions to start Emerge on files
850 850
851;;;###autoload 851;;;###autoload
852(defun emerge-files (arg file-A file-B file-out &optional startup-hooks 852(defun emerge-files (_arg file-A file-B file-out &optional startup-hooks
853 quit-hooks) 853 quit-hooks)
854 "Run Emerge on two files." 854 "Run Emerge on two files."
855 (interactive 855 (interactive
@@ -869,7 +869,7 @@ This is *not* a user option, since Emerge uses it for its own processing.")
869 file-out)) 869 file-out))
870 870
871;;;###autoload 871;;;###autoload
872(defun emerge-files-with-ancestor (arg file-A file-B file-ancestor file-out 872(defun emerge-files-with-ancestor (_arg file-A file-B file-ancestor file-out
873 &optional startup-hooks quit-hooks) 873 &optional startup-hooks quit-hooks)
874 "Run Emerge on two files, giving another file as the ancestor." 874 "Run Emerge on two files, giving another file as the ancestor."
875 (interactive 875 (interactive
@@ -1063,7 +1063,7 @@ This is *not* a user option, since Emerge uses it for its own processing.")
1063 quit-hooks))) 1063 quit-hooks)))
1064 1064
1065(defun emerge-revisions-internal (file revision-A revision-B &optional 1065(defun emerge-revisions-internal (file revision-A revision-B &optional
1066 startup-hooks quit-hooks output-file) 1066 startup-hooks quit-hooks _output-file)
1067 (let ((buffer-A (get-buffer-create (format "%s,%s" file revision-A))) 1067 (let ((buffer-A (get-buffer-create (format "%s,%s" file revision-A)))
1068 (buffer-B (get-buffer-create (format "%s,%s" file revision-B))) 1068 (buffer-B (get-buffer-create (format "%s,%s" file revision-B)))
1069 (emerge-file-A (emerge-make-temp-file "A")) 1069 (emerge-file-A (emerge-make-temp-file "A"))
diff --git a/lisp/vc/pcvs.el b/lisp/vc/pcvs.el
index fb91185662a..914eef4dd39 100644
--- a/lisp/vc/pcvs.el
+++ b/lisp/vc/pcvs.el
@@ -648,7 +648,7 @@ If non-nil, NEW means to create a new buffer no matter what."
648 done)))) 648 done))))
649 649
650 650
651(defun cvs-sentinel (proc msg) 651(defun cvs-sentinel (proc _msg)
652 "Sentinel for the cvs update process. 652 "Sentinel for the cvs update process.
653This is responsible for parsing the output from the cvs update when 653This is responsible for parsing the output from the cvs update when
654it is finished." 654it is finished."
@@ -981,7 +981,7 @@ The files are stored to DIR."
981;;;; 981;;;;
982 982
983(defun-cvs-mode (cvs-mode-revert-buffer . SIMPLE) 983(defun-cvs-mode (cvs-mode-revert-buffer . SIMPLE)
984 (&optional ignore-auto noconfirm) 984 (&optional _ignore-auto _noconfirm)
985 "Rerun `cvs-examine' on the current directory with the default flags." 985 "Rerun `cvs-examine' on the current directory with the default flags."
986 (interactive) 986 (interactive)
987 (cvs-examine default-directory t)) 987 (cvs-examine default-directory t))
@@ -995,7 +995,7 @@ If in a *cvs* buffer, don't prompt unless a prefix argument is given."
995 (read-directory-name prompt nil default-directory nil))) 995 (read-directory-name prompt nil default-directory nil)))
996 996
997;;;###autoload 997;;;###autoload
998(defun cvs-quickdir (dir &optional flags noshow) 998(defun cvs-quickdir (dir &optional _flags noshow)
999 "Open a *cvs* buffer on DIR without running cvs. 999 "Open a *cvs* buffer on DIR without running cvs.
1000With a prefix argument, prompt for a directory to use. 1000With a prefix argument, prompt for a directory to use.
1001A prefix arg >8 (ex: \\[universal-argument] \\[universal-argument]), 1001A prefix arg >8 (ex: \\[universal-argument] \\[universal-argument]),
diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el
index f61e97216a9..87336b6a357 100644
--- a/lisp/vc/smerge-mode.el
+++ b/lisp/vc/smerge-mode.el
@@ -57,7 +57,6 @@
57 57
58(defcustom smerge-diff-buffer-name "*vc-diff*" 58(defcustom smerge-diff-buffer-name "*vc-diff*"
59 "Buffer name to use for displaying diffs." 59 "Buffer name to use for displaying diffs."
60 :group 'smerge
61 :type '(choice 60 :type '(choice
62 (const "*vc-diff*") 61 (const "*vc-diff*")
63 (const "*cvs-diff*") 62 (const "*cvs-diff*")
@@ -69,12 +68,10 @@
69 (if (listp diff-switches) diff-switches (list diff-switches))) 68 (if (listp diff-switches) diff-switches (list diff-switches)))
70 "A list of strings specifying switches to be passed to diff. 69 "A list of strings specifying switches to be passed to diff.
71Used in `smerge-diff-base-mine' and related functions." 70Used in `smerge-diff-base-mine' and related functions."
72 :group 'smerge
73 :type '(repeat string)) 71 :type '(repeat string))
74 72
75(defcustom smerge-auto-leave t 73(defcustom smerge-auto-leave t
76 "Non-nil means to leave `smerge-mode' when the last conflict is resolved." 74 "Non-nil means to leave `smerge-mode' when the last conflict is resolved."
77 :group 'smerge
78 :type 'boolean) 75 :type 'boolean)
79 76
80(defface smerge-mine 77(defface smerge-mine
@@ -84,8 +81,7 @@ Used in `smerge-diff-base-mine' and related functions."
84 :background "#553333") 81 :background "#553333")
85 (((class color)) 82 (((class color))
86 :foreground "red")) 83 :foreground "red"))
87 "Face for your code." 84 "Face for your code.")
88 :group 'smerge)
89(define-obsolete-face-alias 'smerge-mine-face 'smerge-mine "22.1") 85(define-obsolete-face-alias 'smerge-mine-face 'smerge-mine "22.1")
90(defvar smerge-mine-face 'smerge-mine) 86(defvar smerge-mine-face 'smerge-mine)
91 87
@@ -96,8 +92,7 @@ Used in `smerge-diff-base-mine' and related functions."
96 :background "#335533") 92 :background "#335533")
97 (((class color)) 93 (((class color))
98 :foreground "green")) 94 :foreground "green"))
99 "Face for the other code." 95 "Face for the other code.")
100 :group 'smerge)
101(define-obsolete-face-alias 'smerge-other-face 'smerge-other "22.1") 96(define-obsolete-face-alias 'smerge-other-face 'smerge-other "22.1")
102(defvar smerge-other-face 'smerge-other) 97(defvar smerge-other-face 'smerge-other)
103 98
@@ -108,8 +103,7 @@ Used in `smerge-diff-base-mine' and related functions."
108 :background "#888833") 103 :background "#888833")
109 (((class color)) 104 (((class color))
110 :foreground "yellow")) 105 :foreground "yellow"))
111 "Face for the base code." 106 "Face for the base code.")
112 :group 'smerge)
113(define-obsolete-face-alias 'smerge-base-face 'smerge-base "22.1") 107(define-obsolete-face-alias 'smerge-base-face 'smerge-base "22.1")
114(defvar smerge-base-face 'smerge-base) 108(defvar smerge-base-face 'smerge-base)
115 109
@@ -118,15 +112,13 @@ Used in `smerge-diff-base-mine' and related functions."
118 (:background "grey85")) 112 (:background "grey85"))
119 (((background dark)) 113 (((background dark))
120 (:background "grey30"))) 114 (:background "grey30")))
121 "Face for the conflict markers." 115 "Face for the conflict markers.")
122 :group 'smerge)
123(define-obsolete-face-alias 'smerge-markers-face 'smerge-markers "22.1") 116(define-obsolete-face-alias 'smerge-markers-face 'smerge-markers "22.1")
124(defvar smerge-markers-face 'smerge-markers) 117(defvar smerge-markers-face 'smerge-markers)
125 118
126(defface smerge-refined-change 119(defface smerge-refined-change
127 '((t nil)) 120 '((t nil))
128 "Face used for char-based changes shown by `smerge-refine'." 121 "Face used for char-based changes shown by `smerge-refine'.")
129 :group 'smerge)
130 122
131(defface smerge-refined-removed 123(defface smerge-refined-removed
132 '((default 124 '((default
@@ -137,7 +129,6 @@ Used in `smerge-diff-base-mine' and related functions."
137 :background "#aa2222") 129 :background "#aa2222")
138 (t :inverse-video t)) 130 (t :inverse-video t))
139 "Face used for removed characters shown by `smerge-refine'." 131 "Face used for removed characters shown by `smerge-refine'."
140 :group 'smerge
141 :version "24.3") 132 :version "24.3")
142 133
143(defface smerge-refined-added 134(defface smerge-refined-added
@@ -149,7 +140,6 @@ Used in `smerge-diff-base-mine' and related functions."
149 :background "#22aa22") 140 :background "#22aa22")
150 (t :inverse-video t)) 141 (t :inverse-video t))
151 "Face used for added characters shown by `smerge-refine'." 142 "Face used for added characters shown by `smerge-refine'."
152 :group 'smerge
153 :version "24.3") 143 :version "24.3")
154 144
155(easy-mmode-defmap smerge-basic-map 145(easy-mmode-defmap smerge-basic-map
@@ -172,7 +162,6 @@ Used in `smerge-diff-base-mine' and related functions."
172 162
173(defcustom smerge-command-prefix "\C-c^" 163(defcustom smerge-command-prefix "\C-c^"
174 "Prefix for `smerge-mode' commands." 164 "Prefix for `smerge-mode' commands."
175 :group 'smerge
176 :type '(choice (const :tag "ESC" "\e") 165 :type '(choice (const :tag "ESC" "\e")
177 (const :tag "C-c ^" "\C-c^" ) 166 (const :tag "C-c ^" "\C-c^" )
178 (const :tag "none" "") 167 (const :tag "none" "")
diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el
index 8af488789de..066b4ec6587 100644
--- a/lisp/vc/vc-annotate.el
+++ b/lisp/vc/vc-annotate.el
@@ -1,4 +1,4 @@
1;;; vc-annotate.el --- VC Annotate Support 1;;; vc-annotate.el --- VC Annotate Support -*- lexical-binding: t -*-
2 2
3;; Copyright (C) 1997-1998, 2000-2013 Free Software Foundation, Inc. 3;; Copyright (C) 1997-1998, 2000-2013 Free Software Foundation, Inc.
4 4
@@ -306,9 +306,9 @@ use; you may override this using the second optional arg MODE."
306 (vc-annotate-display-default (or vc-annotate-ratio 1.0))) 306 (vc-annotate-display-default (or vc-annotate-ratio 1.0)))
307 ;; One of the auto-scaling modes 307 ;; One of the auto-scaling modes
308 ((eq vc-annotate-display-mode 'scale) 308 ((eq vc-annotate-display-mode 'scale)
309 (vc-exec-after `(vc-annotate-display-autoscale))) 309 (vc-run-delayed (vc-annotate-display-autoscale)))
310 ((eq vc-annotate-display-mode 'fullscale) 310 ((eq vc-annotate-display-mode 'fullscale)
311 (vc-exec-after `(vc-annotate-display-autoscale t))) 311 (vc-run-delayed (vc-annotate-display-autoscale t)))
312 ((numberp vc-annotate-display-mode) ; A fixed number of days lookback 312 ((numberp vc-annotate-display-mode) ; A fixed number of days lookback
313 (vc-annotate-display-default 313 (vc-annotate-display-default
314 (/ vc-annotate-display-mode 314 (/ vc-annotate-display-mode
@@ -316,6 +316,8 @@ use; you may override this using the second optional arg MODE."
316 (t (error "No such display mode: %s" 316 (t (error "No such display mode: %s"
317 vc-annotate-display-mode)))) 317 vc-annotate-display-mode))))
318 318
319(defvar vc-sentinel-movepoint)
320
319;;;###autoload 321;;;###autoload
320(defun vc-annotate (file rev &optional display-mode buf move-point-to vc-bk) 322(defun vc-annotate (file rev &optional display-mode buf move-point-to vc-bk)
321 "Display the edit history of the current FILE using colors. 323 "Display the edit history of the current FILE using colors.
@@ -397,16 +399,16 @@ mode-specific menu. `vc-annotate-color-map' and
397 display-mode)))) 399 display-mode))))
398 400
399 (with-current-buffer temp-buffer-name 401 (with-current-buffer temp-buffer-name
400 (vc-exec-after 402 (vc-run-delayed
401 `(progn 403 ;; Ideally, we'd rather not move point if the user has already
402 ;; Ideally, we'd rather not move point if the user has already 404 ;; moved it elsewhere, but really point here is not the position
403 ;; moved it elsewhere, but really point here is not the position 405 ;; of the user's cursor :-(
404 ;; of the user's cursor :-( 406 (when current-line ;(and (bobp))
405 (when ,current-line ;(and (bobp)) 407 (goto-char (point-min))
406 (goto-line ,current-line) 408 (forward-line (1- current-line))
407 (setq vc-sentinel-movepoint (point))) 409 (setq vc-sentinel-movepoint (point)))
408 (unless (active-minibuffer-window) 410 (unless (active-minibuffer-window)
409 (message "Annotating... done"))))))) 411 (message "Annotating... done"))))))
410 412
411(defun vc-annotate-prev-revision (prefix) 413(defun vc-annotate-prev-revision (prefix)
412 "Visit the annotation of the revision previous to this one. 414 "Visit the annotation of the revision previous to this one.
@@ -630,7 +632,7 @@ or OFFSET if present."
630 (vc-call-backend vc-annotate-backend 'annotate-current-time)) 632 (vc-call-backend vc-annotate-backend 'annotate-current-time))
631 next-time)))) 633 next-time))))
632 634
633(defun vc-default-annotate-current-time (backend) 635(defun vc-default-annotate-current-time (_backend)
634 "Return the current time, encoded as fractional days." 636 "Return the current time, encoded as fractional days."
635 (vc-annotate-convert-time (current-time))) 637 (vc-annotate-convert-time (current-time)))
636 638
diff --git a/lisp/vc/vc-arch.el b/lisp/vc/vc-arch.el
index f94e19271ee..e9c65b49202 100644
--- a/lisp/vc/vc-arch.el
+++ b/lisp/vc/vc-arch.el
@@ -321,8 +321,8 @@ CALLBACK expects (ENTRIES &optional MORE-TO-COME); see
321 (let ((default-directory dir)) 321 (let ((default-directory dir))
322 (vc-arch-command t 'async nil "changes")) 322 (vc-arch-command t 'async nil "changes"))
323 ;; The updating could be done asynchronously. 323 ;; The updating could be done asynchronously.
324 (vc-exec-after 324 (vc-run-delayed
325 `(vc-arch-after-dir-status ',callback))) 325 (vc-arch-after-dir-status callback)))
326 326
327(defun vc-arch-after-dir-status (callback) 327(defun vc-arch-after-dir-status (callback)
328 (let* ((state-map '(("M " . edited) 328 (let* ((state-map '(("M " . edited)
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index e59a7dc5214..5f5416dc2ff 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -47,6 +47,7 @@
47 47
48(eval-when-compile 48(eval-when-compile
49 (require 'cl-lib) 49 (require 'cl-lib)
50 (require 'vc-dispatcher)
50 (require 'vc-dir)) ; vc-dir-at-event 51 (require 'vc-dir)) ; vc-dir-at-event
51 52
52;; Clear up the cache to force vc-call to check again and discover 53;; Clear up the cache to force vc-call to check again and discover
@@ -354,7 +355,7 @@ prompt for the Bzr command to run."
354 command (cadr args) 355 command (cadr args)
355 args (cddr args))) 356 args (cddr args)))
356 (let ((buf (apply 'vc-bzr-async-command command args))) 357 (let ((buf (apply 'vc-bzr-async-command command args)))
357 (with-current-buffer buf (vc-exec-after '(vc-compilation-mode 'bzr))) 358 (with-current-buffer buf (vc-run-delayed (vc-compilation-mode 'bzr)))
358 (vc-set-async-update buf)))) 359 (vc-set-async-update buf))))
359 360
360(defun vc-bzr-merge-branch () 361(defun vc-bzr-merge-branch ()
@@ -385,7 +386,7 @@ default if it is available."
385 (command (cadr cmd)) 386 (command (cadr cmd))
386 (args (cddr cmd))) 387 (args (cddr cmd)))
387 (let ((buf (apply 'vc-bzr-async-command command args))) 388 (let ((buf (apply 'vc-bzr-async-command command args)))
388 (with-current-buffer buf (vc-exec-after '(vc-compilation-mode 'bzr))) 389 (with-current-buffer buf (vc-run-delayed (vc-compilation-mode 'bzr)))
389 (vc-set-async-update buf)))) 390 (vc-set-async-update buf))))
390 391
391(defun vc-bzr-status (file) 392(defun vc-bzr-status (file)
@@ -651,21 +652,6 @@ REV non-nil gets an error."
651 (vc-bzr-command "cat" t 0 file "-r" rev) 652 (vc-bzr-command "cat" t 0 file "-r" rev)
652 (vc-bzr-command "cat" t 0 file)))) 653 (vc-bzr-command "cat" t 0 file))))
653 654
654(defun vc-bzr-ignore (file &optional directory remove)
655 "Ignore FILE under Bazaar.
656If DIRECTORY is non-nil, the repository to use will be deduced by
657DIRECTORY; if REMOVE is non-nil, remove FILE from ignored files."
658 (if remove
659 (if directory
660 (vc--remove-regexp file (vc-bzr-find-ignore-file directory))
661 (vc--remove-regexp file
662 (vc-bzr-find-ignore-file default-directory)))
663 (vc-bzr-command "ignore" t 0 file)))
664
665(defun vc-bzr-ignore-completion-table (file)
666 "Return the list of ignored files."
667 (vc--read-lines (vc-bzr-find-ignore-file file)))
668
669(defun vc-bzr-find-ignore-file (file) 655(defun vc-bzr-find-ignore-file (file)
670 "Return the root directory of the repository of FILE." 656 "Return the root directory of the repository of FILE."
671 (expand-file-name ".bzrignore" 657 (expand-file-name ".bzrignore"
@@ -1010,23 +996,23 @@ stream. Standard error output is discarded."
1010(defun vc-bzr-dir-status (dir update-function) 996(defun vc-bzr-dir-status (dir update-function)
1011 "Return a list of conses (file . state) for DIR." 997 "Return a list of conses (file . state) for DIR."
1012 (vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S") 998 (vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S")
1013 (vc-exec-after 999 (vc-run-delayed
1014 `(vc-bzr-after-dir-status (quote ,update-function) 1000 (vc-bzr-after-dir-status update-function
1015 ;; "bzr status" results are relative to 1001 ;; "bzr status" results are relative to
1016 ;; the bzr root directory, NOT to the 1002 ;; the bzr root directory, NOT to the
1017 ;; directory "bzr status" was invoked in. 1003 ;; directory "bzr status" was invoked in.
1018 ;; Ugh. 1004 ;; Ugh.
1019 ;; We pass the relative directory here so 1005 ;; We pass the relative directory here so
1020 ;; that `vc-bzr-after-dir-status' can 1006 ;; that `vc-bzr-after-dir-status' can
1021 ;; frob the results accordingly. 1007 ;; frob the results accordingly.
1022 (file-relative-name ,dir (vc-bzr-root ,dir))))) 1008 (file-relative-name dir (vc-bzr-root dir)))))
1023 1009
1024(defun vc-bzr-dir-status-files (dir files _default-state update-function) 1010(defun vc-bzr-dir-status-files (dir files _default-state update-function)
1025 "Return a list of conses (file . state) for DIR." 1011 "Return a list of conses (file . state) for DIR."
1026 (apply 'vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S" files) 1012 (apply 'vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S" files)
1027 (vc-exec-after 1013 (vc-run-delayed
1028 `(vc-bzr-after-dir-status (quote ,update-function) 1014 (vc-bzr-after-dir-status update-function
1029 (file-relative-name ,dir (vc-bzr-root ,dir))))) 1015 (file-relative-name dir (vc-bzr-root dir)))))
1030 1016
1031(defvar vc-bzr-shelve-map 1017(defvar vc-bzr-shelve-map
1032 (let ((map (make-sparse-keymap))) 1018 (let ((map (make-sparse-keymap)))
diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el
index 48d83d4f408..931193c46e0 100644
--- a/lisp/vc/vc-cvs.el
+++ b/lisp/vc/vc-cvs.el
@@ -518,7 +518,7 @@ Remaining arguments are ignored."
518 (if (vc-stay-local-p files 'CVS) 'async 0) 518 (if (vc-stay-local-p files 'CVS) 'async 0)
519 files "log") 519 files "log")
520 (with-current-buffer buffer 520 (with-current-buffer buffer
521 (vc-exec-after (vc-rcs-print-log-cleanup))) 521 (vc-run-delayed (vc-rcs-print-log-cleanup)))
522 (when limit 'limit-unsupported)) 522 (when limit 'limit-unsupported))
523 523
524(defun vc-cvs-comment-history (file) 524(defun vc-cvs-comment-history (file)
@@ -1015,14 +1015,14 @@ state."
1015 ;; (vc-cvs-command (current-buffer) 'async 1015 ;; (vc-cvs-command (current-buffer) 'async
1016 ;; (file-relative-name dir) 1016 ;; (file-relative-name dir)
1017 ;; "-f" "-n" "update" "-d" "-P") 1017 ;; "-f" "-n" "update" "-d" "-P")
1018 (vc-exec-after 1018 (vc-run-delayed
1019 `(vc-cvs-after-dir-status (quote ,update-function)))))) 1019 (vc-cvs-after-dir-status update-function)))))
1020 1020
1021(defun vc-cvs-dir-status-files (dir files _default-state update-function) 1021(defun vc-cvs-dir-status-files (dir files _default-state update-function)
1022 "Create a list of conses (file . state) for DIR." 1022 "Create a list of conses (file . state) for DIR."
1023 (apply 'vc-cvs-command (current-buffer) 'async dir "-f" "status" files) 1023 (apply 'vc-cvs-command (current-buffer) 'async dir "-f" "status" files)
1024 (vc-exec-after 1024 (vc-run-delayed
1025 `(vc-cvs-after-dir-status (quote ,update-function)))) 1025 (vc-cvs-after-dir-status update-function)))
1026 1026
1027(defun vc-cvs-file-to-string (file) 1027(defun vc-cvs-file-to-string (file)
1028 "Read the content of FILE and return it as a string." 1028 "Read the content of FILE and return it as a string."
diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el
index 4f4c6942ba9..7888752553e 100644
--- a/lisp/vc/vc-dispatcher.el
+++ b/lisp/vc/vc-dispatcher.el
@@ -198,11 +198,11 @@ Another is that undo information is not kept."
198 ;; Normally, we want async code such as sentinels to not move point. 198 ;; Normally, we want async code such as sentinels to not move point.
199 (save-excursion 199 (save-excursion
200 (goto-char m) 200 (goto-char m)
201 ;; Each sentinel may move point and the next one should be run 201 ;; Each sentinel may move point and the next one should be run
202 ;; at that new point. We could get the same result by having 202 ;; at that new point. We could get the same result by having
203 ;; each sentinel read&set process-mark, but since `cmd' needs 203 ;; each sentinel read&set process-mark, but since `cmd' needs
204 ;; to work both for async and sync processes, this would be 204 ;; to work both for async and sync processes, this would be
205 ;; difficult to achieve. 205 ;; difficult to achieve.
206 (vc-exec-after code) 206 (vc-exec-after code)
207 (move-marker m (point))) 207 (move-marker m (point)))
208 ;; But sometimes the sentinels really want to move point. 208 ;; But sometimes the sentinels really want to move point.
@@ -224,8 +224,7 @@ Another is that undo information is not kept."
224 "Eval CODE when the current buffer's process is done. 224 "Eval CODE when the current buffer's process is done.
225If the current buffer has no process, just evaluate CODE. 225If the current buffer has no process, just evaluate CODE.
226Else, add CODE to the process' sentinel. 226Else, add CODE to the process' sentinel.
227CODE can be either a function of no arguments, or an expression 227CODE should be a function of no arguments."
228to evaluate."
229 (let ((proc (get-buffer-process (current-buffer)))) 228 (let ((proc (get-buffer-process (current-buffer))))
230 (cond 229 (cond
231 ;; If there's no background process, just execute the code. 230 ;; If there's no background process, just execute the code.
@@ -247,6 +246,10 @@ to evaluate."
247 (t (error "Unexpected process state")))) 246 (t (error "Unexpected process state"))))
248 nil) 247 nil)
249 248
249(defmacro vc-run-delayed (&rest body)
250 (declare (indent 0) (debug t))
251 `(vc-exec-after (lambda () ,@body)))
252
250(defvar vc-post-command-functions nil 253(defvar vc-post-command-functions nil
251 "Hook run at the end of `vc-do-command'. 254 "Hook run at the end of `vc-do-command'.
252Each function is called inside the buffer in which the command was run 255Each function is called inside the buffer in which the command was run
@@ -328,8 +331,8 @@ case, and the process object in the asynchronous case."
328 (set-process-filter proc 'vc-process-filter) 331 (set-process-filter proc 'vc-process-filter)
329 (setq status proc) 332 (setq status proc)
330 (when vc-command-messages 333 (when vc-command-messages
331 (vc-exec-after 334 (vc-run-delayed
332 `(message "Running %s in background... done" ',full-command)))) 335 (message "Running %s in background... done" full-command))))
333 ;; Run synchronously 336 ;; Run synchronously
334 (when vc-command-messages 337 (when vc-command-messages
335 (message "Running %s in foreground..." full-command)) 338 (message "Running %s in foreground..." full-command))
@@ -346,9 +349,9 @@ case, and the process object in the asynchronous case."
346 (if (integerp status) (format "status %d" status) status))) 349 (if (integerp status) (format "status %d" status) status)))
347 (when vc-command-messages 350 (when vc-command-messages
348 (message "Running %s...OK = %d" full-command status)))) 351 (message "Running %s...OK = %d" full-command status))))
349 (vc-exec-after 352 (vc-run-delayed
350 `(run-hook-with-args 'vc-post-command-functions 353 (run-hook-with-args 'vc-post-command-functions
351 ',command ',file-or-list ',flags)) 354 command file-or-list flags))
352 status)))) 355 status))))
353 356
354(defun vc-do-async-command (buffer root command &rest args) 357(defun vc-do-async-command (buffer root command &rest args)
@@ -408,17 +411,17 @@ If the current buffer is a Dired buffer, revert it."
408 (cond 411 (cond
409 ((derived-mode-p 'vc-dir-mode) 412 ((derived-mode-p 'vc-dir-mode)
410 (with-current-buffer process-buffer 413 (with-current-buffer process-buffer
411 (vc-exec-after 414 (vc-run-delayed
412 `(if (buffer-live-p ,buf) 415 (if (buffer-live-p buf)
413 (with-current-buffer ,buf 416 (with-current-buffer buf
414 (vc-dir-refresh)))))) 417 (vc-dir-refresh))))))
415 ((derived-mode-p 'dired-mode) 418 ((derived-mode-p 'dired-mode)
416 (with-current-buffer process-buffer 419 (with-current-buffer process-buffer
417 (vc-exec-after 420 (vc-run-delayed
418 `(and (buffer-live-p ,buf) 421 (and (buffer-live-p buf)
419 (= (buffer-modified-tick ,buf) ,tick) 422 (= (buffer-modified-tick buf) tick)
420 (with-current-buffer ,buf 423 (with-current-buffer buf
421 (revert-buffer))))))))) 424 (revert-buffer)))))))))
422 425
423;; These functions are used to ensure that the view the user sees is up to date 426;; These functions are used to ensure that the view the user sees is up to date
424;; even if the dispatcher client mode has messed with file contents (as in, 427;; even if the dispatcher client mode has messed with file contents (as in,
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 472c42840af..a4ce3a2c46c 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -477,8 +477,8 @@ or an empty string if none."
477 (`diff-index 477 (`diff-index
478 (vc-git-command (current-buffer) 'async files 478 (vc-git-command (current-buffer) 'async files
479 "diff-index" "--relative" "-z" "-M" "HEAD" "--"))) 479 "diff-index" "--relative" "-z" "-M" "HEAD" "--")))
480 (vc-exec-after 480 (vc-run-delayed
481 `(vc-git-after-dir-status-stage ',stage ',files ',update-function))) 481 (vc-git-after-dir-status-stage stage files update-function)))
482 482
483(defun vc-git-dir-status (_dir update-function) 483(defun vc-git-dir-status (_dir update-function)
484 "Return a list of (FILE STATE EXTRA) entries for DIR." 484 "Return a list of (FILE STATE EXTRA) entries for DIR."
@@ -649,11 +649,18 @@ If toggling on, also insert its message into the buffer."
649It is based on `log-edit-mode', and has Git-specific extensions.") 649It is based on `log-edit-mode', and has Git-specific extensions.")
650 650
651(defun vc-git-checkin (files _rev comment) 651(defun vc-git-checkin (files _rev comment)
652 (let ((coding-system-for-write vc-git-commits-coding-system)) 652 (let* ((file1 (or (car files) default-directory))
653 (root (vc-git-root file1))
654 (default-directory (expand-file-name root))
655 (only (or (cdr files)
656 (not (equal root (abbreviate-file-name file1)))))
657 (coding-system-for-write vc-git-commits-coding-system))
653 (cl-flet ((boolean-arg-fn 658 (cl-flet ((boolean-arg-fn
654 (argument) 659 (argument)
655 (lambda (value) (when (equal value "yes") (list argument))))) 660 (lambda (value) (when (equal value "yes") (list argument)))))
656 (apply 'vc-git-command nil 0 files 661 ;; When operating on the whole tree, better pass nil than ".", since "."
662 ;; fails when we're committing a merge.
663 (apply 'vc-git-command nil 0 (if only files)
657 (nconc (list "commit" "-m") 664 (nconc (list "commit" "-m")
658 (log-edit-extract-headers 665 (log-edit-extract-headers
659 `(("Author" . "--author") 666 `(("Author" . "--author")
@@ -661,7 +668,7 @@ It is based on `log-edit-mode', and has Git-specific extensions.")
661 ("Amend" . ,(boolean-arg-fn "--amend")) 668 ("Amend" . ,(boolean-arg-fn "--amend"))
662 ("Sign-Off" . ,(boolean-arg-fn "--signoff"))) 669 ("Sign-Off" . ,(boolean-arg-fn "--signoff")))
663 comment) 670 comment)
664 (list "--only" "--")))))) 671 (if only (list "--only" "--")))))))
665 672
666(defun vc-git-find-revision (file rev buffer) 673(defun vc-git-find-revision (file rev buffer)
667 (let* (process-file-side-effects 674 (let* (process-file-side-effects
@@ -680,22 +687,6 @@ It is based on `log-edit-mode', and has Git-specific extensions.")
680 nil 687 nil
681 "cat-file" "blob" (concat (if rev rev "HEAD") ":" fullname)))) 688 "cat-file" "blob" (concat (if rev rev "HEAD") ":" fullname))))
682 689
683(defun vc-git-ignore (file &optional directory remove)
684 "Ignore FILE under Git.
685If DIRECTORY is non-nil, the repository to use will be deduced by
686DIRECTORY; if REMOVE is non-nil, remove FILE from ignored files."
687 (let (gitignore)
688 (if directory
689 (setq gitignore (vc-git-find-ignore-file directory))
690 (setq gitignore (vc-git-find-ignore-file default-directory)))
691 (if remove
692 (vc--remove-regexp file gitignore)
693 (vc--add-line file gitignore))))
694
695(defun vc-git-ignore-completion-table (file)
696 "Return the list of ignored files."
697 (vc--read-lines (vc-git-find-ignore-file file)))
698
699(defun vc-git-find-ignore-file (file) 690(defun vc-git-find-ignore-file (file)
700 "Return the root directory of the repository of FILE." 691 "Return the root directory of the repository of FILE."
701 (expand-file-name ".gitignore" 692 (expand-file-name ".gitignore"
@@ -735,7 +726,7 @@ for the Git command to run."
735 command (cadr args) 726 command (cadr args)
736 args (cddr args))) 727 args (cddr args)))
737 (apply 'vc-do-async-command buffer root git-program command args) 728 (apply 'vc-do-async-command buffer root git-program command args)
738 (with-current-buffer buffer (vc-exec-after '(vc-compilation-mode 'git))) 729 (with-current-buffer buffer (vc-run-delayed (vc-compilation-mode 'git)))
739 (vc-set-async-update buffer))) 730 (vc-set-async-update buffer)))
740 731
741(defun vc-git-merge-branch () 732(defun vc-git-merge-branch ()
@@ -755,7 +746,7 @@ This prompts for a branch to merge from."
755 nil t))) 746 nil t)))
756 (apply 'vc-do-async-command buffer root vc-git-program "merge" 747 (apply 'vc-do-async-command buffer root vc-git-program "merge"
757 (list merge-source)) 748 (list merge-source))
758 (with-current-buffer buffer (vc-exec-after '(vc-compilation-mode 'git))) 749 (with-current-buffer buffer (vc-run-delayed (vc-compilation-mode 'git)))
759 (vc-set-async-update buffer))) 750 (vc-set-async-update buffer)))
760 751
761;;; HISTORY FUNCTIONS 752;;; HISTORY FUNCTIONS
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index 68d98a60f98..ba882a3ec5d 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -459,22 +459,6 @@ REV is ignored."
459 (vc-hg-command buffer 0 file "cat" "-r" rev) 459 (vc-hg-command buffer 0 file "cat" "-r" rev)
460 (vc-hg-command buffer 0 file "cat")))) 460 (vc-hg-command buffer 0 file "cat"))))
461 461
462(defun vc-hg-ignore (file &optional directory remove)
463 "Ignore FILE under Mercurial.
464If DIRECTORY is non-nil, the repository to use will be deduced by
465DIRECTORY; if REMOVE is non-nil, remove FILE from ignored files."
466 (let (hgignore)
467 (if directory
468 (setq hgignore (vc-hg-find-ignore-file directory))
469 (setq hgignore (vc-hg-find-ignore-file default-directory)))
470 (if remove
471 (vc--remove-regexp file hgignore)
472 (vc--add-line file hgignore))))
473
474(defun vc-hg-ignore-completion-table (file)
475 "Return the list of ignored files."
476 (vc--read-lines (vc-hg-find-ignore-file file)))
477
478(defun vc-hg-find-ignore-file (file) 462(defun vc-hg-find-ignore-file (file)
479 "Return the root directory of the repository of FILE." 463 "Return the root directory of the repository of FILE."
480 (expand-file-name ".hgignore" 464 (expand-file-name ".hgignore"
@@ -624,13 +608,13 @@ REV is the revision to check out into WORKFILE."
624 608
625(defun vc-hg-dir-status (dir update-function) 609(defun vc-hg-dir-status (dir update-function)
626 (vc-hg-command (current-buffer) 'async dir "status" "-C") 610 (vc-hg-command (current-buffer) 'async dir "status" "-C")
627 (vc-exec-after 611 (vc-run-delayed
628 `(vc-hg-after-dir-status (quote ,update-function)))) 612 (vc-hg-after-dir-status update-function)))
629 613
630(defun vc-hg-dir-status-files (dir files _default-state update-function) 614(defun vc-hg-dir-status-files (dir files _default-state update-function)
631 (apply 'vc-hg-command (current-buffer) 'async dir "status" "-C" files) 615 (apply 'vc-hg-command (current-buffer) 'async dir "status" "-C" files)
632 (vc-exec-after 616 (vc-run-delayed
633 `(vc-hg-after-dir-status (quote ,update-function)))) 617 (vc-hg-after-dir-status update-function)))
634 618
635(defun vc-hg-dir-extra-header (name &rest commands) 619(defun vc-hg-dir-extra-header (name &rest commands)
636 (concat (propertize name 'face 'font-lock-type-face) 620 (concat (propertize name 'face 'font-lock-type-face)
@@ -724,7 +708,8 @@ then attempts to update the working directory."
724 args (cddr args))) 708 args (cddr args)))
725 (apply 'vc-do-async-command buffer root hg-program 709 (apply 'vc-do-async-command buffer root hg-program
726 command args) 710 command args)
727 (with-current-buffer buffer (vc-exec-after '(vc-compilation-mode 'hg))) 711 (with-current-buffer buffer
712 (vc-run-delayed (vc-compilation-mode 'hg)))
728 (vc-set-async-update buffer))))) 713 (vc-set-async-update buffer)))))
729 714
730(defun vc-hg-merge-branch () 715(defun vc-hg-merge-branch ()
@@ -733,7 +718,7 @@ This runs the command \"hg merge\"."
733 (let* ((root (vc-hg-root default-directory)) 718 (let* ((root (vc-hg-root default-directory))
734 (buffer (format "*vc-hg : %s*" (expand-file-name root)))) 719 (buffer (format "*vc-hg : %s*" (expand-file-name root))))
735 (apply 'vc-do-async-command buffer root vc-hg-program '("merge")) 720 (apply 'vc-do-async-command buffer root vc-hg-program '("merge"))
736 (with-current-buffer buffer (vc-exec-after '(vc-compilation-mode 'hg))) 721 (with-current-buffer buffer (vc-run-delayed (vc-compilation-mode 'hg)))
737 (vc-set-async-update buffer))) 722 (vc-set-async-update buffer)))
738 723
739;;; Internal functions 724;;; Internal functions
diff --git a/lisp/vc/vc-mtn.el b/lisp/vc/vc-mtn.el
index 29996fafe92..56536a26b41 100644
--- a/lisp/vc/vc-mtn.el
+++ b/lisp/vc/vc-mtn.el
@@ -128,8 +128,8 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
128 128
129(defun vc-mtn-dir-status (dir update-function) 129(defun vc-mtn-dir-status (dir update-function)
130 (vc-mtn-command (current-buffer) 'async dir "status") 130 (vc-mtn-command (current-buffer) 'async dir "status")
131 (vc-exec-after 131 (vc-run-delayed
132 `(vc-mtn-after-dir-status (quote ,update-function)))) 132 (vc-mtn-after-dir-status update-function)))
133 133
134(defun vc-mtn-working-revision (file) 134(defun vc-mtn-working-revision (file)
135 ;; If `mtn' fails or returns status>0, or if the search fails, just 135 ;; If `mtn' fails or returns status>0, or if the search fails, just
diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el
index e85494b2156..ef1ae8294b2 100644
--- a/lisp/vc/vc-rcs.el
+++ b/lisp/vc/vc-rcs.el
@@ -1,4 +1,4 @@
1;;; vc-rcs.el --- support for RCS version-control 1;;; vc-rcs.el --- support for RCS version-control -*- lexical-binding:t -*-
2 2
3;; Copyright (C) 1992-2013 Free Software Foundation, Inc. 3;; Copyright (C) 1992-2013 Free Software Foundation, Inc.
4 4
@@ -520,7 +520,7 @@ expanded to all registered subfiles in them."
520 ;; No, it was some other error: re-signal it. 520 ;; No, it was some other error: re-signal it.
521 (signal (car err) (cdr err))))))))) 521 (signal (car err) (cdr err)))))))))
522 522
523(defun vc-rcs-revert (file &optional contents-done) 523(defun vc-rcs-revert (file &optional _contents-done)
524 "Revert FILE to the version it was based on. If FILE is a directory, 524 "Revert FILE to the version it was based on. If FILE is a directory,
525revert all registered files beneath it." 525revert all registered files beneath it."
526 (if (file-directory-p file) 526 (if (file-directory-p file)
@@ -571,8 +571,8 @@ directory the operation is applied to all registered files beneath it."
571 (when (looking-at "[\b\t\n\v\f\r ]+") 571 (when (looking-at "[\b\t\n\v\f\r ]+")
572 (delete-char (- (match-end 0) (match-beginning 0)))))) 572 (delete-char (- (match-end 0) (match-beginning 0))))))
573 573
574(defun vc-rcs-print-log (files buffer &optional shortlog 574(defun vc-rcs-print-log (files buffer &optional _shortlog
575 start-revision-ignored limit) 575 _start-revision-ignored limit)
576 "Print commit log associated with FILES into specified BUFFER. 576 "Print commit log associated with FILES into specified BUFFER.
577Remaining arguments are ignored. 577Remaining arguments are ignored.
578If FILE is a directory the operation is applied to all registered 578If FILE is a directory the operation is applied to all registered
@@ -853,7 +853,7 @@ systime, or nil if there is none. Also, reposition point."
853 (string-match "[0-9]+\\'" rev) 853 (string-match "[0-9]+\\'" rev)
854 (substring rev (match-beginning 0) (match-end 0))) 854 (substring rev (match-beginning 0) (match-end 0)))
855 855
856(defun vc-rcs-previous-revision (file rev) 856(defun vc-rcs-previous-revision (_file rev)
857 "Return the revision number immediately preceding REV for FILE, 857 "Return the revision number immediately preceding REV for FILE,
858or nil if there is no previous revision. This default 858or nil if there is no previous revision. This default
859implementation works for MAJOR.MINOR-style revision numbers as 859implementation works for MAJOR.MINOR-style revision numbers as
@@ -1440,8 +1440,8 @@ The `:insn' key is a keyword to distinguish it as a vc-rcs.el extension."
1440 ;; only the former since it behaves identically to the 1440 ;; only the former since it behaves identically to the
1441 ;; latter in the absence of "@@".) 1441 ;; latter in the absence of "@@".)
1442 sub) 1442 sub)
1443 (cl-flet ((incg (beg end) 1443 (cl-flet ((incg (_beg end)
1444 (let ((b beg) (e end) @-holes) 1444 (let ((e end) @-holes)
1445 (while (and asc (< (car asc) e)) 1445 (while (and asc (< (car asc) e))
1446 (push (pop asc) @-holes)) 1446 (push (pop asc) @-holes))
1447 ;; Self-deprecate when work is done. 1447 ;; Self-deprecate when work is done.
diff --git a/lisp/vc/vc-sccs.el b/lisp/vc/vc-sccs.el
index 7bce1ea3ba6..e00d55218c8 100644
--- a/lisp/vc/vc-sccs.el
+++ b/lisp/vc/vc-sccs.el
@@ -1,4 +1,4 @@
1;;; vc-sccs.el --- support for SCCS version-control 1;;; vc-sccs.el --- support for SCCS version-control -*- lexical-binding:t -*-
2 2
3;; Copyright (C) 1992-2013 Free Software Foundation, Inc. 3;; Copyright (C) 1992-2013 Free Software Foundation, Inc.
4 4
@@ -101,7 +101,7 @@ For a description of possible values, see `vc-check-master-templates'."
101;;; Properties of the backend 101;;; Properties of the backend
102 102
103(defun vc-sccs-revision-granularity () 'file) 103(defun vc-sccs-revision-granularity () 'file)
104(defun vc-sccs-checkout-model (files) 'locking) 104(defun vc-sccs-checkout-model (_files) 'locking)
105 105
106;;; 106;;;
107;;; State-querying functions 107;;; State-querying functions
@@ -321,7 +321,7 @@ are expanded to all version-controlled subfiles."
321 (vc-name file) (concat "-r" discard)) 321 (vc-name file) (concat "-r" discard))
322 (vc-sccs-do-command nil 0 "get" (vc-name file) nil)))) 322 (vc-sccs-do-command nil 0 "get" (vc-name file) nil))))
323 323
324(defun vc-sccs-revert (file &optional contents-done) 324(defun vc-sccs-revert (file &optional _contents-done)
325 "Revert FILE to the version it was based on. If FILE is a directory, 325 "Revert FILE to the version it was based on. If FILE is a directory,
326revert all subfiles." 326revert all subfiles."
327 (if (file-directory-p file) 327 (if (file-directory-p file)
@@ -353,7 +353,7 @@ revert all subfiles."
353;;; History functions 353;;; History functions
354;;; 354;;;
355 355
356(defun vc-sccs-print-log (files buffer &optional shortlog start-revision-ignored limit) 356(defun vc-sccs-print-log (files buffer &optional _shortlog _start-revision-ignored limit)
357 "Print commit log associated with FILES into specified BUFFER. 357 "Print commit log associated with FILES into specified BUFFER.
358Remaining arguments are ignored." 358Remaining arguments are ignored."
359 (setq files (vc-expand-dirs files)) 359 (setq files (vc-expand-dirs files))
@@ -363,6 +363,8 @@ Remaining arguments are ignored."
363(autoload 'vc-setup-buffer "vc-dispatcher") 363(autoload 'vc-setup-buffer "vc-dispatcher")
364(autoload 'vc-delistify "vc-dispatcher") 364(autoload 'vc-delistify "vc-dispatcher")
365 365
366(defvar w32-quote-process-args)
367
366;; FIXME use sccsdiff if present? 368;; FIXME use sccsdiff if present?
367(defun vc-sccs-diff (files &optional oldvers newvers buffer) 369(defun vc-sccs-diff (files &optional oldvers newvers buffer)
368 "Get a difference report using SCCS between two filesets." 370 "Get a difference report using SCCS between two filesets."
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el
index 0e020614fd2..afc76c09742 100644
--- a/lisp/vc/vc-svn.el
+++ b/lisp/vc/vc-svn.el
@@ -1,4 +1,4 @@
1;;; vc-svn.el --- non-resident support for Subversion version-control 1;;; vc-svn.el --- non-resident support for Subversion version-control -*- lexical-binding:t -*-
2 2
3;; Copyright (C) 2003-2013 Free Software Foundation, Inc. 3;; Copyright (C) 2003-2013 Free Software Foundation, Inc.
4 4
@@ -115,7 +115,7 @@ If you want to force an empty list of arguments, use t."
115;;; Properties of the backend 115;;; Properties of the backend
116 116
117(defun vc-svn-revision-granularity () 'repository) 117(defun vc-svn-revision-granularity () 'repository)
118(defun vc-svn-checkout-model (files) 'implicit) 118(defun vc-svn-checkout-model (_files) 'implicit)
119 119
120;;; 120;;;
121;;; State-querying functions 121;;; State-querying functions
@@ -231,13 +231,13 @@ RESULT is a list of conses (FILE . STATE) for directory DIR."
231 (remote (or t (not local) (eq local 'only-file)))) 231 (remote (or t (not local) (eq local 'only-file))))
232 (vc-svn-command (current-buffer) 'async nil "status" 232 (vc-svn-command (current-buffer) 'async nil "status"
233 (if remote "-u")) 233 (if remote "-u"))
234 (vc-exec-after 234 (vc-run-delayed
235 `(vc-svn-after-dir-status (quote ,callback) ,remote)))) 235 (vc-svn-after-dir-status callback remote))))
236 236
237(defun vc-svn-dir-status-files (dir files default-state callback) 237(defun vc-svn-dir-status-files (dir files _default-state callback)
238 (apply 'vc-svn-command (current-buffer) 'async nil "status" files) 238 (apply 'vc-svn-command (current-buffer) 'async nil "status" files)
239 (vc-exec-after 239 (vc-run-delayed
240 `(vc-svn-after-dir-status (quote ,callback)))) 240 (vc-svn-after-dir-status callback)))
241 241
242(defun vc-svn-dir-extra-headers (dir) 242(defun vc-svn-dir-extra-headers (dir)
243 "Generate extra status headers for a Subversion working copy." 243 "Generate extra status headers for a Subversion working copy."
@@ -268,7 +268,7 @@ RESULT is a list of conses (FILE . STATE) for directory DIR."
268;; vc-svn-mode-line-string doesn't exist because the default implementation 268;; vc-svn-mode-line-string doesn't exist because the default implementation
269;; works just fine. 269;; works just fine.
270 270
271(defun vc-svn-previous-revision (file rev) 271(defun vc-svn-previous-revision (_file rev)
272 (let ((newrev (1- (string-to-number rev)))) 272 (let ((newrev (1- (string-to-number rev))))
273 (when (< 0 newrev) 273 (when (< 0 newrev)
274 (number-to-string newrev)))) 274 (number-to-string newrev))))
@@ -298,7 +298,7 @@ RESULT is a list of conses (FILE . STATE) for directory DIR."
298 298
299(autoload 'vc-switches "vc") 299(autoload 'vc-switches "vc")
300 300
301(defun vc-svn-register (files &optional rev comment) 301(defun vc-svn-register (files &optional _rev _comment)
302 "Register FILES into the SVN version-control system. 302 "Register FILES into the SVN version-control system.
303The COMMENT argument is ignored This does an add but not a commit. 303The COMMENT argument is ignored This does an add but not a commit.
304Passes either `vc-svn-register-switches' or `vc-register-switches' 304Passes either `vc-svn-register-switches' or `vc-register-switches'
@@ -314,7 +314,7 @@ to the SVN command."
314 "Return non-nil if FILE could be registered in SVN. 314 "Return non-nil if FILE could be registered in SVN.
315This is only possible if SVN is responsible for FILE's directory.") 315This is only possible if SVN is responsible for FILE's directory.")
316 316
317(defun vc-svn-checkin (files rev comment &optional extra-args-ignored) 317(defun vc-svn-checkin (files rev comment &optional _extra-args-ignored)
318 "SVN-specific version of `vc-backend-checkin'." 318 "SVN-specific version of `vc-backend-checkin'."
319 (if rev (error "Committing to a specific revision is unsupported in SVN")) 319 (if rev (error "Committing to a specific revision is unsupported in SVN"))
320 (let ((status (apply 320 (let ((status (apply
@@ -354,11 +354,10 @@ This is only possible if SVN is responsible for FILE's directory.")
354 354
355(defun vc-svn-ignore (file &optional directory remove) 355(defun vc-svn-ignore (file &optional directory remove)
356 "Ignore FILE under Subversion. 356 "Ignore FILE under Subversion.
357If DIRECTORY is non-nil, the repository to use will be deduced by 357FILE is a file wildcard, relative to the root directory of DIRECTORY."
358DIRECTORY; if REMOVE is non-nil, remove FILE from ignored files."
359 (vc-svn-command t 0 file "propedit" "svn:ignore")) 358 (vc-svn-command t 0 file "propedit" "svn:ignore"))
360 359
361(defun vc-svn-ignore-completion-table (file) 360(defun vc-svn-ignore-completion-table (_file)
362 "Return the list of ignored files." 361 "Return the list of ignored files."
363 ) 362 )
364 363
@@ -369,7 +368,7 @@ DIRECTORY; if REMOVE is non-nil, remove FILE from ignored files."
369 (vc-mode-line file 'SVN) 368 (vc-mode-line file 'SVN)
370 (message "Checking out %s...done" file)) 369 (message "Checking out %s...done" file))
371 370
372(defun vc-svn-update (file editable rev switches) 371(defun vc-svn-update (file _editable rev switches)
373 (if (and (file-exists-p file) (not rev)) 372 (if (and (file-exists-p file) (not rev))
374 ;; If no revision was specified, there's nothing to do. 373 ;; If no revision was specified, there's nothing to do.
375 nil 374 nil
@@ -458,7 +457,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
458 (error "Couldn't analyze svn update result"))) 457 (error "Couldn't analyze svn update result")))
459 (message "Merging changes into %s...done" file)))) 458 (message "Merging changes into %s...done" file))))
460 459
461(defun vc-svn-modify-change-comment (files rev comment) 460(defun vc-svn-modify-change-comment (_files rev comment)
462 "Modify the change comments for a specified REV. 461 "Modify the change comments for a specified REV.
463You must have ssh access to the repository host, and the directory Emacs 462You must have ssh access to the repository host, and the directory Emacs
464uses locally for temp files must also be writable by you on that host. 463uses locally for temp files must also be writable by you on that host.
@@ -510,7 +509,7 @@ or svn+ssh://."
510 509
511(autoload 'vc-setup-buffer "vc-dispatcher") 510(autoload 'vc-setup-buffer "vc-dispatcher")
512 511
513(defun vc-svn-print-log (files buffer &optional shortlog start-revision limit) 512(defun vc-svn-print-log (files buffer &optional _shortlog start-revision limit)
514 "Print commit log associated with FILES into specified BUFFER. 513 "Print commit log associated with FILES into specified BUFFER.
515SHORTLOG is ignored. 514SHORTLOG is ignored.
516If START-REVISION is non-nil, it is the newest revision to show. 515If START-REVISION is non-nil, it is the newest revision to show.
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 35e91e7e059..39e3fbdc29a 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -497,11 +497,14 @@
497;; This function is used in `vc-stay-local-p' which backends can use 497;; This function is used in `vc-stay-local-p' which backends can use
498;; for their convenience. 498;; for their convenience.
499;; 499;;
500;; - ignore (file &optional remove) 500;; - ignore (file &optional directory)
501;; 501;;
502;; Ignore FILE under the current VCS. When called interactively and 502;; Ignore FILE under the VCS of DIRECTORY (default is `default-directory').
503;; with a prefix argument, remove an ignored file. When called from 503;; FILE is a file wildcard.
504;; Lisp code, if REMOVE is non-nil, remove FILE from ignored files." 504;; When called interactively and with a prefix argument, remove FILE
505;; from ignored files.
506;; When called from Lisp code, if DIRECTORY is non-nil, the
507;; repository to use will be deduced by DIRECTORY.
505;; 508;;
506;; - ignore-completion-table 509;; - ignore-completion-table
507;; 510;;
@@ -1342,33 +1345,44 @@ first backend that could register the file is used."
1342 (let ((vc-handled-backends (list backend))) 1345 (let ((vc-handled-backends (list backend)))
1343 (call-interactively 'vc-register))) 1346 (call-interactively 'vc-register)))
1344 1347
1345(defun vc-ignore (file &optional directory remove) 1348(defun vc-ignore (file &optional directory)
1346 "Ignore FILE under the VCS of DIRECTORY (default is `default-directory'). 1349 "Ignore FILE under the VCS of DIRECTORY (default is `default-directory').
1350FILE is a file wildcard.
1347When called interactively and with a prefix argument, remove FILE 1351When called interactively and with a prefix argument, remove FILE
1348from ignored files. 1352from ignored files.
1349When called from Lisp code, if DIRECTORY is non-nil, the 1353When called from Lisp code, if DIRECTORY is non-nil, the
1350repository to use will be deduced by DIRECTORY; if REMOVE is 1354repository to use will be deduced by DIRECTORY."
1351non-nil, remove FILE from ignored files."
1352 (interactive 1355 (interactive
1353 (if (null current-prefix-arg) 1356 (list (read-file-name "The file to ignore: ")
1354 (list (read-file-name "The file to ignore: ")) 1357 (completing-read
1355 (list 1358 "The file to remove: "
1356 (completing-read 1359 (vc-call-backend
1357 "The file to remove: " 1360 (vc-backend default-directory)
1358 (vc-call-backend 1361 'ignore-completion-table default-directory))))
1359 (vc-backend default-directory) 1362 (let* ((directory (or directory default-directory))
1360 'ignore-completion-table default-directory))))) 1363 (backend (vc-backend default-directory))
1361 (let (backend) 1364 (remove current-prefix-arg))
1362 (if directory 1365 (vc-call-backend backend 'ignore file directory remove)))
1363 (progn (setq backend (vc-backend default-directory)) 1366
1364 (vc-call-backend backend 'ignore file directory remove)) 1367(defun vc-default-ignore (backend file &optional directory remove)
1365 (setq backend (vc-backend directory)) 1368 "Ignore FILE under the VCS of DIRECTORY (default is `default-directory').
1366 (vc-call-backend backend 'ignore file default-directory remove)))) 1369FILE is a file wildcard, relative to the root directory of DIRECTORY.
1367 1370When called from Lisp code, if DIRECTORY is non-nil, the
1368(defun vc-default-ignore-completion-table (_file) 1371repository to use will be deduced by DIRECTORY; if REMOVE is
1369 "Return the list of ignored files." 1372non-nil, remove FILE from ignored files.
1370 ;; Unused lexical argument `file' 1373Argument BACKEND is the backend you are using."
1371 nil) 1374 (let ((ignore
1375 (vc-call-backend backend 'find-ignore-file (or directory default-directory)))
1376 (pattern (file-relative-name
1377 (expand-file-name file) (file-name-directory file))))
1378 (if remove
1379 (vc--remove-regexp pattern ignore)
1380 (vc--add-line pattern ignore))))
1381
1382(defun vc-default-ignore-completion-table (backend file)
1383 "Return the list of ignored files under BACKEND."
1384 (vc--read-lines
1385 (vc-call-backend backend 'find-ignore-file file)))
1372 1386
1373(defun vc--read-lines (file) 1387(defun vc--read-lines (file)
1374 "Return a list of lines of FILE." 1388 "Return a list of lines of FILE."
@@ -1522,11 +1536,11 @@ Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'."
1522;; (vc-file-tree-walk 1536;; (vc-file-tree-walk
1523;; default-directory 1537;; default-directory
1524;; (lambda (f) 1538;; (lambda (f)
1525;; (vc-exec-after 1539;; (vc-run-delayed
1526;; `(let ((coding-system-for-read (vc-coding-system-for-diff ',f))) 1540;; (let ((coding-system-for-read (vc-coding-system-for-diff f)))
1527;; (message "Looking at %s" ',f) 1541;; (message "Looking at %s" f)
1528;; (vc-call-backend ',(vc-backend f) 1542;; (vc-call-backend (vc-backend f)
1529;; 'diff (list ',f) ',rev1 ',rev2)))))) 1543;; 'diff (list f) rev1 rev2))))))
1530 1544
1531(defvar vc-coding-system-inherit-eol t 1545(defvar vc-coding-system-inherit-eol t
1532 "When non-nil, inherit the EOL format for reading Diff output from the file. 1546 "When non-nil, inherit the EOL format for reading Diff output from the file.
@@ -1664,8 +1678,8 @@ Return t if the buffer had changes, nil otherwise."
1664 (diff-mode) 1678 (diff-mode)
1665 (set (make-local-variable 'diff-vc-backend) (car vc-fileset)) 1679 (set (make-local-variable 'diff-vc-backend) (car vc-fileset))
1666 (set (make-local-variable 'revert-buffer-function) 1680 (set (make-local-variable 'revert-buffer-function)
1667 `(lambda (ignore-auto noconfirm) 1681 (lambda (_ignore-auto _noconfirm)
1668 (vc-diff-internal ,async ',vc-fileset ,rev1 ,rev2 ,verbose))) 1682 (vc-diff-internal async vc-fileset rev1 rev2 verbose)))
1669 ;; Make the *vc-diff* buffer read only, the diff-mode key 1683 ;; Make the *vc-diff* buffer read only, the diff-mode key
1670 ;; bindings are nicer for read only buffers. pcl-cvs does the 1684 ;; bindings are nicer for read only buffers. pcl-cvs does the
1671 ;; same thing. 1685 ;; same thing.
@@ -1681,8 +1695,8 @@ Return t if the buffer had changes, nil otherwise."
1681 ;; The diff process may finish early, so call `vc-diff-finish' 1695 ;; The diff process may finish early, so call `vc-diff-finish'
1682 ;; after `pop-to-buffer'; the former assumes the diff buffer is 1696 ;; after `pop-to-buffer'; the former assumes the diff buffer is
1683 ;; shown in some window. 1697 ;; shown in some window.
1684 (vc-exec-after `(vc-diff-finish ,(current-buffer) 1698 (let ((buf (current-buffer)))
1685 ',(when verbose messages))) 1699 (vc-run-delayed (vc-diff-finish buf (when verbose messages))))
1686 ;; In the async case, we return t even if there are no differences 1700 ;; In the async case, we return t even if there are no differences
1687 ;; because we don't know that yet. 1701 ;; because we don't know that yet.
1688 t))) 1702 t)))
@@ -2216,6 +2230,7 @@ earlier revisions. Show up to LIMIT entries (non-nil means unlimited)."
2216(defvar vc-log-view-type nil 2230(defvar vc-log-view-type nil
2217 "Set this to differentiate the different types of logs.") 2231 "Set this to differentiate the different types of logs.")
2218(put 'vc-log-view-type 'permanent-local t) 2232(put 'vc-log-view-type 'permanent-local t)
2233(defvar vc-sentinel-movepoint)
2219 2234
2220(defun vc-log-internal-common (backend 2235(defun vc-log-internal-common (backend
2221 buffer-name 2236 buffer-name
@@ -2238,13 +2253,13 @@ earlier revisions. Show up to LIMIT entries (non-nil means unlimited)."
2238 (set (make-local-variable 'log-view-vc-fileset) files) 2253 (set (make-local-variable 'log-view-vc-fileset) files)
2239 (set (make-local-variable 'revert-buffer-function) 2254 (set (make-local-variable 'revert-buffer-function)
2240 rev-buff-func)) 2255 rev-buff-func))
2241 (vc-exec-after 2256 (vc-run-delayed
2242 `(let ((inhibit-read-only t)) 2257 (let ((inhibit-read-only t))
2243 (funcall ',setup-buttons-func ',backend ',files ',retval) 2258 (funcall setup-buttons-func backend files retval)
2244 (shrink-window-if-larger-than-buffer) 2259 (shrink-window-if-larger-than-buffer)
2245 (funcall ',goto-location-func ',backend) 2260 (funcall goto-location-func backend)
2246 (setq vc-sentinel-movepoint (point)) 2261 (setq vc-sentinel-movepoint (point))
2247 (set-buffer-modified-p nil))))) 2262 (set-buffer-modified-p nil)))))
2248 2263
2249(defun vc-incoming-outgoing-internal (backend remote-location buffer-name type) 2264(defun vc-incoming-outgoing-internal (backend remote-location buffer-name type)
2250 (vc-log-internal-common 2265 (vc-log-internal-common
diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog
index a9e424ac4b3..5a1018f85e5 100644
--- a/lwlib/ChangeLog
+++ b/lwlib/ChangeLog
@@ -1,3 +1,9 @@
12013-09-04 Paul Eggert <eggert@cs.ucla.edu>
2
3 Makefile improvements.
4 * Makefile.in (all): Put this first. Don't use double-colon
5 rules, as they are not portable according to POSIX. Mark as phony.
6
12013-06-30 Paul Eggert <eggert@cs.ucla.edu> 72013-06-30 Paul Eggert <eggert@cs.ucla.edu>
2 8
3 Fix minor problems found by static checking. 9 Fix minor problems found by static checking.
diff --git a/lwlib/Makefile.in b/lwlib/Makefile.in
index f228221c45d..40f4a405e97 100644
--- a/lwlib/Makefile.in
+++ b/lwlib/Makefile.in
@@ -59,11 +59,12 @@ ALL_CFLAGS= $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \
59 -Demacs -I../src \ 59 -Demacs -I../src \
60 -I$(srcdir) -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib 60 -I$(srcdir) -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib
61 61
62all: liblw.a
63.PHONY: all
64
62.c.o: 65.c.o:
63 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< 66 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
64 67
65all:: liblw.a
66
67liblw.a: $(OBJS) 68liblw.a: $(OBJS)
68 rm -f $@ 69 rm -f $@
69 $(AR) $(ARFLAGS) $@ $(OBJS) 70 $(AR) $(ARFLAGS) $@ $(OBJS)
diff --git a/make-dist b/make-dist
index ed53f933de3..513664c86e8 100755
--- a/make-dist
+++ b/make-dist
@@ -404,7 +404,7 @@ echo "Making links to \`nt'"
404 ln config.nt emacsclient.rc emacs-src.tags ../${tempdir}/nt 404 ln config.nt emacsclient.rc emacs-src.tags ../${tempdir}/nt
405 ln nmake.defs gmake.defs subdirs.el [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt 405 ln nmake.defs gmake.defs subdirs.el [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt
406 ln Makefile.in gnulib.mk ../${tempdir}/nt 406 ln Makefile.in gnulib.mk ../${tempdir}/nt
407 ln msysconfig.sh mingw-cfg.site epaths.nt INSTALL.MSYS ../${tempdir}/nt 407 ln msysconfig.sh mingw-cfg.site epaths.nt INSTALL.OLD ../${tempdir}/nt
408 ln ChangeLog INSTALL README README.W32 makefile.w32-in ../${tempdir}/nt) 408 ln ChangeLog INSTALL README README.W32 makefile.w32-in ../${tempdir}/nt)
409 409
410echo "Making links to \`nt/inc' and its subdirectories" 410echo "Making links to \`nt/inc' and its subdirectories"
diff --git a/nextstep/ChangeLog b/nextstep/ChangeLog
index d76d832555c..42086ec1007 100644
--- a/nextstep/ChangeLog
+++ b/nextstep/ChangeLog
@@ -1,3 +1,13 @@
12013-09-02 Jan Djärv <jan.h.d@swipnet.se>
2
3 * Makefile.in (${ns_check_file}): Add so Emacs.app gets properly
4 updated when doing parallel make install.
5
62013-08-28 Paul Eggert <eggert@cs.ucla.edu>
7
8 * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
9 for portability to hosts where /bin/sh has problems.
10
12013-06-02 Jan Djärv <jan.h.d@swipnet.se> 112013-06-02 Jan Djärv <jan.h.d@swipnet.se>
2 12
3 * templates/Info-gnustep.plist.in: Add NSDocumentClass EmacsDocument. 13 * templates/Info-gnustep.plist.in: Add NSDocumentClass EmacsDocument.
diff --git a/nextstep/Makefile.in b/nextstep/Makefile.in
index feeafc0d694..3d80ddb7ad2 100644
--- a/nextstep/Makefile.in
+++ b/nextstep/Makefile.in
@@ -20,7 +20,7 @@
20### Commentary: 20### Commentary:
21 21
22### Code: 22### Code:
23SHELL = /bin/sh 23SHELL = @SHELL@
24 24
25srcdir = @srcdir@ 25srcdir = @srcdir@
26EXEEXT = @EXEEXT@ 26EXEEXT = @EXEEXT@
@@ -31,8 +31,9 @@ MKDIR_P = @MKDIR_P@
31ns_appdir = @ns_appdir@ 31ns_appdir = @ns_appdir@
32ns_appbindir = @ns_appbindir@ 32ns_appbindir = @ns_appbindir@
33ns_appsrc = @ns_appsrc@ 33ns_appsrc = @ns_appsrc@
34ns_check_file = @ns_appdir@/@ns_check_file@
34 35
35${ns_appdir}: ${srcdir}/${ns_appsrc} ${ns_appsrc} 36${ns_check_file} ${ns_appdir}: ${srcdir}/${ns_appsrc} ${ns_appsrc}
36 rm -rf ${ns_appdir} 37 rm -rf ${ns_appdir}
37 ${MKDIR_P} ${ns_appdir} 38 ${MKDIR_P} ${ns_appdir}
38 ( cd ${srcdir}/${ns_appsrc} ; tar cfh - . ) | \ 39 ( cd ${srcdir}/${ns_appsrc} ; tar cfh - . ) | \
@@ -42,7 +43,7 @@ ${ns_appdir}: ${srcdir}/${ns_appsrc} ${ns_appsrc}
42 ( cd ${ns_appdir} ; umask 022; tar xf - ) 43 ( cd ${ns_appdir} ; umask 022; tar xf - )
43 touch ${ns_appdir} 44 touch ${ns_appdir}
44 45
45${ns_appbindir}/Emacs: ${ns_appdir} ../src/emacs${EXEEXT} 46${ns_appbindir}/Emacs: ${ns_appdir} ${ns_check_file} ../src/emacs${EXEEXT}
46 ${MKDIR_P} ${ns_appbindir} 47 ${MKDIR_P} ${ns_appbindir}
47 cp -f ../src/emacs${EXEEXT} ${ns_appbindir}/Emacs 48 cp -f ../src/emacs${EXEEXT} ${ns_appbindir}/Emacs
48 49
diff --git a/nt/ChangeLog b/nt/ChangeLog
index ebc823071a3..e7d9ed99e3c 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,3 +1,9 @@
12013-08-31 Glenn Morris <rgm@gnu.org>
2
3 * INSTALL: Rename from INSTALL.MSYS.
4 * INSTALL.OLD: Rename from INSTALL.
5 * configure.bat: Update for INSTALL name changes.
6
12013-08-25 Vincent Belaïche <vincentb1@users.sourceforge.net> 72013-08-25 Vincent Belaïche <vincentb1@users.sourceforge.net>
2 8
3 * configure.bat: Rather than disabling, make configure.bat produce 9 * configure.bat: Rather than disabling, make configure.bat produce
diff --git a/nt/INSTALL b/nt/INSTALL
index 594ff9ff752..be36014e3b2 100644
--- a/nt/INSTALL
+++ b/nt/INSTALL
@@ -1,298 +1,495 @@
1 Building and Installing Emacs on Windows 1 Building and Installing Emacs on MS-Windows
2 (from 95 to 7 and beyond) 2 using the MSYS and MinGW tools
3 3
4 Copyright (C) 2001-2013 Free Software Foundation, Inc. 4 Copyright (C) 2013 Free Software Foundation, Inc.
5 See the end of the file for license conditions. 5 See the end of the file for license conditions.
6 6
7*** This method of building Emacs is no longer supported. *** 7The MSYS/MinGW build described here is supported on versions of
8 Instead, see INSTALL.MSYS. 8Windows starting with Windows 2000 and newer. Windows 9X are not
9supported (but the Emacs binary produced by this build will run on
10Windows 9X as well).
9 11
10* For the impatient 12* For the brave (a.k.a. "impatient"):
11 13
12 Here are the concise instructions for configuring and building the 14 For those who have a working MSYS/MinGW development environment and
13 native Windows binary of Emacs, for those who want to skip the 15 are comfortable with running Posix configure scripts, here are the
14 complex explanations and ``just do it'': 16 concise instructions for configuring and building the native Windows
17 binary of Emacs with these tools.
15 18
16 Do not use this recipe with Cygwin. For building on Cygwin, 19 Do not use this recipe with Cygwin. For building on Cygwin, use the
17 use the normal installation instructions, ../INSTALL. 20 normal installation instructions, ../INSTALL.
18 21
19 Do not use these instructions with MSYS environment. For building 22 0. Start the MSYS Bash window. Everything else below is done from
20 the native Windows binary with MinGW and MSYS, follow the 23 that window's Bash prompt.
21 instructions in the file INSTALL.MSYS in this directory.
22 24
23 For building without MSYS, if you have a Cygwin or MSYS port of Bash 25 0a. If you are building from the development trunk (as opposed to a
24 on your Path, you will be better off removing it from PATH. (For 26 release tarball), produce the configure script, by typing from
25 details, search for "MSYS sh.exe" below.) 27 the top-level Emacs source directory:
26 28
27 1. Change to the `nt' directory (the directory of this file): 29 ./autogen.sh
28 30
29 cd nt 31 1. If you want to build Emacs outside of the source tree
32 (recommended), create the build directory and chdir there.
30 33
31 2. Run configure.bat. 34 2. Invoke the MSYS-specific configure script:
32 35
33 2a.If you use MSVC, set up the build environment by running the 36 - If you are building outside the source tree:
34 SetEnv.cmd batch file from the appropriate SDK directory. (Skip
35 this step if you are using MinGW.) For example:
36 37
37 "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86 /Debug 38 /PATH/TO/EMACS/SOURCE/TREE/nt/msysconfig.sh --prefix=PREFIX ...
38 39
39 if you are going to compile a debug version, or 40 - If you are building in-place, i.e. inside the source tree:
40 41
41 "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86 /Release 42 ./nt/msysconfig.sh --prefix=PREFIX ...
42 43
43 if you are going to compile an optimized version. 44 It is always preferable to use --prefix to configure Emacs for
45 some specific location of its installed tree; the default
46 /usr/local is not suitable for Windows (see the detailed
47 instructions for the reasons).
44 48
45 2b.From the COMMAND.COM/CMD.EXE command prompt type: 49 You can pass other options to the configure script. Here's a
50 typical example (for an in-place debug build):
46 51
47 configure 52 CPPFLAGS='-DGLYPH_DEBUG=1' CFLAGS='-O0 -g3' ./nt/msysconfig.sh --prefix=/d/usr/emacs --enable-checking
48 53
49 From a Unixy shell prompt: 54 3. After the configure script finishes, it should display the
55 resulting configuration. After that, type
50 56
51 cmd /c configure.bat 57 make
52 or
53 command.com /c configure.bat
54 58
55 3. Run the Make utility suitable for your environment. If you build 59 Use "make -j N" if your MSYS Make supports parallel execution;
56 with the Microsoft's Visual C compiler: 60 the build will take significantly less time in that case. Here N
61 is the number of simultaneous parallel jobs; use the number of
62 the cores on your system.
57 63
58 nmake 64 4. Install the produced binaries:
59 65
60 For the development environments based on GNU GCC (MinGW, MSYS, 66 make install
61 Cygwin - but see notes about Cygwin make below), depending on how
62 Make is called, it could be:
63 67
64 make 68 If you want the installation tree to go to a place that is
65 or 69 different from the one specified by --prefix, say
66 mingw32-make
67 or
68 gnumake
69 or
70 gmake
71 70
72 (If you are building from Bazaar, say "make bootstrap" or "nmake 71 make install prefix=/where/ever/you/want
73 bootstrap" instead, and avoid using Cygwin make.)
74 72
75 With GNU Make, you can use the -j command-line option to have 73 That's it!
76 Make execute several commands at once, like this:
77 74
78 gmake -j 2 75 If these short instructions somehow fail, read the rest of this
76 file.
79 77
80 (With versions of GNU Make before 3.82, you need also set the 78* Installing MinGW and MSYS
81 XMFLAGS variable, like this:
82 79
83 gmake -j 2 XMFLAGS="-j 2" 80 Make sure you carefully read the following two sections in their
81 entirety and install/configure the various packages as instructed.
82 A correct installation makes all the rest almost trivial; a botched
83 installation will likely make you miserable for quite some time.
84 84
85 The XMFLAGS variable overrides the default behavior of version 85 There are two alternative to installing MinGW + MSYS: using the GUI
86 3.82 and older of GNU Make on Windows, whereby recursive Make 86 installer, called mingw-get, provided by the MinGW project, or
87 invocations reset the maximum number of simultaneous commands to 87 manual installation. The next two sections describe each one of
88 1. The above command allows up to 4 simultaneous commands at 88 these.
89 once in the top-level Make, and up to 3 in each one of the
90 recursive Make's.)
91 89
92 4. Generate the Info manuals (only if you are building out of Bazaar, 90** Installing MinGW and MSYS using mingw-get
93 and if you have makeinfo.exe installed):
94 91
95 make info 92 A nice installer, called mingw-get, is available for those who don't
93 like to mess with manual installations. You can download it from
94 here:
96 95
97 (change "make" to "nmake" if you use MSVC). 96 https://sourceforge.net/projects/mingw/files/Installer/mingw-get/
98 97
99 5. Install the produced binaries: 98 (This installer only supports packages downloaded from the MinGW
99 site; for the rest you will still need the manual method.)
100 100
101 make install 101 After installing mingw-get, invoke it to install the packages that
102 are already selected by default on the "Select Components" screen of
103 its wizard.
102 104
103 That's it! 105 After that, use "mingw-get install PACKAGE" to install the following
106 additional packages:
104 107
105 If these short instructions somehow fail, read the rest of this 108 . msys-base
106 file. 109 . mingw-developer-toolkit
107 110
108* Preliminaries 111 (We recommend that you refrain from installing the MSYS Texinfo
112 package, which is part of msys-base, because it might produce mixed
113 EOL format when installing Info files. Instead, install the MinGW
114 port of Texinfo, see the ezwinports URL below. To uninstall the
115 MSYS Texinfo, after installing it as part of msys-base, invoke the
116 command "mingw-get remove msys-texinfo".)
109 117
110 If you want to build a Cygwin port of Emacs, use the instructions in 118 At this point, you should be ready to configure and build Emacs in
111 the INSTALL file in the main Emacs directory (the parent of this 119 its basic configuration. Skip to the "Generating the configure
112 directory). These instructions are for building a native Windows 120 script" section for the build instructions. If you want to build it
113 binary of Emacs. 121 with image support and other optional libraries, read about the
122 optional libraries near the end of this document, before you start
123 the build. Also, consider installing additional MinGW packages that
124 are required/recommended, especially if you are building from the
125 Bazaar repository, as described in the next section.
114 126
115 If you used WinZip to unpack the distribution, we suggest to 127** Installing MinGW and MSYS manually
116 remove the files and unpack again with a different program! 128
117 WinZip is known to create some subtle and hard to debug problems, 129*** MinGW
118 such as converting files to DOS CR-LF format, not creating empty 130
119 directories, etc. We suggest to use djtarnt.exe from the GNU FTP 131 You will need to install the MinGW port of GCC and Binutils, and the
120 site. For modern formats, such as .tar.xz, we suggest bsdtar.exe 132 MinGW runtime and Windows API distributions, to compile Emacs. You
121 from the libarchive package; its precompiled Windows binaries are 133 can find these on the MinGW download/Base page:
122 available from this site: 134
135 https://sourceforge.net/projects/mingw/files/MinGW/Base/
136
137 In general, install the latest stable versions of the following
138 MinGW packages from that page: gcc, binutils, mingw-rt, w32api. You
139 only need the 'bin' and the 'dll' tarballs of each of the above.
140
141 MinGW packages are distributed as .tar.lzma compressed archives. To
142 install the packages manually, we recommend to use the Windows port
143 of the 'bsdtar' program to unpack the tarballs. 'bsdtar' is
144 available as part of the 'libarchive' package from here:
123 145
124 http://sourceforge.net/projects/ezwinports/files/ 146 http://sourceforge.net/projects/ezwinports/files/
125 147
126 In addition to this file, if you build a development snapshot, you 148 The recommended place to install these packages is a single tree
127 should also read INSTALL.BZR in the parent directory. 149 starting from some directory on a drive other than the system drive
128 150 C:. A typical example would be D:\usr, with D:\usr\bin holding the
129* Supported development environments 151 binaries and DLLs (should be added to your Path environment
130 152 variable), D:\usr\include holding the include files, D:\usr\lib
131 To compile Emacs, you will need either Microsoft Visual C++ 2.0, or 153 holding the static and import libraries, D:\usr\share holding docs,
132 later and nmake, or a Windows port of GCC 2.95 or later with MinGW 154 message catalogs, and package-specific subdirectories, etc.
133 and Windows API support and a port of GNU Make. You can use the Cygwin 155
134 ports of GCC, but Emacs requires the MinGW headers and libraries to 156 Having all the headers and libraries in a single place will greatly
135 build (latest versions of the Cygwin toolkit, at least since v1.3.3, 157 reduce the number of -I and -L flags you will have to pass to the
136 include the MinGW headers and libraries as an integral part). 158 configure script (see below), as these files will be right where the
137 159 compiler expects them.
138 The rest of this file assumes you have a working development 160
139 environment. If you just installed such an environment, try 161 We specifically do NOT recommend installing packages below
140 building a trivial C "Hello world" program, and see if it works. If 162 "C:\Program Files" or "C:\Program Files (x86)". These directories
141 it doesn't work, resolve that problem first! If you use Microsoft 163 are protected on versions of Windows from Vista and on, and you will
142 Visual Studio .NET 2003, don't forget to run the VCVARS32.BAT batch 164 have difficulties updating and maintaining your installation later,
143 file from the `Bin' subdirectory of the directory where you have 165 due to UAC elevation prompts, file virtualization, etc. You *have*
144 installed VS.NET. With other versions of MSVC, run the SetEnv.cmd 166 been warned!
145 batch file from the `Bin' subdirectory of the directory where you 167
146 have the SDK installed. 168 Additional MinGW packages are required/recommended, especially if
147 169 you are building from the Bazaar repository:
148 If you use the MinGW port of GCC and GNU Make to build Emacs, there 170
149 are some compatibility issues wrt Make and the shell that is run by 171 . Texinfo (needed to produce the Info manuals when building from
150 Make, either the standard COMMAND.COM/CMD.EXE supplied with Windows 172 bzr, and for "make install")
151 or sh.exe, a port of a Unixy shell. For reference, below is a list 173
152 of which builds of GNU Make are known to work or not, and whether 174 Available from http://sourceforge.net/projects/ezwinports/files/.
153 they work in the presence and/or absence of sh.exe, the Cygwin port 175
154 of Bash. Note that any version of Make that is compiled with Cygwin 176 . gzip (needed to compress files during "make install")
155 will only work with Cygwin tools, due to the use of Cygwin style 177
156 paths. This means Cygwin Make is unsuitable for building parts of 178 Available from http://gnuwin32.sourceforge.net/packages/gzip.htm.
157 Emacs that need to invoke Emacs itself (leim and "make bootstrap", 179
158 for example). Also see the Trouble-shooting section below if you 180 . pkg-config (needed for building with some optional libraries,
159 decide to go ahead and use Cygwin make. 181 such as GnuTLS and libxml2)
160 182
161 In addition, using 4NT or TCC as your shell is known to fail the 183 Available from http://www.gtk.org/download/win32.php
162 build process, at least since 4NT version 3.01. Use CMD.EXE, the 184
163 default Windows shell, instead. MSYS sh.exe also appears to cause 185 Each package might list other packages as prerequisites on its
164 various problems, e.g., it is known to cause failures in commands 186 download page (under "Runtime requirements"); download those as
165 like "cmd /c FOO" in the Makefiles, because it thinks "/c" is a 187 well. (Using the mingw-get installer will fetch those prerequisites
166 Unix-style file name that needs conversion to the Windows format. 188 automatically for you.) A missing prerequisite will manifest itself
167 If you have MSYS installed, try "make SHELL=cmd.exe" to force the 189 by the program failing to run and presenting a pop-up dialog that
168 use of cmd.exe instead of the MSYS sh.exe. 190 states the missing or incompatible DLL; be sure to find and install
169 191 these missing DLLs.
170 sh exists no sh 192
171 193 Once you think you have MinGW installed, test the installation by
172 cygwin b20.1 make (3.75): fails[1, 5] fails[2, 5] 194 building a trivial "hello, world!" program, and make sure that it
173 MSVC compiled gmake 3.77: okay okay 195 builds without any error messages and the binary works when run.
174 MSVC compiled gmake 3.78.1: okay okay 196
175 MSVC compiled gmake 3.79.1: okay okay 197*** MSYS
176 mingw32/gcc-2.92.2 make (3.77): okay okay[4] 198
177 cygwin compiled gmake 3.77: fails[1, 5] fails[2, 5] 199 You will need a reasonably full MSYS installation. MSYS is an
178 cygwin compiled make 3.78.1: fails[5] fails[2, 5] 200 environment needed to run the Posix configure scripts and the
179 cygwin compiled make 3.79.1: fails[3, 5] fails[2?, 5] 201 resulting Makefile's, in order to produce native Windows binaries
180 cygwin compiled make 3.80: okay[6] fails?[7] 202 using the MinGW compiler and runtime libraries. Here's the list of
181 cygwin compiled make 3.81: fails fails?[7] 203 MSYS packages that are required:
182 mingw32 compiled make 3.79.1: okay okay 204
183 mingw32 compiled make 3.80: okay okay[7] 205 . All the packages from the MSYS Base distribution, listed here:
184 mingw32 compiled make 3.81: okay okay[8] 206
185 207 https://sourceforge.net/projects/mingw/files/MSYS/Base/
186 Notes: 208
187 209 . Additional packages listed below, from the MSYS Extension
188 [1] doesn't cope with makefiles with DOS line endings, so must mount 210 distribution here:
189 emacs source with text!=binary. 211
190 [2] fails when needs to invoke shell commands; okay invoking gcc etc. 212 https://sourceforge.net/projects/mingw/files/MSYS/Extension/
191 [3] requires LC_MESSAGES support to build; cannot build with early 213
192 versions of Cygwin. 214 - flex
193 [4] may fail on Windows 9X and Windows ME; if so, install Bash. 215 - bison
194 [5] fails when building leim due to the use of cygwin style paths. 216 - m4
195 May work if building emacs without leim. 217 - perl
196 [6] need to uncomment 3 lines in nt/gmake.defs that invoke `cygpath' 218 - mktemp
197 (look for "cygpath" near line 85 of gmake.defs). 219
198 [7] not recommended; please report if you try this combination. 220 These should only be needed if you intend to build development
199 [8] tested only on Windows XP. 221 versions of Emacs from the Bazaar repository.
200 222
201 Other compilers may work, but specific reports from people that have 223 . Additional packages (needed only if building from the Bazaar
202 tried suggest that the Intel C compiler (for example) may produce an 224 repository): Automake and Autoconf. They are available from
203 Emacs executable with strange filename completion behavior. Unless 225 here:
204 you would like to assist by finding and fixing the cause of any bugs 226
205 like this, we recommend the use of the supported compilers mentioned 227 http://sourceforge.net/projects/ezwinports/files/automake-1.11.6-msys-bin.zip/download
206 in the previous paragraph. 228 http://sourceforge.net/projects/ezwinports/files/autoconf-2.65-msys-bin.zip/download
207 229
208 You will also need a copy of the POSIX cp, rm and mv programs. These 230 MSYS packages are distributed as .tar.lzma compressed archives. To
209 and other useful POSIX utilities can be obtained from one of several 231 install the packages manually, we recommend to use the Windows port
210 projects: 232 of the 'bsdtar' program, already mentioned above.
211 233
212 * http://gnuwin32.sourceforge.net/ ( GnuWin32 ) 234 If/when you are confident in your MinGW/MSYS installation, and want
213 * http://www.mingw.org/ ( MinGW ) 235 to speed up the builds, we recommend installing a pre-release
214 * http://www.cygwin.com/ ( Cygwin ) 236 version of Make from here:
215 * http://unxutils.sourceforge.net/ ( UnxUtils ) 237
216 238 https://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/
217 If you build Emacs on 16-bit versions of Windows (9X or ME), we 239
218 suggest to install the Cygwin port of Bash. That is because the 240 These are snapshot builds of many packages, but you only need
219 native Windows shell COMMAND.COM is too limited; the Emacs build 241 make.exe from there. The advantage of this make.exe is that it
220 procedure tries very hard to support even such limited shells, but 242 supports parallel builds, so you can use "make -j N" to considerably
221 as none of the Windows developers of Emacs work on Windows 9X, we 243 speed up your builds.
222 cannot guarantee that it works without a more powerful shell. 244
223 245 Several users reported that MSYS 1.0.18 causes Make to hang in
224 Additional instructions and help for building Emacs on Windows can be 246 parallel builds. If you bump into this, we suggest to downgrade to
225 found at the Emacs Wiki: 247 MSYS 1.0.17, which doesn't have that problem.
226 248
227 http://www.emacswiki.org/cgi-bin/wiki/WThirtyTwoInstallationKit 249 For each of these packages, install the 'bin' and 'dll' tarballs of
228 250 their latest stable releases. If there's an 'ext' tarball (e.g.,
229 and on these URLs: 251 msysCORE and Coreutils have it), download and install those as well.
230 252
231 http://ourcomments.org/Emacs/w32-build-emacs.html 253 Each package might list other packages as prerequisites on its
232 http://derekslager.com/blog/posts/2007/01/emacs-hack-3-compile-emacs-from-cvs-on-windows.ashx 254 download page (under "Runtime requirements"); download those as
233 255 well. (Using the mingw-get installer will fetch those prerequisites
234 Both of those pages were written before Emacs switched from CVS to 256 automatically for you.) A missing prerequisite will manifest itself
235 Bazaar, but the parts about building Emacs still apply in Bazaar. 257 by the program failing to run and presenting a pop-up dialog that
236 The second URL has instructions for building with MSVC, as well as 258 states the missing or incompatible DLL; be sure to find and install
237 with MinGW, while the first URL covers only MinGW, but has more 259 these missing DLLs.
238 details about it. 260
239 261 MSYS packages should be installed in a separate tree from MinGW.
240* Configuring 262 For example, use D:\MSYS or D:\usr\MSYS as the top-level directory
241 263 from which you unpack all of the MSYS packages.
242 Configuration of Emacs is now handled by running configure.bat in the 264
243 `nt' subdirectory. It will detect which compiler you have available, 265 Do NOT add the MSYS bin directory to your Windows Path! Only the
244 and generate makefiles accordingly. You can override the compiler 266 MinGW bin directory should be on Path. When you install MSYS, it
245 detection, and control optimization and debug settings, by specifying 267 creates a shortcut on your desktop that invokes the MSYS Bash shell
246 options on the command line when invoking configure. 268 in a Command Prompt window; that shell is already set up so that the
247 269 MSYS bin directory is on PATH ahead of any other directory. Thus,
248 To configure Emacs to build with GCC or MSVC, whichever is available, 270 Bash will find MSYS executables first, which is exactly what you
249 simply change to the `nt' subdirectory and run `configure.bat' with no 271 need.
250 options. To see what options are available, run `configure --help'. 272
251 Do NOT use the --no-debug option to configure.bat unless you are 273 At this point, you are ready to build Emacs in its basic
252 absolutely sure the produced binaries will never need to be run under 274 configuration. If you want to build it with image support and other
253 a debugger. 275 optional libraries, read about that near the end of this document.
254 276
255 Because of limitations of the stock Windows command shells, special 277* Generating the configure script
256 care is needed to pass some characters in the arguments of the 278
257 --cflags and --ldflags options. Backslashes should not be used in 279 If you are building a release or pretest tarball, skip this section,
258 file names passed to the compiler and linker via these options. Use 280 because the configure script is already present in the tarball.
259 forward slashes instead. If the arguments to these two options 281
260 include the `=' character, like when passing a -DFOO=bar preprocessor 282 To build a development snapshot from the Emacs Bazaar repository,
261 option, the argument with the `=' character should be enclosed in 283 you will first need to generate the configure script and a few other
262 quotes, like this: 284 auto-generated files. (If this step, described below, somehow
263 285 fails, you can use the files in the autogen/ directory instead, but
264 configure --cflags "-DFOO=bar" 286 they might be outdated, and, most importantly, you are well advised
265 287 not to disregard any failures in your local build procedures, as
266 Support for options that include the `=' character require "command 288 these are likely to be symptoms of incorrect installation that will
267 extensions" to be enabled. (They are enabled by default, but your 289 bite you down the road.)
268 system administrator could have changed that. See "cmd /?" for 290
269 details.) If command extensions are disabled, a warning message might 291 To generate the configure script, type this at the MSYS Bash prompt
270 be displayed informing you that "using parameters that include the = 292 from the top-level directory of the Emacs tree:
271 character by enclosing them in quotes will not be supported." 293
272 294 ./autogen.sh
273 You may also use the --cflags and --ldflags options to pass 295
274 additional parameters to the compiler and linker, respectively; they 296 If successful, this command should produce the following output:
275 are frequently used to pass -I and -L flags to specify supplementary 297
276 include and library directories. If a directory name includes 298 $ ./autogen.sh
277 spaces, you will need to enclose it in quotes, as follows 299 Checking whether you have the necessary tools...
278 -I"C:/Program Files/GnuTLS-2.10.1/include". Note that only the 300 (Read INSTALL.BZR for more details on building Emacs)
279 directory name is enclosed in quotes, not the entire argument. Also 301
280 note that this functionality is only supported if command extensions 302 Checking for autoconf (need at least version 2.65)...
281 are available. If command extensions are disabled and you attempt to 303 ok
282 use this functionality you may see the following warning message 304 Checking for automake (need at least version 1.11)...
283 "Error in --cflags argument: ... Backslashes and quotes cannot be 305 ok
284 used with --cflags. Please use forward slashes for filenames and 306 Your system has the required tools, running autoreconf...
285 paths (e.g. when passing directories to -I)." 307 You can now run `./configure'.
286 308
287 N.B. It is normal to see a few error messages output while configure 309* Configuring Emacs for MinGW:
288 is running, when gcc support is being tested. These cannot be 310
289 suppressed because of limitations in the Windows 9X command.com shell. 311 Now it's time to run the configure script. You can do that either
290 312 from a separate build directory that is outside of the Emacs source
291 You are encouraged to look at the file config.log which shows details 313 tree (recommended), or from inside the source tree. The former is
292 for failed tests, after configure.bat finishes. Any unexplained failure 314 recommended because it allows you to have several different builds,
293 should be investigated and perhaps reported as a bug (see the section 315 e.g., an optimized build and an unoptimized one, of the same
294 about reporting bugs in the file README in this directory and in the 316 revision of the source tree; the source tree will be left in its
295 Emacs manual). 317 pristine state, without any build products.
318
319 You invoke the configure script like this:
320
321 /PATH/TO/EMACS/SOURCE/TREE/nt/msysconfig.sh --prefix=PREFIX ...
322
323 or, if you are building in-place, i.e. inside the source tree:
324
325 ./nt/msysconfig.sh --prefix=PREFIX ...
326
327 Here PREFIX is the place where you eventually want to install Emacs
328 once built, e.g. /d/usr. We recommend to always use --prefix when
329 building Emacs on Windows, because the default '/usr/local' is not
330 appropriate for Windows: it will be mapped by MSYS to something like
331 C:\MSYS\local, and it will defeat the purpose of PREFIX, which is to
332 install programs in a single coherent tree resembling Posix systems.
333 Such a single-tree installation makes sure all the other programs
334 and packages ported from GNU or Unix systems will work seamlessly
335 together. Where exactly is the root of that tree on your system is
336 something only you, the user who builds Emacs, can know, and the
337 Emacs build process cannot guess, because usually there's no
338 '/usr/local' directory on any drive on Windows systems.
339
340 Do NOT use Windows-style x:/foo/bar file names on the configure
341 script command line; use the MSYS-style /x/foo/bar instead. Using
342 Windows-style file names was reported to cause subtle and hard to
343 figure out problems during the build. This applies both to the
344 command switches, such as --prefix=, and to the absolute file name
345 of msysconfig.sh, if you are building outside of the source tree.
346
347 You can pass additional options to the configure script, for the
348 full list type
349
350 ./nt/msysconfig.sh --help
351
352 As explained in the help text, you may need to tell the script what
353 are the optional flags to invoke the compiler. This is needed if
354 some of your headers and libraries, e.g., those belonging to
355 optional image libraries, are installed in places where the compiler
356 normally doesn't look for them. (Remember that advice above to
357 avoid such situations? here's is where you will start paying for
358 disregarding that recommendation.) For example, if you have libpng
359 headers in C:\emacs\libs\libpng-1.2.37-lib\include and jpeg library
360 headers in C:\emacs\libs\jpeg-6b-4-lib\include, you will need to say
361 something like this:
362
363 CPPFLAGS='-I/c/emacs/libs/libpng-1.2.37-lib/include -I/c/emacs/libs/jpeg-6b-4-lib/include' ./nt/msysconfig.sh --prefix=PREFIX
364
365 which is quite a mouth-full, especially if you have more directories
366 to specify... Perhaps you may wish to revisit your installation
367 decisions now.
368
369 If you have a global site-lisp directory from previous Emacs
370 installation, and you want Emacs to continue using it, specify it
371 via the --enable-locallisppath switch to msysconfig.sh, like this:
372
373 ./nt/msysconfig.sh --prefix=PREFIX --enable-locallisppath="/d/usr/share/emacs/VERSION/site-lisp:/d/wherever/site-lisp"
374
375 Use the normal MSYS /d/foo/bar style to specify directories by their
376 absolute file names.
377
378 A few frequently used options are needed when you want to produce an
379 unoptimized binary with runtime checks enabled:
380
381 CPPFLAGS='-DGLYPH_DEBUG=1' CFLAGS='-O0 -g3' ./nt/msysconfig.sh --prefix=PREFIX --enable-checking
382
383 Once invoked, the configure script will run for some time, and, if
384 successful, will eventually produce a summary of the configuration
385 like this:
386
387 Configured for `i686-pc-mingw32'.
388
389 Where should the build process find the source code? /path/to/emacs/sources
390 What compiler should emacs be built with? gcc -std=gnu99 -O0 -g3
391 Should Emacs use the GNU version of malloc? yes
392 Should Emacs use a relocating allocator for buffers? yes
393 Should Emacs use mmap(2) for buffer allocation? no
394 What window system should Emacs use? w32
395 What toolkit should Emacs use? none
396 Where do we find X Windows header files? NONE
397 Where do we find X Windows libraries? NONE
398 Does Emacs use -lXaw3d? no
399 Does Emacs use -lXpm? yes
400 Does Emacs use -ljpeg? yes
401 Does Emacs use -ltiff? yes
402 Does Emacs use a gif library? yes
403 Does Emacs use -lpng? yes
404 Does Emacs use -lrsvg-2? no
405 Does Emacs use imagemagick? no
406 Does Emacs use -lgpm? no
407 Does Emacs use -ldbus? no
408 Does Emacs use -lgconf? no
409 Does Emacs use GSettings? no
410 Does Emacs use -lselinux? no
411 Does Emacs use -lgnutls? yes
412 Does Emacs use -lxml2? yes
413 Does Emacs use -lfreetype? no
414 Does Emacs use -lm17n-flt? no
415 Does Emacs use -lotf? no
416 Does Emacs use -lxft? no
417 Does Emacs use toolkit scroll bars? yes
418
419 You are almost there, hang on.
420
421 If the output is significantly different, or if configure finishes
422 prematurely and displays some error message, you should examine the
423 configuration log in config.log and find the reason for the failure.
424
425 Once you succeeded in configuring Emacs, and just want to rebuild it
426 after updating your local repository from the main repository, you
427 don't need to re-run the configure script manually, unless you want
428 to change the configure-time options. Just typing "make" will
429 re-run configure if necessary with the exact same options you
430 specified originally, and then go on to invoking Make, described
431 below.
432
433* Running Make.
434
435 This is simple: just type "make" and sit back, watching the fun.
436
437 If you installed a snapshot build of Make, the build will be much
438 faster if you type "make -j N" instead, where N is the number of
439 independent processing units on your machine. E.g., on a core i7
440 system try using N of 6 or even 8. (If this hangs, see the notes
441 above about downgrading to MSYS 1.0.17.)
442
443 When Make finishes, you can install the produced binaries:
444
445 make install
446
447 or, if you want the installed tree to go in a place different from
448 the configured one, type
449
450 make install prefix=WHEREVER
451
452 Congrats! You have built and installed your own Emacs!
453
454* Make targets
455
456 The following make targets may be used by users building the source
457 distribution, or users who have checked out of Bazaar after
458 an initial bootstrapping.
459
460 make
461 Builds Emacs from the available sources and pre-compiled lisp files.
462
463 make install
464 Installs the built programs and the auxiliary files.
465
466 make clean
467 Removes object and executable files produced by the build process in
468 the current configuration. After "make clean", you can rebuild with
469 the same configuration using make. useful when you want to be sure
470 that all of the products are built from coherent sources.
471
472 make distclean
473 In addition to the files removed by make clean, this also removes
474 Makefiles and other generated files to get back to the state of a
475 freshly unpacked source distribution. After make distclean, it is
476 necessary to run the configure script followed by "make", in order
477 to rebuild.
478
479 The following targets are intended only for use with the Bazaar sources.
480
481 make bootstrap
482 Removes all the auto-generated files and all the *.elc byte-compiled
483 files, and builds Emacs from scratch. Useful when some change in
484 basic Emacs functionality makes byte compilation of updated files
485 fail.
486
487 make maintainer-clean
488 Removes everything that can be recreated, including compiled Lisp
489 files, to get back to the state of a fresh Bazaar tree. After make
490 maintainer-clean, it is necessary to run configure and "make" or
491 "make bootstrap" to rebuild. Occasionally it may be necessary to
492 run this target after an update.
296 493
297* Optional image library support 494* Optional image library support
298 495
@@ -301,19 +498,28 @@
301 support for svg. 498 support for svg.
302 499
303 To build Emacs with support for them, the corresponding headers must 500 To build Emacs with support for them, the corresponding headers must
304 be in the include path when the configure script is run. This can 501 be in the include path and libraries should be where the linker
305 be setup using environment variables, or by specifying --cflags 502 looks for them, when the configure script is run. If needed, this
306 -I... options on the command-line to configure.bat. The configure 503 can be set up using the CPPFLAGS and CFLAGS variable specified on
307 script will report whether it was able to detect the headers. If 504 the configure command line. The configure script will report
308 the results of this testing appear to be incorrect, please look for 505 whether it was able to detect the headers and libraries. If the
506 results of this testing appear to be incorrect, please look for
309 details in the file config.log: it will show the failed test 507 details in the file config.log: it will show the failed test
310 programs and compiler error messages that should explain what is 508 programs and compiler error messages that should explain what is
311 wrong. (Usually, any such failures happen because some headers are 509 wrong. (Usually, any such failures happen because some headers are
312 missing due to bad packaging of the image support libraries.) 510 missing due to bad packaging of the image support libraries.)
313 511
314 Note that any file path passed to the compiler or linker must use 512 Note that any file path passed to the compiler or linker must use
315 forward slashes; using backslashes will cause compiler warnings or 513 forward slashes, or double each backslash, as that is how Bash
316 errors about unrecognized escape sequences. 514 works.
515
516 If the configure script finds the necessary headers and libraries,
517 but they are for some reason incompatible, or if you want to omit
518 support for some image library that is installed on your system for
519 some other reason, use the --without-PACKAGE option to configure,
520 such as --without-gif to omit GIF, --without-tiff to omit TIFF, etc.
521 Passing the --help option to the configure script displays all of
522 the supported --without-PACKAGE options.
317 523
318 To use the external image support, the DLLs implementing the 524 To use the external image support, the DLLs implementing the
319 functionality must be found when Emacs first needs them, either on the 525 functionality must be found when Emacs first needs them, either on the
@@ -331,20 +537,13 @@
331 compatible (for example, that they were built with the same compiler). 537 compatible (for example, that they were built with the same compiler).
332 538
333 Binaries for the image libraries (among many others) can be found at 539 Binaries for the image libraries (among many others) can be found at
334 the GnuWin32 project. PNG, JPEG and TIFF libraries are also 540 the GnuWin32 project. The PNG libraries are also included with GTK,
335 included with GTK, which is installed along with other Free Software 541 which is installed along with other Free Software that requires it.
336 that requires it. These are built with MinGW, but they can be used 542 Note specifically that, due to some packaging snafus in the
337 with both GCC/MinGW and MSVC builds of Emacs. See the info on 543 GnuWin32-supplied image libraries, you will need to download
338 http://ourcomments.org/Emacs/w32-build-emacs.html, under "How to Get
339 Images Support", for more details about installing image support
340 libraries. Note specifically that, due to some packaging snafus in
341 the GnuWin32-supplied image libraries, you will need to download
342 _source_ packages for some of the libraries in order to get the 544 _source_ packages for some of the libraries in order to get the
343 header files necessary for building Emacs with image support. 545 header files necessary for building Emacs with image support.
344 546
345 If GTK 2.0 is installed, addpm will arrange for its image libraries
346 to be on the DLL search path for Emacs.
347
348 For PNG images, we recommend to use versions 1.4.x and later of 547 For PNG images, we recommend to use versions 1.4.x and later of
349 libpng, because previous versions had security issues. You can find 548 libpng, because previous versions had security issues. You can find
350 precompiled libraries and headers on the GTK download page for 549 precompiled libraries and headers on the GTK download page for
@@ -364,9 +563,19 @@
364 563
365* Optional GnuTLS support 564* Optional GnuTLS support
366 565
367 If configure.bat finds the gnutls/gnutls.h file in the include path, 566 To compile with GnuTLS, you will need pkg-config to be installed, as
368 Emacs is built with GnuTLS support by default; to avoid that you can 567 the configure script invokes pkg-config to find out which compiler
369 pass the argument --without-gnutls. 568 switches to use for GnuTLS. See above for the URL where you can
569 find pkg-config for Windows.
570
571 You will also need to install the p11-kit package, which is a
572 dependency of GnuTLS, and its header files are needed for
573 compilation of programs that use GnuTLS. You can find p11-kit on
574 the same site as GnuTLS, see the URL below.
575
576 If the configure script finds the GnuTLS header files and libraries
577 on your system, Emacs is built with GnuTLS support by default; to
578 avoid that you can pass the argument --without-gnutls.
370 579
371 In order to support GnuTLS at runtime, a GnuTLS-enabled Emacs must 580 In order to support GnuTLS at runtime, a GnuTLS-enabled Emacs must
372 be able to find the relevant DLLs during startup; failure to do so 581 be able to find the relevant DLLs during startup; failure to do so
@@ -378,9 +587,14 @@
378 587
379* Optional libxml2 support 588* Optional libxml2 support
380 589
381 If configure.bat finds the libxml/HTMLparser.h file in the include path, 590 To compile with libxml2, you will need pkg-config to be installed,
382 Emacs is built with libxml2 support by default; to avoid that you can 591 as the configure script invokes pkg-config to find out which
383 pass the argument --without-libxml2. 592 compiler switches to use for libxml2. See above for the URL where
593 you can find pkg-config for Windows.
594
595 If the configure script finds the libxml2 header files and libraries
596 on your system, Emacs is built with libxml2 support by default; to
597 avoid that you can pass the argument --without-libxml2.
384 598
385 In order to support libxml2 at runtime, a libxml2-enabled Emacs must 599 In order to support libxml2 at runtime, a libxml2-enabled Emacs must
386 be able to find the relevant DLLs during startup; failure to do so 600 be able to find the relevant DLLs during startup; failure to do so
@@ -392,18 +606,10 @@
392 606
393 http://sourceforge.net/projects/ezwinports/files/ 607 http://sourceforge.net/projects/ezwinports/files/
394 608
395 To compile Emacs with libxml2 from that site, you will need to pass 609 For runtime support of libxml2, you will also need to install the
396 the "--cflags -I/path/to/include/libxml2" option to configure.bat, 610 libiconv "development" tarball, because the libiconv headers need to
397 because libxml2 header files are installed in the include/libxml2 611 be available to the compiler when you compile with libxml2 support.
398 subdirectory of the directory where you unzip the binary 612 A MinGW port of libiconv can be found on the MinGW site:
399 distribution. Other binary distributions might use other
400 directories, although include/libxml2 is the canonical place where
401 libxml2 headers are installed on Posix platforms.
402
403 You will also need to install the libiconv "development" tarball,
404 because the libiconv headers need to be available to the compiler
405 when you compile with libxml2 support. A MinGW port of libiconv can
406 be found on the MinGW site:
407 613
408 http://sourceforge.net/projects/mingw/files/MinGW/Base/libiconv/ 614 http://sourceforge.net/projects/mingw/files/MinGW/Base/libiconv/
409 615
@@ -412,16 +618,18 @@
412 618
413* Experimental SVG support 619* Experimental SVG support
414 620
621 To compile with SVG, you will need pkg-config to be installed, as
622 the configure script invokes pkg-config to find out which compiler
623 switches to use for SVG. See above for the URL where you can find
624 pkg-config for Windows.
625
415 SVG support is currently experimental, and not built by default. 626 SVG support is currently experimental, and not built by default.
416 Specify --with-svg and ensure you have all the dependencies in your 627 Specify --with-rsvg and ensure you have all the dependencies in your
417 include path. Unless you have built a minimalist librsvg yourself 628 include path. Unless you have built a minimalist librsvg yourself
418 (untested), librsvg depends on a significant chunk of GTK+ to build, 629 (untested), librsvg depends on a significant chunk of GTK+ to build,
419 plus a few Gnome libraries, libxml2, libbz2 and zlib at runtime. The 630 plus a few Gnome libraries, libxml2, libbz2 and zlib at runtime. The
420 easiest way to obtain the dependencies required for building is to 631 easiest way to obtain the dependencies required for building is to
421 download a pre-bundled GTK+ development environment for Windows. 632 download a pre-bundled GTK+ development environment for Windows.
422 GTK puts its header files all over the place, so you will need to
423 run pkgconfig to list the include path you will need (either passed
424 to configure.bat as --cflags options, or set in the environment).
425 633
426 To use librsvg at runtime, ensure that librsvg and its dependencies 634 To use librsvg at runtime, ensure that librsvg and its dependencies
427 are on your PATH. If you didn't build librsvg yourself, you will 635 are on your PATH. If you didn't build librsvg yourself, you will
@@ -445,294 +653,6 @@
445 maybe a problem with the way Cairo or librsvg is using it that 653 maybe a problem with the way Cairo or librsvg is using it that
446 doesn't show up on other platforms. 654 doesn't show up on other platforms.
447 655
448* Optional extra runtime checks
449
450 The configure.bat option --enable-checking builds Emacs with some
451 optional extra runtime checks and assertions enabled. This may be
452 useful for debugging.
453
454* Optional extra libraries
455
456 You can pass --lib LIBNAME option to configure.bat to cause Emacs to
457 link with the specified library. You can use this option more than once.
458
459* Building
460
461 After running configure, simply run the appropriate `make' program for
462 your compiler to build Emacs. For MSVC, this is nmake; for GCC, it is
463 GNU make. (If you are building out of Bazaar, say "make bootstrap" or
464 "nmake bootstrap" instead.)
465
466 As the files are compiled, you will see some warning messages
467 declaring that some functions don't return a value, or that some data
468 conversions will be lossy, etc. You can safely ignore these messages.
469 The warnings may be fixed in the main FSF source at some point, but
470 until then we will just live with them.
471
472 With GNU Make, you can use the -j command-line option to have Make
473 execute several commands at once, like this:
474
475 gmake -j 4 XMFLAGS="-j 3"
476
477 The XMFLAGS variable overrides the default behavior of GNU Make on
478 Windows, whereby recursive Make invocations reset the maximum number
479 of simultaneous commands to 1. The above command allows up to 4
480 simultaneous commands at once in the top-level Make, and up to 3 in
481 each one of the recursive Make's; you can use other numbers of jobs,
482 if you wish.
483
484 If you are building from Bazaar, the following commands will produce
485 the Info manuals (which are not part of the Bazaar sources):
486
487 make info
488 or
489 nmake info
490
491 Note that you will need makeinfo.exe (from the GNU Texinfo package)
492 in order for this command to succeed.
493
494* Installing
495
496 To install Emacs after it has compiled, simply run `nmake install'
497 or `make install', depending on which version of the Make utility
498 do you have.
499
500 By default, Emacs will be installed in the location where it was
501 built, but a different location can be specified either using the
502 --prefix option to configure, or by setting INSTALL_DIR when running
503 make, like so:
504
505 make install INSTALL_DIR=D:/emacs
506
507 (for `nmake', type "nmake install INSTALL_DIR=D:/emacs" instead).
508
509 The install process will run addpm to setup the registry entries, and
510 to create a Start menu icon for Emacs.
511
512* Make targets
513
514 The following make targets may be used by users building the source
515 distribution, or users who have checked out of Bazaar after
516 an initial bootstrapping.
517
518 make
519 Builds Emacs from the available sources and pre-compiled lisp files.
520
521 make install
522 Installs programs to the bin directory, and runs addpm to create
523 Start Menu icons.
524
525 make clean
526 Removes object and executable files produced by the build process in
527 the current configuration. After make clean, you can rebuild with
528 the same configuration using make.
529
530 make distclean
531 In addition to the files removed by make clean, this also removes
532 Makefiles and other generated files to get back to the state of a
533 freshly unpacked source distribution. Note that this will not remove
534 installed files, or the results of builds performed with different
535 compiler or optimization options than the current configuration.
536 After make distclean, it is necessary to run configure.bat followed
537 by make to rebuild.
538
539 make cleanall
540 Removes object and executable files that may have been created by
541 previous builds with different configure options, in addition to
542 the files produced by the current configuration.
543
544 make realclean
545 Removes the installed files in the bin subdirectory in addition to
546 the files removed by make cleanall.
547
548 make dist
549 Builds Emacs from the available sources and pre-compiled lisp files.
550 Packages Emacs binaries as full distribution and barebin distribution.
551
552 The following targets are intended only for use with the Bazaar sources.
553
554 make bootstrap
555 Creates a temporary emacs binary with lisp source files and
556 uses it to compile the lisp files. Once the lisp files are built,
557 emacs is redumped with the compiled lisp.
558
559 make recompile
560 Recompiles any changed lisp files after an update. This saves
561 doing a full bootstrap after every update. If this or a subsequent
562 make fail, you probably need to perform a full bootstrap, though
563 running this target multiple times may eventually sort out the
564 interdependencies.
565
566 make maintainer-clean
567 Removes everything that can be recreated, including compiled lisp
568 files, to get back to the state of a fresh Bazaar tree. After make
569 maintainer-clean, it is necessary to run configure.bat and make
570 bootstrap to rebuild. Occasionally it may be necessary to run this
571 target after an update.
572
573* Creating binary distributions
574
575 Binary distributions (full and barebin distributions) can be
576 automatically built and packaged from source tarballs or a bzr
577 checkout.
578
579 When building Emacs binary distributions, the --distfiles argument
580 to configure.bat specifies files to be included in the bin directory
581 of the binary distributions. This is intended for libraries that are
582 not built as part of Emacs, e.g. image libraries.
583
584 For example, specifying
585
586 --distfiles D:\distfiles\libXpm.dll
587
588 results in libXpm.dll being copied from D:\distfiles to the
589 bin directory before packaging starts.
590
591 Multiple files can be specified using multiple --distfiles arguments:
592
593 --distfiles D:\distfiles\libXpm.dll --distfiles C:\jpeglib\jpeg.dll
594
595 For packaging the binary distributions, the 'dist' make target uses
596 7-Zip (http://www.7-zip.org), which must be installed and available
597 on the Windows Path.
598
599
600* Trouble-shooting
601
602 The main problems that are likely to be encountered when building
603 Emacs stem from using an old version of GCC, or old MinGW or Windows API
604 headers. Additionally, Cygwin ports of GNU make may require the Emacs
605 source tree to be mounted with text!=binary, because the makefiles
606 generated by configure.bat necessarily use DOS line endings. Also,
607 Cygwin ports of make must run in UNIX mode, either by specifying
608 --unix on the command line, or MAKE_MODE=UNIX in the environment.
609
610 When configure runs, it attempts to detect when GCC itself, or the
611 headers it is using, are not suitable for building Emacs. GCC version
612 2.95 or later is needed, because that is when the Windows port gained
613 sufficient support for anonymous structs and unions to cope with some
614 definitions from winnt.h that are used by addsection.c.
615 Older versions of the Windows API headers that come with Cygwin and MinGW
616 may be missing some definitions required by Emacs, or broken in other
617 ways. In particular, uniscribe APIs were added to MinGW CVS only on
618 2006-03-26, so releases from before then cannot be used.
619
620 When in doubt about correctness of what configure did, look at the file
621 config.log, which shows all the failed test programs and compiler
622 messages associated with the failures. If that doesn't give a clue,
623 please report the problems, together with the relevant fragments from
624 config.log, as bugs.
625
626 If configure succeeds, but make fails, install the Cygwin port of
627 Bash, even if the table above indicates that Emacs should be able to
628 build without sh.exe. (Some versions of Windows shells are too dumb
629 for Makefile's used by Emacs.)
630
631 If you are using certain Cygwin builds of GCC, such as Cygwin version
632 1.1.8, you may need to specify some extra compiler flags like so:
633
634 configure --with-gcc --cflags -mwin32 --cflags -D__MSVCRT__
635 --ldflags -mwin32
636
637 However, the latest Cygwin versions, such as 1.3.3, don't need those
638 switches; you can simply use "configure --with-gcc".
639
640 We will attempt to auto-detect the need for these flags in a future
641 release.
642
643* Debugging
644
645 You should be able to debug Emacs using the debugger that is
646 appropriate for the compiler you used, namely DevStudio or Windbg if
647 compiled with MSVC, or GDB if compiled with GCC. (GDB for Windows
648 is available from the MinGW site, http://www.mingw.org/download.shtml.)
649
650 When Emacs aborts due to a fatal internal error, Emacs on Windows
651 pops up an Emacs Abort Dialog asking you whether you want to debug
652 Emacs or terminate it. If Emacs was built with MSVC, click YES
653 twice, and Windbg or the DevStudio debugger will start up
654 automatically. If Emacs was built with GCC, first start GDB and
655 attach it to the Emacs process with the "gdb -p EMACS-PID" command,
656 where EMACS-PID is the Emacs process ID (which you can see in the
657 Windows Task Manager), type the "continue" command inside GDB, and
658 only then click YES on the abort dialog. This will pass control to
659 the debugger, and you will be able to debug the cause of the fatal
660 error.
661
662 The single most important thing to find out when Emacs aborts or
663 crashes is where did that happen in the Emacs code. This is called
664 "backtrace".
665
666 Emacs on Windows uses more than one thread. When Emacs aborts due
667 to a fatal error, the current thread may not be the application
668 thread running Emacs code. Therefore, to produce a meaningful
669 backtrace from a debugger, you need to instruct it to show the
670 backtrace for every thread. With GDB, you do it like this:
671
672 (gdb) thread apply all backtrace
673
674 To run Emacs under a debugger to begin with, simply start it from
675 the debugger. With GDB, chdir to the `src' directory (if you have
676 the source tree) or to a directory with the `.gdbinit' file (if you
677 don't have the source tree), and type these commands:
678
679 C:\whatever\src> gdb x:\path\to\emacs.exe
680 (gdb) run <ARGUMENTS TO EMACS>
681
682 Thereafter, use Emacs as usual; you can minimize the debugger
683 window, if you like. The debugger will take control if and when
684 Emacs crashes.
685
686 Emacs functions implemented in C use a naming convention that reflects
687 their names in lisp. The names of the C routines are the lisp names
688 prefixed with 'F', and with dashes converted to underscores. For
689 example, the function call-process is implemented in C by
690 Fcall_process. Similarly, lisp variables are prefixed with 'V', again
691 with dashes converted to underscores. These conventions enable you to
692 easily set breakpoints or examine familiar lisp variables by name.
693
694 Since Emacs data is often in the form of a lisp object, and the
695 Lisp_Object type is difficult to examine manually in a debugger,
696 Emacs provides a helper routine called debug_print that prints out a
697 readable representation of a Lisp_Object. If you are using GDB,
698 there is a .gdbinit file in the src directory which provides
699 definitions that are useful for examining lisp objects. Therefore,
700 the following tips are mainly of interest when using MSVC.
701
702 The output from debug_print is sent to stderr, and to the debugger
703 via the OutputDebugString routine. The output sent to stderr should
704 be displayed in the console window that was opened when the
705 emacs.exe executable was started. The output sent to the debugger
706 should be displayed in its "Debug" output window.
707
708 When you are in the process of debugging Emacs and you would like to
709 examine the contents of a Lisp_Object variable, pop up the QuickWatch
710 window (QuickWatch has an eyeglass symbol on its button in the
711 toolbar). In the text field at the top of the window, enter
712 debug_print(<variable>) and hit return. For example, start and run
713 Emacs in the debugger until it is waiting for user input. Then click
714 on the Break button in the debugger to halt execution. Emacs should
715 halt in ZwUserGetMessage waiting for an input event. Use the Call
716 Stack window to select the procedure w32_msp_pump up the call stack
717 (see below for why you have to do this). Open the QuickWatch window
718 and enter debug_print(Vexec_path). Evaluating this expression will
719 then print out the contents of the lisp variable exec-path.
720
721 If QuickWatch reports that the symbol is unknown, then check the call
722 stack in the Call Stack window. If the selected frame in the call
723 stack is not an Emacs procedure, then the debugger won't recognize
724 Emacs symbols. Instead, select a frame that is inside an Emacs
725 procedure and try using debug_print again.
726
727 If QuickWatch invokes debug_print but nothing happens, then check the
728 thread that is selected in the debugger. If the selected thread is
729 not the last thread to run (the "current" thread), then it cannot be
730 used to execute debug_print. Use the Debug menu to select the current
731 thread and try using debug_print again. Note that the debugger halts
732 execution (e.g., due to a breakpoint) in the context of the current
733 thread, so this should only be a problem if you've explicitly switched
734 threads.
735
736 656
737This file is part of GNU Emacs. 657This file is part of GNU Emacs.
738 658
diff --git a/nt/INSTALL.MSYS b/nt/INSTALL.MSYS
deleted file mode 100644
index 420b8be75f8..00000000000
--- a/nt/INSTALL.MSYS
+++ /dev/null
@@ -1,673 +0,0 @@
1 Building and Installing Emacs on MS-Windows
2 using the MSYS and MinGW tools
3
4 Copyright (C) 2013 Free Software Foundation, Inc.
5 See the end of the file for license conditions.
6
7The MSYS/MinGW build described here is supported on versions of
8Windows starting with Windows 2000 and newer. Windows 9X are not
9supported (but the Emacs binary produced by this build will run on
10Windows 9X as well).
11
12* For the brave (a.k.a. "impatient"):
13
14 For those who have a working MSYS/MinGW development environment and
15 are comfortable with running Posix configure scripts, here are the
16 concise instructions for configuring and building the native Windows
17 binary of Emacs with these tools.
18
19 Do not use this recipe with Cygwin. For building on Cygwin, use the
20 normal installation instructions, ../INSTALL.
21
22 Do not use these instructions if you don't have MSYS installed; for
23 that, see the file INSTALL in this directory.
24
25 0. Start the MSYS Bash window. Everything else below is done from
26 that window's Bash prompt.
27
28 0a. If you are building from the development trunk (as opposed to a
29 release tarball), produce the configure script, by typing from
30 the top-level Emacs source directory:
31
32 ./autogen.sh
33
34 1. If you want to build Emacs outside of the source tree
35 (recommended), create the build directory and chdir there.
36
37 2. Invoke the MSYS-specific configure script:
38
39 - If you are building outside the source tree:
40
41 /PATH/TO/EMACS/SOURCE/TREE/nt/msysconfig.sh --prefix=PREFIX ...
42
43 - If you are building in-place, i.e. inside the source tree:
44
45 ./nt/msysconfig.sh --prefix=PREFIX ...
46
47 It is always preferable to use --prefix to configure Emacs for
48 some specific location of its installed tree; the default
49 /usr/local is not suitable for Windows (see the detailed
50 instructions for the reasons).
51
52 You can pass other options to the configure script. Here's a
53 typical example (for an in-place debug build):
54
55 CPPFLAGS='-DGLYPH_DEBUG=1' CFLAGS='-O0 -g3' ./nt/msysconfig.sh --prefix=/d/usr/emacs --enable-checking
56
57 3. After the configure script finishes, it should display the
58 resulting configuration. After that, type
59
60 make
61
62 Use "make -j N" if your MSYS Make supports parallel execution;
63 the build will take significantly less time in that case. Here N
64 is the number of simultaneous parallel jobs; use the number of
65 the cores on your system.
66
67 4. Install the produced binaries:
68
69 make install
70
71 If you want the installation tree to go to a place that is
72 different from the one specified by --prefix, say
73
74 make install prefix=/where/ever/you/want
75
76 That's it!
77
78 If these short instructions somehow fail, read the rest of this
79 file.
80
81* Installing MinGW and MSYS
82
83 Make sure you carefully read the following two sections in their
84 entirety and install/configure the various packages as instructed.
85 A correct installation makes all the rest almost trivial; a botched
86 installation will likely make you miserable for quite some time.
87
88 There are two alternative to installing MinGW + MSYS: using the GUI
89 installer, called mingw-get, provided by the MinGW project, or
90 manual installation. The next two sections describe each one of
91 these.
92
93** Installing MinGW and MSYS using mingw-get
94
95 A nice installer, called mingw-get, is available for those who don't
96 like to mess with manual installations. You can download it from
97 here:
98
99 https://sourceforge.net/projects/mingw/files/Installer/mingw-get/
100
101 (This installer only supports packages downloaded from the MinGW
102 site; for the rest you will still need the manual method.)
103
104 After installing mingw-get, invoke it to install the packages that
105 are already selected by default on the "Select Components" screen of
106 its wizard.
107
108 After that, use "mingw-get install PACKAGE" to install the following
109 additional packages:
110
111 . msys-base
112 . mingw-developer-toolkit
113
114 (We recommend that you refrain from installing the MSYS Texinfo
115 package, which is part of msys-base, because it might produce mixed
116 EOL format when installing Info files. Instead, install the MinGW
117 port of Texinfo, see the ezwinports URL below. To uninstall the
118 MSYS Texinfo, after installing it as part of msys-base, invoke the
119 command "mingw-get remove msys-texinfo".)
120
121 At this point, you should be ready to configure and build Emacs in
122 its basic configuration. Skip to the "Generating the configure
123 script" section for the build instructions. If you want to build it
124 with image support and other optional libraries, read about the
125 optional libraries near the end of this document, before you start
126 the build. Also, consider installing additional MinGW packages that
127 are required/recommended, especially if you are building from the
128 Bazaar repository, as described in the next section.
129
130** Installing MinGW and MSYS manually
131
132*** MinGW
133
134 You will need to install the MinGW port of GCC and Binutils, and the
135 MinGW runtime and Windows API distributions, to compile Emacs. You
136 can find these on the MinGW download/Base page:
137
138 https://sourceforge.net/projects/mingw/files/MinGW/Base/
139
140 In general, install the latest stable versions of the following
141 MinGW packages from that page: gcc, binutils, mingw-rt, w32api. You
142 only need the 'bin' and the 'dll' tarballs of each of the above.
143
144 MinGW packages are distributed as .tar.lzma compressed archives. To
145 install the packages manually, we recommend to use the Windows port
146 of the 'bsdtar' program to unpack the tarballs. 'bsdtar' is
147 available as part of the 'libarchive' package from here:
148
149 http://sourceforge.net/projects/ezwinports/files/
150
151 The recommended place to install these packages is a single tree
152 starting from some directory on a drive other than the system drive
153 C:. A typical example would be D:\usr, with D:\usr\bin holding the
154 binaries and DLLs (should be added to your Path environment
155 variable), D:\usr\include holding the include files, D:\usr\lib
156 holding the static and import libraries, D:\usr\share holding docs,
157 message catalogs, and package-specific subdirectories, etc.
158
159 Having all the headers and libraries in a single place will greatly
160 reduce the number of -I and -L flags you will have to pass to the
161 configure script (see below), as these files will be right where the
162 compiler expects them.
163
164 We specifically do NOT recommend installing packages below
165 "C:\Program Files" or "C:\Program Files (x86)". These directories
166 are protected on versions of Windows from Vista and on, and you will
167 have difficulties updating and maintaining your installation later,
168 due to UAC elevation prompts, file virtualization, etc. You *have*
169 been warned!
170
171 Additional MinGW packages are required/recommended, especially if
172 you are building from the Bazaar repository:
173
174 . Texinfo (needed to produce the Info manuals when building from
175 bzr, and for "make install")
176
177 Available from http://sourceforge.net/projects/ezwinports/files/.
178
179 . gzip (needed to compress files during "make install")
180
181 Available from http://gnuwin32.sourceforge.net/packages/gzip.htm.
182
183 . pkg-config (needed for building with some optional libraries,
184 such as GnuTLS and libxml2)
185
186 Available from http://www.gtk.org/download/win32.php
187
188 Each package might list other packages as prerequisites on its
189 download page (under "Runtime requirements"); download those as
190 well. (Using the mingw-get installer will fetch those prerequisites
191 automatically for you.) A missing prerequisite will manifest itself
192 by the program failing to run and presenting a pop-up dialog that
193 states the missing or incompatible DLL; be sure to find and install
194 these missing DLLs.
195
196 Once you think you have MinGW installed, test the installation by
197 building a trivial "hello, world!" program, and make sure that it
198 builds without any error messages and the binary works when run.
199
200*** MSYS
201
202 You will need a reasonably full MSYS installation. MSYS is an
203 environment needed to run the Posix configure scripts and the
204 resulting Makefile's, in order to produce native Windows binaries
205 using the MinGW compiler and runtime libraries. Here's the list of
206 MSYS packages that are required:
207
208 . All the packages from the MSYS Base distribution, listed here:
209
210 https://sourceforge.net/projects/mingw/files/MSYS/Base/
211
212 . Additional packages listed below, from the MSYS Extension
213 distribution here:
214
215 https://sourceforge.net/projects/mingw/files/MSYS/Extension/
216
217 - flex
218 - bison
219 - m4
220 - perl
221 - mktemp
222
223 These should only be needed if you intend to build development
224 versions of Emacs from the Bazaar repository.
225
226 . Additional packages (needed only if building from the Bazaar
227 repository): Automake and Autoconf. They are available from
228 here:
229
230 http://sourceforge.net/projects/ezwinports/files/automake-1.11.6-msys-bin.zip/download
231 http://sourceforge.net/projects/ezwinports/files/autoconf-2.65-msys-bin.zip/download
232
233 MSYS packages are distributed as .tar.lzma compressed archives. To
234 install the packages manually, we recommend to use the Windows port
235 of the 'bsdtar' program, already mentioned above.
236
237 If/when you are confident in your MinGW/MSYS installation, and want
238 to speed up the builds, we recommend installing a pre-release
239 version of Make from here:
240
241 https://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/
242
243 These are snapshot builds of many packages, but you only need
244 make.exe from there. The advantage of this make.exe is that it
245 supports parallel builds, so you can use "make -j N" to considerably
246 speed up your builds.
247
248 Several users reported that MSYS 1.0.18 causes Make to hang in
249 parallel builds. If you bump into this, we suggest to downgrade to
250 MSYS 1.0.17, which doesn't have that problem.
251
252 For each of these packages, install the 'bin' and 'dll' tarballs of
253 their latest stable releases. If there's an 'ext' tarball (e.g.,
254 msysCORE and Coreutils have it), download and install those as well.
255
256 Each package might list other packages as prerequisites on its
257 download page (under "Runtime requirements"); download those as
258 well. (Using the mingw-get installer will fetch those prerequisites
259 automatically for you.) A missing prerequisite will manifest itself
260 by the program failing to run and presenting a pop-up dialog that
261 states the missing or incompatible DLL; be sure to find and install
262 these missing DLLs.
263
264 MSYS packages should be installed in a separate tree from MinGW.
265 For example, use D:\MSYS or D:\usr\MSYS as the top-level directory
266 from which you unpack all of the MSYS packages.
267
268 Do NOT add the MSYS bin directory to your Windows Path! Only the
269 MinGW bin directory should be on Path. When you install MSYS, it
270 creates a shortcut on your desktop that invokes the MSYS Bash shell
271 in a Command Prompt window; that shell is already set up so that the
272 MSYS bin directory is on PATH ahead of any other directory. Thus,
273 Bash will find MSYS executables first, which is exactly what you
274 need.
275
276 At this point, you are ready to build Emacs in its basic
277 configuration. If you want to build it with image support and other
278 optional libraries, read about that near the end of this document.
279
280* Generating the configure script
281
282 If you are building a release or pretest tarball, skip this section,
283 because the configure script is already present in the tarball.
284
285 To build a development snapshot from the Emacs Bazaar repository,
286 you will first need to generate the configure script and a few other
287 auto-generated files. (If this step, described below, somehow
288 fails, you can use the files in the autogen/ directory instead, but
289 they might be outdated, and, most importantly, you are well advised
290 not to disregard any failures in your local build procedures, as
291 these are likely to be symptoms of incorrect installation that will
292 bite you down the road.)
293
294 To generate the configure script, type this at the MSYS Bash prompt
295 from the top-level directory of the Emacs tree:
296
297 ./autogen.sh
298
299 If successful, this command should produce the following output:
300
301 $ ./autogen.sh
302 Checking whether you have the necessary tools...
303 (Read INSTALL.BZR for more details on building Emacs)
304
305 Checking for autoconf (need at least version 2.65)...
306 ok
307 Checking for automake (need at least version 1.11)...
308 ok
309 Your system has the required tools, running autoreconf...
310 You can now run `./configure'.
311
312* Configuring Emacs for MinGW:
313
314 Now it's time to run the configure script. You can do that either
315 from a separate build directory that is outside of the Emacs source
316 tree (recommended), or from inside the source tree. The former is
317 recommended because it allows you to have several different builds,
318 e.g., an optimized build and an unoptimized one, of the same
319 revision of the source tree; the source tree will be left in its
320 pristine state, without any build products.
321
322 You invoke the configure script like this:
323
324 /PATH/TO/EMACS/SOURCE/TREE/nt/msysconfig.sh --prefix=PREFIX ...
325
326 or, if you are building in-place, i.e. inside the source tree:
327
328 ./nt/msysconfig.sh --prefix=PREFIX ...
329
330 Here PREFIX is the place where you eventually want to install Emacs
331 once built, e.g. /d/usr. We recommend to always use --prefix when
332 building Emacs on Windows, because the default '/usr/local' is not
333 appropriate for Windows: it will be mapped by MSYS to something like
334 C:\MSYS\local, and it will defeat the purpose of PREFIX, which is to
335 install programs in a single coherent tree resembling Posix systems.
336 Such a single-tree installation makes sure all the other programs
337 and packages ported from GNU or Unix systems will work seamlessly
338 together. Where exactly is the root of that tree on your system is
339 something only you, the user who builds Emacs, can know, and the
340 Emacs build process cannot guess, because usually there's no
341 '/usr/local' directory on any drive on Windows systems.
342
343 Do NOT use Windows-style x:/foo/bar file names on the configure
344 script command line; use the MSYS-style /x/foo/bar instead. Using
345 Windows-style file names was reported to cause subtle and hard to
346 figure out problems during the build. This applies both to the
347 command switches, such as --prefix=, and to the absolute file name
348 of msysconfig.sh, if you are building outside of the source tree.
349
350 You can pass additional options to the configure script, for the
351 full list type
352
353 ./nt/msysconfig.sh --help
354
355 As explained in the help text, you may need to tell the script what
356 are the optional flags to invoke the compiler. This is needed if
357 some of your headers and libraries, e.g., those belonging to
358 optional image libraries, are installed in places where the compiler
359 normally doesn't look for them. (Remember that advice above to
360 avoid such situations? here's is where you will start paying for
361 disregarding that recommendation.) For example, if you have libpng
362 headers in C:\emacs\libs\libpng-1.2.37-lib\include and jpeg library
363 headers in C:\emacs\libs\jpeg-6b-4-lib\include, you will need to say
364 something like this:
365
366 CPPFLAGS='-I/c/emacs/libs/libpng-1.2.37-lib/include -I/c/emacs/libs/jpeg-6b-4-lib/include' ./nt/msysconfig.sh --prefix=PREFIX
367
368 which is quite a mouth-full, especially if you have more directories
369 to specify... Perhaps you may wish to revisit your installation
370 decisions now.
371
372 If you have a global site-lisp directory from previous Emacs
373 installation, and you want Emacs to continue using it, specify it
374 via the --enable-locallisppath switch to msysconfig.sh, like this:
375
376 ./nt/msysconfig.sh --prefix=PREFIX --enable-locallisppath="/d/usr/share/emacs/VERSION/site-lisp:/d/wherever/site-lisp"
377
378 Use the normal MSYS /d/foo/bar style to specify directories by their
379 absolute file names.
380
381 A few frequently used options are needed when you want to produce an
382 unoptimized binary with runtime checks enabled:
383
384 CPPFLAGS='-DGLYPH_DEBUG=1' CFLAGS='-O0 -g3' ./nt/msysconfig.sh --prefix=PREFIX --enable-checking
385
386 Once invoked, the configure script will run for some time, and, if
387 successful, will eventually produce a summary of the configuration
388 like this:
389
390 Configured for `i686-pc-mingw32'.
391
392 Where should the build process find the source code? /path/to/emacs/sources
393 What compiler should emacs be built with? gcc -std=gnu99 -O0 -g3
394 Should Emacs use the GNU version of malloc? yes
395 Should Emacs use a relocating allocator for buffers? yes
396 Should Emacs use mmap(2) for buffer allocation? no
397 What window system should Emacs use? w32
398 What toolkit should Emacs use? none
399 Where do we find X Windows header files? NONE
400 Where do we find X Windows libraries? NONE
401 Does Emacs use -lXaw3d? no
402 Does Emacs use -lXpm? yes
403 Does Emacs use -ljpeg? yes
404 Does Emacs use -ltiff? yes
405 Does Emacs use a gif library? yes
406 Does Emacs use -lpng? yes
407 Does Emacs use -lrsvg-2? no
408 Does Emacs use imagemagick? no
409 Does Emacs use -lgpm? no
410 Does Emacs use -ldbus? no
411 Does Emacs use -lgconf? no
412 Does Emacs use GSettings? no
413 Does Emacs use -lselinux? no
414 Does Emacs use -lgnutls? yes
415 Does Emacs use -lxml2? yes
416 Does Emacs use -lfreetype? no
417 Does Emacs use -lm17n-flt? no
418 Does Emacs use -lotf? no
419 Does Emacs use -lxft? no
420 Does Emacs use toolkit scroll bars? yes
421
422 You are almost there, hang on.
423
424 If the output is significantly different, or if configure finishes
425 prematurely and displays some error message, you should examine the
426 configuration log in config.log and find the reason for the failure.
427
428 Once you succeeded in configuring Emacs, and just want to rebuild it
429 after updating your local repository from the main repository, you
430 don't need to re-run the configure script manually, unless you want
431 to change the configure-time options. Just typing "make" will
432 re-run configure if necessary with the exact same options you
433 specified originally, and then go on to invoking Make, described
434 below.
435
436* Running Make.
437
438 This is simple: just type "make" and sit back, watching the fun.
439
440 If you installed a snapshot build of Make, the build will be much
441 faster if you type "make -j N" instead, where N is the number of
442 independent processing units on your machine. E.g., on a core i7
443 system try using N of 6 or even 8. (If this hangs, see the notes
444 above about downgrading to MSYS 1.0.17.)
445
446 When Make finishes, you can install the produced binaries:
447
448 make install
449
450 or, if you want the installed tree to go in a place different from
451 the configured one, type
452
453 make install prefix=WHEREVER
454
455 Congrats! You have built and installed your own Emacs!
456
457* Make targets
458
459 The following make targets may be used by users building the source
460 distribution, or users who have checked out of Bazaar after
461 an initial bootstrapping.
462
463 make
464 Builds Emacs from the available sources and pre-compiled lisp files.
465
466 make install
467 Installs the built programs and the auxiliary files.
468
469 make clean
470 Removes object and executable files produced by the build process in
471 the current configuration. After "make clean", you can rebuild with
472 the same configuration using make. useful when you want to be sure
473 that all of the products are built from coherent sources.
474
475 make distclean
476 In addition to the files removed by make clean, this also removes
477 Makefiles and other generated files to get back to the state of a
478 freshly unpacked source distribution. After make distclean, it is
479 necessary to run the configure script followed by "make", in order
480 to rebuild.
481
482 The following targets are intended only for use with the Bazaar sources.
483
484 make bootstrap
485 Removes all the auto-generated files and all the *.elc byte-compiled
486 files, and builds Emacs from scratch. Useful when some change in
487 basic Emacs functionality makes byte compilation of updated files
488 fail.
489
490 make maintainer-clean
491 Removes everything that can be recreated, including compiled Lisp
492 files, to get back to the state of a fresh Bazaar tree. After make
493 maintainer-clean, it is necessary to run configure and "make" or
494 "make bootstrap" to rebuild. Occasionally it may be necessary to
495 run this target after an update.
496
497* Optional image library support
498
499 In addition to its "native" image formats (pbm and xbm), Emacs can
500 handle other image types: xpm, tiff, gif, png, jpeg and experimental
501 support for svg.
502
503 To build Emacs with support for them, the corresponding headers must
504 be in the include path and libraries should be where the linker
505 looks for them, when the configure script is run. If needed, this
506 can be set up using the CPPFLAGS and CFLAGS variable specified on
507 the configure command line. The configure script will report
508 whether it was able to detect the headers and libraries. If the
509 results of this testing appear to be incorrect, please look for
510 details in the file config.log: it will show the failed test
511 programs and compiler error messages that should explain what is
512 wrong. (Usually, any such failures happen because some headers are
513 missing due to bad packaging of the image support libraries.)
514
515 Note that any file path passed to the compiler or linker must use
516 forward slashes, or double each backslash, as that is how Bash
517 works.
518
519 If the configure script finds the necessary headers and libraries,
520 but they are for some reason incompatible, or if you want to omit
521 support for some image library that is installed on your system for
522 some other reason, use the --without-PACKAGE option to configure,
523 such as --without-gif to omit GIF, --without-tiff to omit TIFF, etc.
524 Passing the --help option to the configure script displays all of
525 the supported --without-PACKAGE options.
526
527 To use the external image support, the DLLs implementing the
528 functionality must be found when Emacs first needs them, either on the
529 PATH, or in the same directory as emacs.exe. Failure to find a
530 library is not an error; the associated image format will simply be
531 unavailable. Note that once Emacs has determined that a library can
532 not be found, there's no way to force it to try again, other than
533 restarting. See the variable `dynamic-library-alist' to configure the
534 expected names of the libraries.
535
536 Some image libraries have dependencies on one another, or on zlib.
537 For example, tiff support depends on the jpeg library. If you did not
538 compile the libraries yourself, you must make sure that any dependency
539 is in the PATH or otherwise accessible and that the binaries are
540 compatible (for example, that they were built with the same compiler).
541
542 Binaries for the image libraries (among many others) can be found at
543 the GnuWin32 project. The PNG libraries are also included with GTK,
544 which is installed along with other Free Software that requires it.
545 Note specifically that, due to some packaging snafus in the
546 GnuWin32-supplied image libraries, you will need to download
547 _source_ packages for some of the libraries in order to get the
548 header files necessary for building Emacs with image support.
549
550 For PNG images, we recommend to use versions 1.4.x and later of
551 libpng, because previous versions had security issues. You can find
552 precompiled libraries and headers on the GTK download page for
553 Windows (http://www.gtk.org/download/win32.php).
554
555 Versions 1.4.0 and later of libpng are binary incompatible with
556 earlier versions, so Emacs will only look for libpng libraries which
557 are compatible with the version it was compiled against. That
558 version is given by the value of the Lisp variable `libpng-version';
559 e.g., 10403 means version 1.4.3. The variable `dynamic-library-alist'
560 is automatically set to name only those DLL names that are known to
561 be compatible with the version given by `libpng-version'. If PNG
562 support does not work for you even though you have the support DLL
563 installed, check the name of the installed DLL against
564 `dynamic-library-alist' and the value of `libpng-version', and
565 download compatible DLLs if needed.
566
567* Optional GnuTLS support
568
569 To compile with GnuTLS, you will need pkg-config to be installed, as
570 the configure script invokes pkg-config to find out which compiler
571 switches to use for GnuTLS. See above for the URL where you can
572 find pkg-config for Windows.
573
574 You will also need to install the p11-kit package, which is a
575 dependency of GnuTLS, and its header files are needed for
576 compilation of programs that use GnuTLS. You can find p11-kit on
577 the same site as GnuTLS, see the URL below.
578
579 If the configure script finds the GnuTLS header files and libraries
580 on your system, Emacs is built with GnuTLS support by default; to
581 avoid that you can pass the argument --without-gnutls.
582
583 In order to support GnuTLS at runtime, a GnuTLS-enabled Emacs must
584 be able to find the relevant DLLs during startup; failure to do so
585 is not an error, but GnuTLS won't be available to the running
586 session.
587
588 You can get pre-built binaries (including any required DLL and the
589 header files) at http://sourceforge.net/projects/ezwinports/files/.
590
591* Optional libxml2 support
592
593 To compile with libxml2, you will need pkg-config to be installed,
594 as the configure script invokes pkg-config to find out which
595 compiler switches to use for libxml2. See above for the URL where
596 you can find pkg-config for Windows.
597
598 If the configure script finds the libxml2 header files and libraries
599 on your system, Emacs is built with libxml2 support by default; to
600 avoid that you can pass the argument --without-libxml2.
601
602 In order to support libxml2 at runtime, a libxml2-enabled Emacs must
603 be able to find the relevant DLLs during startup; failure to do so
604 is not an error, but libxml2 features won't be available to the
605 running session.
606
607 One place where you can get pre-built Windows binaries of libxml2
608 (including any required DLL and the header files) is here:
609
610 http://sourceforge.net/projects/ezwinports/files/
611
612 For runtime support of libxml2, you will also need to install the
613 libiconv "development" tarball, because the libiconv headers need to
614 be available to the compiler when you compile with libxml2 support.
615 A MinGW port of libiconv can be found on the MinGW site:
616
617 http://sourceforge.net/projects/mingw/files/MinGW/Base/libiconv/
618
619 You need the libiconv-X.Y.Z-N-mingw32-dev.tar.lzma tarball from that
620 site.
621
622* Experimental SVG support
623
624 To compile with SVG, you will need pkg-config to be installed, as
625 the configure script invokes pkg-config to find out which compiler
626 switches to use for SVG. See above for the URL where you can find
627 pkg-config for Windows.
628
629 SVG support is currently experimental, and not built by default.
630 Specify --with-rsvg and ensure you have all the dependencies in your
631 include path. Unless you have built a minimalist librsvg yourself
632 (untested), librsvg depends on a significant chunk of GTK+ to build,
633 plus a few Gnome libraries, libxml2, libbz2 and zlib at runtime. The
634 easiest way to obtain the dependencies required for building is to
635 download a pre-bundled GTK+ development environment for Windows.
636
637 To use librsvg at runtime, ensure that librsvg and its dependencies
638 are on your PATH. If you didn't build librsvg yourself, you will
639 need to check with where you downloaded it from for the
640 dependencies, as there are different build options. If it is a
641 short list, then it most likely only lists the immediate
642 dependencies of librsvg, but the dependencies themselves have
643 dependencies - so don't download individual libraries from GTK+,
644 download and install the whole thing. If you think you've got all
645 the dependencies and SVG support is still not working, check your
646 PATH for other libraries that shadow the ones you downloaded.
647 Libraries of the same name from different sources may not be
648 compatible, this problem was encountered with libbzip2 from GnuWin32
649 with libcroco from gnome.org.
650
651 If you can see etc/images/splash.svg, then you have managed to get
652 SVG support working. Congratulations for making it through DLL hell
653 to this point. You'll probably find that some SVG images crash
654 Emacs. Problems have been observed in some images that contain
655 text, they seem to be a problem in the Windows port of Pango, or
656 maybe a problem with the way Cairo or librsvg is using it that
657 doesn't show up on other platforms.
658
659
660This file is part of GNU Emacs.
661
662GNU Emacs is free software: you can redistribute it and/or modify
663it under the terms of the GNU General Public License as published by
664the Free Software Foundation, either version 3 of the License, or
665(at your option) any later version.
666
667GNU Emacs is distributed in the hope that it will be useful,
668but WITHOUT ANY WARRANTY; without even the implied warranty of
669MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
670GNU General Public License for more details.
671
672You should have received a copy of the GNU General Public License
673along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
diff --git a/nt/INSTALL.OLD b/nt/INSTALL.OLD
new file mode 100644
index 00000000000..20162de8b3e
--- /dev/null
+++ b/nt/INSTALL.OLD
@@ -0,0 +1,752 @@
1 Building and Installing Emacs on Windows
2 (from 95 to 7 and beyond)
3
4 Copyright (C) 2001-2013 Free Software Foundation, Inc.
5 See the end of the file for license conditions.
6
7*** This method of building Emacs is no longer supported. ***
8 It may fail to produce a correctly working Emacs.
9 Do not report bugs associated with this build method.
10 Instead, follow the new instructions in INSTALL.
11
12* For the impatient
13
14 Here are the concise instructions for configuring and building the
15 native Windows binary of Emacs, for those who want to skip the
16 complex explanations and ``just do it'':
17
18 Do not use this recipe with Cygwin. For building on Cygwin,
19 use the normal installation instructions, ../INSTALL.
20
21 Do not use these instructions with MSYS environment. For building
22 the native Windows binary with MinGW and MSYS, follow the
23 instructions in the file INSTALL in this directory.
24
25 For building without MSYS, if you have a Cygwin or MSYS port of Bash
26 on your Path, you will be better off removing it from PATH. (For
27 details, search for "MSYS sh.exe" below.)
28
29 1. Change to the `nt' directory (the directory of this file):
30
31 cd nt
32
33 2. Run configure.bat.
34
35 2a.If you use MSVC, set up the build environment by running the
36 SetEnv.cmd batch file from the appropriate SDK directory. (Skip
37 this step if you are using MinGW.) For example:
38
39 "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86 /Debug
40
41 if you are going to compile a debug version, or
42
43 "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86 /Release
44
45 if you are going to compile an optimized version.
46
47 2b.From the COMMAND.COM/CMD.EXE command prompt type:
48
49 configure
50
51 From a Unixy shell prompt:
52
53 cmd /c configure.bat
54 or
55 command.com /c configure.bat
56
57 3. Run the Make utility suitable for your environment. If you build
58 with the Microsoft's Visual C compiler:
59
60 nmake
61
62 For the development environments based on GNU GCC (MinGW, MSYS,
63 Cygwin - but see notes about Cygwin make below), depending on how
64 Make is called, it could be:
65
66 make
67 or
68 mingw32-make
69 or
70 gnumake
71 or
72 gmake
73
74 (If you are building from Bazaar, say "make bootstrap" or "nmake
75 bootstrap" instead, and avoid using Cygwin make.)
76
77 With GNU Make, you can use the -j command-line option to have
78 Make execute several commands at once, like this:
79
80 gmake -j 2
81
82 (With versions of GNU Make before 3.82, you need also set the
83 XMFLAGS variable, like this:
84
85 gmake -j 2 XMFLAGS="-j 2"
86
87 The XMFLAGS variable overrides the default behavior of version
88 3.82 and older of GNU Make on Windows, whereby recursive Make
89 invocations reset the maximum number of simultaneous commands to
90 1. The above command allows up to 4 simultaneous commands at
91 once in the top-level Make, and up to 3 in each one of the
92 recursive Make's.)
93
94 4. Generate the Info manuals (only if you are building out of Bazaar,
95 and if you have makeinfo.exe installed):
96
97 make info
98
99 (change "make" to "nmake" if you use MSVC).
100
101 5. Install the produced binaries:
102
103 make install
104
105 That's it!
106
107 If these short instructions somehow fail, read the rest of this
108 file.
109
110* Preliminaries
111
112 If you want to build a Cygwin port of Emacs, use the instructions in
113 the INSTALL file in the main Emacs directory (the parent of this
114 directory). These instructions are for building a native Windows
115 binary of Emacs.
116
117 If you used WinZip to unpack the distribution, we suggest to
118 remove the files and unpack again with a different program!
119 WinZip is known to create some subtle and hard to debug problems,
120 such as converting files to DOS CR-LF format, not creating empty
121 directories, etc. We suggest to use djtarnt.exe from the GNU FTP
122 site. For modern formats, such as .tar.xz, we suggest bsdtar.exe
123 from the libarchive package; its precompiled Windows binaries are
124 available from this site:
125
126 http://sourceforge.net/projects/ezwinports/files/
127
128 In addition to this file, if you build a development snapshot, you
129 should also read INSTALL.BZR in the parent directory.
130
131* Supported development environments
132
133 To compile Emacs, you will need either Microsoft Visual C++ 2.0, or
134 later and nmake, or a Windows port of GCC 2.95 or later with MinGW
135 and Windows API support and a port of GNU Make. You can use the Cygwin
136 ports of GCC, but Emacs requires the MinGW headers and libraries to
137 build (latest versions of the Cygwin toolkit, at least since v1.3.3,
138 include the MinGW headers and libraries as an integral part).
139
140 The rest of this file assumes you have a working development
141 environment. If you just installed such an environment, try
142 building a trivial C "Hello world" program, and see if it works. If
143 it doesn't work, resolve that problem first! If you use Microsoft
144 Visual Studio .NET 2003, don't forget to run the VCVARS32.BAT batch
145 file from the `Bin' subdirectory of the directory where you have
146 installed VS.NET. With other versions of MSVC, run the SetEnv.cmd
147 batch file from the `Bin' subdirectory of the directory where you
148 have the SDK installed.
149
150 If you use the MinGW port of GCC and GNU Make to build Emacs, there
151 are some compatibility issues wrt Make and the shell that is run by
152 Make, either the standard COMMAND.COM/CMD.EXE supplied with Windows
153 or sh.exe, a port of a Unixy shell. For reference, below is a list
154 of which builds of GNU Make are known to work or not, and whether
155 they work in the presence and/or absence of sh.exe, the Cygwin port
156 of Bash. Note that any version of Make that is compiled with Cygwin
157 will only work with Cygwin tools, due to the use of Cygwin style
158 paths. This means Cygwin Make is unsuitable for building parts of
159 Emacs that need to invoke Emacs itself (leim and "make bootstrap",
160 for example). Also see the Trouble-shooting section below if you
161 decide to go ahead and use Cygwin make.
162
163 In addition, using 4NT or TCC as your shell is known to fail the
164 build process, at least since 4NT version 3.01. Use CMD.EXE, the
165 default Windows shell, instead. MSYS sh.exe also appears to cause
166 various problems, e.g., it is known to cause failures in commands
167 like "cmd /c FOO" in the Makefiles, because it thinks "/c" is a
168 Unix-style file name that needs conversion to the Windows format.
169 If you have MSYS installed, try "make SHELL=cmd.exe" to force the
170 use of cmd.exe instead of the MSYS sh.exe.
171
172 sh exists no sh
173
174 cygwin b20.1 make (3.75): fails[1, 5] fails[2, 5]
175 MSVC compiled gmake 3.77: okay okay
176 MSVC compiled gmake 3.78.1: okay okay
177 MSVC compiled gmake 3.79.1: okay okay
178 mingw32/gcc-2.92.2 make (3.77): okay okay[4]
179 cygwin compiled gmake 3.77: fails[1, 5] fails[2, 5]
180 cygwin compiled make 3.78.1: fails[5] fails[2, 5]
181 cygwin compiled make 3.79.1: fails[3, 5] fails[2?, 5]
182 cygwin compiled make 3.80: okay[6] fails?[7]
183 cygwin compiled make 3.81: fails fails?[7]
184 mingw32 compiled make 3.79.1: okay okay
185 mingw32 compiled make 3.80: okay okay[7]
186 mingw32 compiled make 3.81: okay okay[8]
187
188 Notes:
189
190 [1] doesn't cope with makefiles with DOS line endings, so must mount
191 emacs source with text!=binary.
192 [2] fails when needs to invoke shell commands; okay invoking gcc etc.
193 [3] requires LC_MESSAGES support to build; cannot build with early
194 versions of Cygwin.
195 [4] may fail on Windows 9X and Windows ME; if so, install Bash.
196 [5] fails when building leim due to the use of cygwin style paths.
197 May work if building emacs without leim.
198 [6] need to uncomment 3 lines in nt/gmake.defs that invoke `cygpath'
199 (look for "cygpath" near line 85 of gmake.defs).
200 [7] not recommended; please report if you try this combination.
201 [8] tested only on Windows XP.
202
203 Other compilers may work, but specific reports from people that have
204 tried suggest that the Intel C compiler (for example) may produce an
205 Emacs executable with strange filename completion behavior. Unless
206 you would like to assist by finding and fixing the cause of any bugs
207 like this, we recommend the use of the supported compilers mentioned
208 in the previous paragraph.
209
210 You will also need a copy of the POSIX cp, rm and mv programs. These
211 and other useful POSIX utilities can be obtained from one of several
212 projects:
213
214 * http://gnuwin32.sourceforge.net/ ( GnuWin32 )
215 * http://www.mingw.org/ ( MinGW )
216 * http://www.cygwin.com/ ( Cygwin )
217 * http://unxutils.sourceforge.net/ ( UnxUtils )
218
219 If you build Emacs on 16-bit versions of Windows (9X or ME), we
220 suggest to install the Cygwin port of Bash. That is because the
221 native Windows shell COMMAND.COM is too limited; the Emacs build
222 procedure tries very hard to support even such limited shells, but
223 as none of the Windows developers of Emacs work on Windows 9X, we
224 cannot guarantee that it works without a more powerful shell.
225
226 Additional instructions and help for building Emacs on Windows can be
227 found at the Emacs Wiki:
228
229 http://www.emacswiki.org/cgi-bin/wiki/WThirtyTwoInstallationKit
230
231 and on these URLs:
232
233 http://ourcomments.org/Emacs/w32-build-emacs.html
234 http://derekslager.com/blog/posts/2007/01/emacs-hack-3-compile-emacs-from-cvs-on-windows.ashx
235
236 Both of those pages were written before Emacs switched from CVS to
237 Bazaar, but the parts about building Emacs still apply in Bazaar.
238 The second URL has instructions for building with MSVC, as well as
239 with MinGW, while the first URL covers only MinGW, but has more
240 details about it.
241
242* Configuring
243
244 Configuration of Emacs is now handled by running configure.bat in the
245 `nt' subdirectory. It will detect which compiler you have available,
246 and generate makefiles accordingly. You can override the compiler
247 detection, and control optimization and debug settings, by specifying
248 options on the command line when invoking configure.
249
250 To configure Emacs to build with GCC or MSVC, whichever is available,
251 simply change to the `nt' subdirectory and run `configure.bat' with no
252 options. To see what options are available, run `configure --help'.
253 Do NOT use the --no-debug option to configure.bat unless you are
254 absolutely sure the produced binaries will never need to be run under
255 a debugger.
256
257 Because of limitations of the stock Windows command shells, special
258 care is needed to pass some characters in the arguments of the
259 --cflags and --ldflags options. Backslashes should not be used in
260 file names passed to the compiler and linker via these options. Use
261 forward slashes instead. If the arguments to these two options
262 include the `=' character, like when passing a -DFOO=bar preprocessor
263 option, the argument with the `=' character should be enclosed in
264 quotes, like this:
265
266 configure --cflags "-DFOO=bar"
267
268 Support for options that include the `=' character require "command
269 extensions" to be enabled. (They are enabled by default, but your
270 system administrator could have changed that. See "cmd /?" for
271 details.) If command extensions are disabled, a warning message might
272 be displayed informing you that "using parameters that include the =
273 character by enclosing them in quotes will not be supported."
274
275 You may also use the --cflags and --ldflags options to pass
276 additional parameters to the compiler and linker, respectively; they
277 are frequently used to pass -I and -L flags to specify supplementary
278 include and library directories. If a directory name includes
279 spaces, you will need to enclose it in quotes, as follows
280 -I"C:/Program Files/GnuTLS-2.10.1/include". Note that only the
281 directory name is enclosed in quotes, not the entire argument. Also
282 note that this functionality is only supported if command extensions
283 are available. If command extensions are disabled and you attempt to
284 use this functionality you may see the following warning message
285 "Error in --cflags argument: ... Backslashes and quotes cannot be
286 used with --cflags. Please use forward slashes for filenames and
287 paths (e.g. when passing directories to -I)."
288
289 N.B. It is normal to see a few error messages output while configure
290 is running, when gcc support is being tested. These cannot be
291 suppressed because of limitations in the Windows 9X command.com shell.
292
293 You are encouraged to look at the file config.log which shows details
294 for failed tests, after configure.bat finishes. Any unexplained failure
295 should be investigated and perhaps reported as a bug (see the section
296 about reporting bugs in the file README in this directory and in the
297 Emacs manual).
298
299* Optional image library support
300
301 In addition to its "native" image formats (pbm and xbm), Emacs can
302 handle other image types: xpm, tiff, gif, png, jpeg and experimental
303 support for svg.
304
305 To build Emacs with support for them, the corresponding headers must
306 be in the include path when the configure script is run. This can
307 be setup using environment variables, or by specifying --cflags
308 -I... options on the command-line to configure.bat. The configure
309 script will report whether it was able to detect the headers. If
310 the results of this testing appear to be incorrect, please look for
311 details in the file config.log: it will show the failed test
312 programs and compiler error messages that should explain what is
313 wrong. (Usually, any such failures happen because some headers are
314 missing due to bad packaging of the image support libraries.)
315
316 Note that any file path passed to the compiler or linker must use
317 forward slashes; using backslashes will cause compiler warnings or
318 errors about unrecognized escape sequences.
319
320 To use the external image support, the DLLs implementing the
321 functionality must be found when Emacs first needs them, either on the
322 PATH, or in the same directory as emacs.exe. Failure to find a
323 library is not an error; the associated image format will simply be
324 unavailable. Note that once Emacs has determined that a library can
325 not be found, there's no way to force it to try again, other than
326 restarting. See the variable `dynamic-library-alist' to configure the
327 expected names of the libraries.
328
329 Some image libraries have dependencies on one another, or on zlib.
330 For example, tiff support depends on the jpeg library. If you did not
331 compile the libraries yourself, you must make sure that any dependency
332 is in the PATH or otherwise accessible and that the binaries are
333 compatible (for example, that they were built with the same compiler).
334
335 Binaries for the image libraries (among many others) can be found at
336 the GnuWin32 project. PNG, JPEG and TIFF libraries are also
337 included with GTK, which is installed along with other Free Software
338 that requires it. These are built with MinGW, but they can be used
339 with both GCC/MinGW and MSVC builds of Emacs. See the info on
340 http://ourcomments.org/Emacs/w32-build-emacs.html, under "How to Get
341 Images Support", for more details about installing image support
342 libraries. Note specifically that, due to some packaging snafus in
343 the GnuWin32-supplied image libraries, you will need to download
344 _source_ packages for some of the libraries in order to get the
345 header files necessary for building Emacs with image support.
346
347 If GTK 2.0 is installed, addpm will arrange for its image libraries
348 to be on the DLL search path for Emacs.
349
350 For PNG images, we recommend to use versions 1.4.x and later of
351 libpng, because previous versions had security issues. You can find
352 precompiled libraries and headers on the GTK download page for
353 Windows (http://www.gtk.org/download/win32.php).
354
355 Versions 1.4.0 and later of libpng are binary incompatible with
356 earlier versions, so Emacs will only look for libpng libraries which
357 are compatible with the version it was compiled against. That
358 version is given by the value of the Lisp variable `libpng-version';
359 e.g., 10403 means version 1.4.3. The variable `dynamic-library-alist'
360 is automatically set to name only those DLL names that are known to
361 be compatible with the version given by `libpng-version'. If PNG
362 support does not work for you even though you have the support DLL
363 installed, check the name of the installed DLL against
364 `dynamic-library-alist' and the value of `libpng-version', and
365 download compatible DLLs if needed.
366
367* Optional GnuTLS support
368
369 If configure.bat finds the gnutls/gnutls.h file in the include path,
370 Emacs is built with GnuTLS support by default; to avoid that you can
371 pass the argument --without-gnutls.
372
373 In order to support GnuTLS at runtime, a GnuTLS-enabled Emacs must
374 be able to find the relevant DLLs during startup; failure to do so
375 is not an error, but GnuTLS won't be available to the running
376 session.
377
378 You can get pre-built binaries (including any required DLL and the
379 header files) at http://sourceforge.net/projects/ezwinports/files/.
380
381* Optional libxml2 support
382
383 If configure.bat finds the libxml/HTMLparser.h file in the include path,
384 Emacs is built with libxml2 support by default; to avoid that you can
385 pass the argument --without-libxml2.
386
387 In order to support libxml2 at runtime, a libxml2-enabled Emacs must
388 be able to find the relevant DLLs during startup; failure to do so
389 is not an error, but libxml2 features won't be available to the
390 running session.
391
392 One place where you can get pre-built Windows binaries of libxml2
393 (including any required DLL and the header files) is here:
394
395 http://sourceforge.net/projects/ezwinports/files/
396
397 To compile Emacs with libxml2 from that site, you will need to pass
398 the "--cflags -I/path/to/include/libxml2" option to configure.bat,
399 because libxml2 header files are installed in the include/libxml2
400 subdirectory of the directory where you unzip the binary
401 distribution. Other binary distributions might use other
402 directories, although include/libxml2 is the canonical place where
403 libxml2 headers are installed on Posix platforms.
404
405 You will also need to install the libiconv "development" tarball,
406 because the libiconv headers need to be available to the compiler
407 when you compile with libxml2 support. A MinGW port of libiconv can
408 be found on the MinGW site:
409
410 http://sourceforge.net/projects/mingw/files/MinGW/Base/libiconv/
411
412 You need the libiconv-X.Y.Z-N-mingw32-dev.tar.lzma tarball from that
413 site.
414
415* Experimental SVG support
416
417 SVG support is currently experimental, and not built by default.
418 Specify --with-svg and ensure you have all the dependencies in your
419 include path. Unless you have built a minimalist librsvg yourself
420 (untested), librsvg depends on a significant chunk of GTK+ to build,
421 plus a few Gnome libraries, libxml2, libbz2 and zlib at runtime. The
422 easiest way to obtain the dependencies required for building is to
423 download a pre-bundled GTK+ development environment for Windows.
424 GTK puts its header files all over the place, so you will need to
425 run pkgconfig to list the include path you will need (either passed
426 to configure.bat as --cflags options, or set in the environment).
427
428 To use librsvg at runtime, ensure that librsvg and its dependencies
429 are on your PATH. If you didn't build librsvg yourself, you will
430 need to check with where you downloaded it from for the
431 dependencies, as there are different build options. If it is a
432 short list, then it most likely only lists the immediate
433 dependencies of librsvg, but the dependencies themselves have
434 dependencies - so don't download individual libraries from GTK+,
435 download and install the whole thing. If you think you've got all
436 the dependencies and SVG support is still not working, check your
437 PATH for other libraries that shadow the ones you downloaded.
438 Libraries of the same name from different sources may not be
439 compatible, this problem was encountered with libbzip2 from GnuWin32
440 with libcroco from gnome.org.
441
442 If you can see etc/images/splash.svg, then you have managed to get
443 SVG support working. Congratulations for making it through DLL hell
444 to this point. You'll probably find that some SVG images crash
445 Emacs. Problems have been observed in some images that contain
446 text, they seem to be a problem in the Windows port of Pango, or
447 maybe a problem with the way Cairo or librsvg is using it that
448 doesn't show up on other platforms.
449
450* Optional extra runtime checks
451
452 The configure.bat option --enable-checking builds Emacs with some
453 optional extra runtime checks and assertions enabled. This may be
454 useful for debugging.
455
456* Optional extra libraries
457
458 You can pass --lib LIBNAME option to configure.bat to cause Emacs to
459 link with the specified library. You can use this option more than once.
460
461* Building
462
463 After running configure, simply run the appropriate `make' program for
464 your compiler to build Emacs. For MSVC, this is nmake; for GCC, it is
465 GNU make. (If you are building out of Bazaar, say "make bootstrap" or
466 "nmake bootstrap" instead.)
467
468 As the files are compiled, you will see some warning messages
469 declaring that some functions don't return a value, or that some data
470 conversions will be lossy, etc. You can safely ignore these messages.
471 The warnings may be fixed in the main FSF source at some point, but
472 until then we will just live with them.
473
474 With GNU Make, you can use the -j command-line option to have Make
475 execute several commands at once, like this:
476
477 gmake -j 4 XMFLAGS="-j 3"
478
479 The XMFLAGS variable overrides the default behavior of GNU Make on
480 Windows, whereby recursive Make invocations reset the maximum number
481 of simultaneous commands to 1. The above command allows up to 4
482 simultaneous commands at once in the top-level Make, and up to 3 in
483 each one of the recursive Make's; you can use other numbers of jobs,
484 if you wish.
485
486 If you are building from Bazaar, the following commands will produce
487 the Info manuals (which are not part of the Bazaar sources):
488
489 make info
490 or
491 nmake info
492
493 Note that you will need makeinfo.exe (from the GNU Texinfo package)
494 in order for this command to succeed.
495
496* Installing
497
498 To install Emacs after it has compiled, simply run `nmake install'
499 or `make install', depending on which version of the Make utility
500 do you have.
501
502 By default, Emacs will be installed in the location where it was
503 built, but a different location can be specified either using the
504 --prefix option to configure, or by setting INSTALL_DIR when running
505 make, like so:
506
507 make install INSTALL_DIR=D:/emacs
508
509 (for `nmake', type "nmake install INSTALL_DIR=D:/emacs" instead).
510
511 The install process will run addpm to setup the registry entries, and
512 to create a Start menu icon for Emacs.
513
514* Make targets
515
516 The following make targets may be used by users building the source
517 distribution, or users who have checked out of Bazaar after
518 an initial bootstrapping.
519
520 make
521 Builds Emacs from the available sources and pre-compiled lisp files.
522
523 make install
524 Installs programs to the bin directory, and runs addpm to create
525 Start Menu icons.
526
527 make clean
528 Removes object and executable files produced by the build process in
529 the current configuration. After make clean, you can rebuild with
530 the same configuration using make.
531
532 make distclean
533 In addition to the files removed by make clean, this also removes
534 Makefiles and other generated files to get back to the state of a
535 freshly unpacked source distribution. Note that this will not remove
536 installed files, or the results of builds performed with different
537 compiler or optimization options than the current configuration.
538 After make distclean, it is necessary to run configure.bat followed
539 by make to rebuild.
540
541 make cleanall
542 Removes object and executable files that may have been created by
543 previous builds with different configure options, in addition to
544 the files produced by the current configuration.
545
546 make realclean
547 Removes the installed files in the bin subdirectory in addition to
548 the files removed by make cleanall.
549
550 make dist
551 Builds Emacs from the available sources and pre-compiled lisp files.
552 Packages Emacs binaries as full distribution and barebin distribution.
553
554 The following targets are intended only for use with the Bazaar sources.
555
556 make bootstrap
557 Creates a temporary emacs binary with lisp source files and
558 uses it to compile the lisp files. Once the lisp files are built,
559 emacs is redumped with the compiled lisp.
560
561 make recompile
562 Recompiles any changed lisp files after an update. This saves
563 doing a full bootstrap after every update. If this or a subsequent
564 make fail, you probably need to perform a full bootstrap, though
565 running this target multiple times may eventually sort out the
566 interdependencies.
567
568 make maintainer-clean
569 Removes everything that can be recreated, including compiled lisp
570 files, to get back to the state of a fresh Bazaar tree. After make
571 maintainer-clean, it is necessary to run configure.bat and make
572 bootstrap to rebuild. Occasionally it may be necessary to run this
573 target after an update.
574
575* Creating binary distributions
576
577 Binary distributions (full and barebin distributions) can be
578 automatically built and packaged from source tarballs or a bzr
579 checkout.
580
581 When building Emacs binary distributions, the --distfiles argument
582 to configure.bat specifies files to be included in the bin directory
583 of the binary distributions. This is intended for libraries that are
584 not built as part of Emacs, e.g. image libraries.
585
586 For example, specifying
587
588 --distfiles D:\distfiles\libXpm.dll
589
590 results in libXpm.dll being copied from D:\distfiles to the
591 bin directory before packaging starts.
592
593 Multiple files can be specified using multiple --distfiles arguments:
594
595 --distfiles D:\distfiles\libXpm.dll --distfiles C:\jpeglib\jpeg.dll
596
597 For packaging the binary distributions, the 'dist' make target uses
598 7-Zip (http://www.7-zip.org), which must be installed and available
599 on the Windows Path.
600
601
602* Trouble-shooting
603
604 The main problems that are likely to be encountered when building
605 Emacs stem from using an old version of GCC, or old MinGW or Windows API
606 headers. Additionally, Cygwin ports of GNU make may require the Emacs
607 source tree to be mounted with text!=binary, because the makefiles
608 generated by configure.bat necessarily use DOS line endings. Also,
609 Cygwin ports of make must run in UNIX mode, either by specifying
610 --unix on the command line, or MAKE_MODE=UNIX in the environment.
611
612 When configure runs, it attempts to detect when GCC itself, or the
613 headers it is using, are not suitable for building Emacs. GCC version
614 2.95 or later is needed, because that is when the Windows port gained
615 sufficient support for anonymous structs and unions to cope with some
616 definitions from winnt.h that are used by addsection.c.
617 Older versions of the Windows API headers that come with Cygwin and MinGW
618 may be missing some definitions required by Emacs, or broken in other
619 ways. In particular, uniscribe APIs were added to MinGW CVS only on
620 2006-03-26, so releases from before then cannot be used.
621
622 When in doubt about correctness of what configure did, look at the file
623 config.log, which shows all the failed test programs and compiler
624 messages associated with the failures. If that doesn't give a clue,
625 please report the problems, together with the relevant fragments from
626 config.log, as bugs.
627
628 If configure succeeds, but make fails, install the Cygwin port of
629 Bash, even if the table above indicates that Emacs should be able to
630 build without sh.exe. (Some versions of Windows shells are too dumb
631 for Makefile's used by Emacs.)
632
633 If you are using certain Cygwin builds of GCC, such as Cygwin version
634 1.1.8, you may need to specify some extra compiler flags like so:
635
636 configure --with-gcc --cflags -mwin32 --cflags -D__MSVCRT__
637 --ldflags -mwin32
638
639 However, the latest Cygwin versions, such as 1.3.3, don't need those
640 switches; you can simply use "configure --with-gcc".
641
642 We will attempt to auto-detect the need for these flags in a future
643 release.
644
645* Debugging
646
647 You should be able to debug Emacs using the debugger that is
648 appropriate for the compiler you used, namely DevStudio or Windbg if
649 compiled with MSVC, or GDB if compiled with GCC. (GDB for Windows
650 is available from the MinGW site, http://www.mingw.org/download.shtml.)
651
652 When Emacs aborts due to a fatal internal error, Emacs on Windows
653 pops up an Emacs Abort Dialog asking you whether you want to debug
654 Emacs or terminate it. If Emacs was built with MSVC, click YES
655 twice, and Windbg or the DevStudio debugger will start up
656 automatically. If Emacs was built with GCC, first start GDB and
657 attach it to the Emacs process with the "gdb -p EMACS-PID" command,
658 where EMACS-PID is the Emacs process ID (which you can see in the
659 Windows Task Manager), type the "continue" command inside GDB, and
660 only then click YES on the abort dialog. This will pass control to
661 the debugger, and you will be able to debug the cause of the fatal
662 error.
663
664 The single most important thing to find out when Emacs aborts or
665 crashes is where did that happen in the Emacs code. This is called
666 "backtrace".
667
668 Emacs on Windows uses more than one thread. When Emacs aborts due
669 to a fatal error, the current thread may not be the application
670 thread running Emacs code. Therefore, to produce a meaningful
671 backtrace from a debugger, you need to instruct it to show the
672 backtrace for every thread. With GDB, you do it like this:
673
674 (gdb) thread apply all backtrace
675
676 To run Emacs under a debugger to begin with, simply start it from
677 the debugger. With GDB, chdir to the `src' directory (if you have
678 the source tree) or to a directory with the `.gdbinit' file (if you
679 don't have the source tree), and type these commands:
680
681 C:\whatever\src> gdb x:\path\to\emacs.exe
682 (gdb) run <ARGUMENTS TO EMACS>
683
684 Thereafter, use Emacs as usual; you can minimize the debugger
685 window, if you like. The debugger will take control if and when
686 Emacs crashes.
687
688 Emacs functions implemented in C use a naming convention that reflects
689 their names in lisp. The names of the C routines are the lisp names
690 prefixed with 'F', and with dashes converted to underscores. For
691 example, the function call-process is implemented in C by
692 Fcall_process. Similarly, lisp variables are prefixed with 'V', again
693 with dashes converted to underscores. These conventions enable you to
694 easily set breakpoints or examine familiar lisp variables by name.
695
696 Since Emacs data is often in the form of a lisp object, and the
697 Lisp_Object type is difficult to examine manually in a debugger,
698 Emacs provides a helper routine called debug_print that prints out a
699 readable representation of a Lisp_Object. If you are using GDB,
700 there is a .gdbinit file in the src directory which provides
701 definitions that are useful for examining lisp objects. Therefore,
702 the following tips are mainly of interest when using MSVC.
703
704 The output from debug_print is sent to stderr, and to the debugger
705 via the OutputDebugString routine. The output sent to stderr should
706 be displayed in the console window that was opened when the
707 emacs.exe executable was started. The output sent to the debugger
708 should be displayed in its "Debug" output window.
709
710 When you are in the process of debugging Emacs and you would like to
711 examine the contents of a Lisp_Object variable, pop up the QuickWatch
712 window (QuickWatch has an eyeglass symbol on its button in the
713 toolbar). In the text field at the top of the window, enter
714 debug_print(<variable>) and hit return. For example, start and run
715 Emacs in the debugger until it is waiting for user input. Then click
716 on the Break button in the debugger to halt execution. Emacs should
717 halt in ZwUserGetMessage waiting for an input event. Use the Call
718 Stack window to select the procedure w32_msp_pump up the call stack
719 (see below for why you have to do this). Open the QuickWatch window
720 and enter debug_print(Vexec_path). Evaluating this expression will
721 then print out the contents of the lisp variable exec-path.
722
723 If QuickWatch reports that the symbol is unknown, then check the call
724 stack in the Call Stack window. If the selected frame in the call
725 stack is not an Emacs procedure, then the debugger won't recognize
726 Emacs symbols. Instead, select a frame that is inside an Emacs
727 procedure and try using debug_print again.
728
729 If QuickWatch invokes debug_print but nothing happens, then check the
730 thread that is selected in the debugger. If the selected thread is
731 not the last thread to run (the "current" thread), then it cannot be
732 used to execute debug_print. Use the Debug menu to select the current
733 thread and try using debug_print again. Note that the debugger halts
734 execution (e.g., due to a breakpoint) in the context of the current
735 thread, so this should only be a problem if you've explicitly switched
736 threads.
737
738
739This file is part of GNU Emacs.
740
741GNU Emacs is free software: you can redistribute it and/or modify
742it under the terms of the GNU General Public License as published by
743the Free Software Foundation, either version 3 of the License, or
744(at your option) any later version.
745
746GNU Emacs is distributed in the hope that it will be useful,
747but WITHOUT ANY WARRANTY; without even the implied warranty of
748MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
749GNU General Public License for more details.
750
751You should have received a copy of the GNU General Public License
752along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
diff --git a/nt/README b/nt/README
index b62dc0b746b..d3112ca50f1 100644
--- a/nt/README
+++ b/nt/README
@@ -67,10 +67,10 @@
67 67
68* Further information 68* Further information
69 69
70 There is a web page that serves as a FAQ for the Windows port of 70 The FAQ for the MS Windows port of Emacs is distributed with Emacs
71 Emacs (a.k.a. NTEmacs) at: 71 (info manual "efaq-w32"), and also available at
72 72
73 http://www.gnu.org/software/emacs/windows/ntemacs.html 73 http://www.gnu.org/software/emacs/manual/efaq-w32.html
74 74
75 There is also a mailing list for discussing issues related to this 75 There is also a mailing list for discussing issues related to this
76 port of Emacs. For information about the list, see this Web page: 76 port of Emacs. For information about the list, see this Web page:
@@ -108,11 +108,7 @@
108 108
109 Use the built in bug reporting functionality in Emacs so that it 109 Use the built in bug reporting functionality in Emacs so that it
110 will be seen by the right people. You can use the command M-x 110 will be seen by the right people. You can use the command M-x
111 report-emacs-bug to create and send the bug report, but in some 111 report-emacs-bug to create and send the bug report.
112 cases there is a function to report bugs in a specific package;
113 e.g. M-x gnus-bug for Gnus, M-x c-submit-bug-report for C/C++/Java
114 mode, etc.
115
116 112
117This file is part of GNU Emacs. 113This file is part of GNU Emacs.
118 114
diff --git a/nt/README.W32 b/nt/README.W32
index a2881ce1914..d81a308ae05 100644
--- a/nt/README.W32
+++ b/nt/README.W32
@@ -18,12 +18,6 @@ See the end of the file for license conditions.
18 this file as part of the Emacs source distribution, please read 18 this file as part of the Emacs source distribution, please read
19 those 2 files and not this one. 19 those 2 files and not this one.
20 20
21 Answers to frequently asked questions, and further information about
22 this port of GNU Emacs and related software packages can be found via
23 http:
24
25 http://www.gnu.org/software/emacs/windows/
26
27* Preliminaries 21* Preliminaries
28 22
29 Along with this file should be six subdirectories (bin, etc, info, 23 Along with this file should be six subdirectories (bin, etc, info,
@@ -242,14 +236,10 @@ See the end of the file for license conditions.
242 236
243* Further information 237* Further information
244 238
245 If you have access to the World Wide Web, I would recommend pointing 239 The FAQ for the MS Windows port of Emacs is distributed with Emacs
246 your favorite web browser to the following document (if you haven't 240 (info manual "efaq-w32"), and also available at
247 already):
248
249 http://www.gnu.org/software/emacs/windows/
250 241
251 This document serves as an FAQ and a source for further information 242 http://www.gnu.org/software/emacs/manual/efaq-w32.html
252 about the Windows port and related software packages.
253 243
254 In addition to the FAQ, there is a mailing list for discussing issues 244 In addition to the FAQ, there is a mailing list for discussing issues
255 related to the Windows port of Emacs. For information about the 245 related to the Windows port of Emacs. For information about the
diff --git a/nt/configure.bat b/nt/configure.bat
index 8f717fd4168..f98396bb81e 100755
--- a/nt/configure.bat
+++ b/nt/configure.bat
@@ -60,7 +60,7 @@ rem [8] tested only on Windows XP.
60rem 60rem
61echo **************************************************************** 61echo ****************************************************************
62echo *** THIS METHOD OF BUILDING EMACS IS NO LONGER SUPPORTED. ** 62echo *** THIS METHOD OF BUILDING EMACS IS NO LONGER SUPPORTED. **
63echo *** INSTEAD, FOLLOW THE INSTRUCTIONS FROM INSTALL.MSYS. ** 63echo *** INSTEAD, FOLLOW THE INSTRUCTIONS FROM INSTALL. **
64echo **************************************************************** 64echo ****************************************************************
65:confirm_continue 65:confirm_continue
66set /p answer=Continue running this script at your own risks ? (Y/N) 66set /p answer=Continue running this script at your own risks ? (Y/N)
@@ -191,7 +191,7 @@ echo.
191echo. IMPORTANT: This method of building Emacs for MS-Windows is deprecated, 191echo. IMPORTANT: This method of building Emacs for MS-Windows is deprecated,
192echo. and could be removed in a future version of Emacs. The preferred way 192echo. and could be removed in a future version of Emacs. The preferred way
193echo to build Emacs for MS-Windows from now on is using the MSYS environment 193echo to build Emacs for MS-Windows from now on is using the MSYS environment
194echo. and MinGW development tools. Please see nt/INSTALL.MSYS for details. 194echo. and MinGW development tools. Please see nt/INSTALL for details.
195goto end 195goto end
196 196
197rem ---------------------------------------------------------------------- 197rem ----------------------------------------------------------------------
diff --git a/oldXMenu/ChangeLog b/oldXMenu/ChangeLog
index 8f2951700e8..21acbe83053 100644
--- a/oldXMenu/ChangeLog
+++ b/oldXMenu/ChangeLog
@@ -1,3 +1,9 @@
12013-09-04 Paul Eggert <eggert@cs.ucla.edu>
2
3 Makefile improvements.
4 * Makefile.in (all, tags): Don't use double-colon rules, as they
5 are not portable according to POSIX. Mark as phony.
6
12012-12-04 Paul Eggert <eggert@cs.ucla.edu> 72012-12-04 Paul Eggert <eggert@cs.ucla.edu>
2 8
3 Include <config.h> uniformly in oldXMenu sources. 9 Include <config.h> uniformly in oldXMenu sources.
diff --git a/oldXMenu/Makefile.in b/oldXMenu/Makefile.in
index b08e6649cbd..394bfb3ab50 100644
--- a/oldXMenu/Makefile.in
+++ b/oldXMenu/Makefile.in
@@ -85,7 +85,8 @@ OBJS = Activate.o \
85 SetSel.o \ 85 SetSel.o \
86 XDelAssoc.o XLookAssoc.o XCrAssoc.o XDestAssoc.o XMakeAssoc.o 86 XDelAssoc.o XLookAssoc.o XCrAssoc.o XDestAssoc.o XMakeAssoc.o
87 87
88all:: libXMenu11.a 88all: libXMenu11.a
89.PHONY: all
89 90
90ALL_CFLAGS=$(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \ 91ALL_CFLAGS=$(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \
91 $(C_SWITCH_X_SITE) \ 92 $(C_SWITCH_X_SITE) \
@@ -139,5 +140,6 @@ distclean: clean
139 rm -f Makefile 140 rm -f Makefile
140maintainer-clean: distclean 141maintainer-clean: distclean
141 142
142tags:: 143tags:
143 $(TAGS) -t *.[ch] 144 $(TAGS) -t *.[ch]
145.PHONY: tags
diff --git a/src/ChangeLog b/src/ChangeLog
index 5d5a811b3c4..4e08178989e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,464 @@
12013-09-10 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * eval.c (Feval): Document the new use of `lexical'.
4
52013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
6
7 Review and drop old frame resize hack.
8 * frame.h (struct frame): Remove force_flush_display_p.
9 * dispnew.c (update_frame): Adjust user and don't call
10 flush_frame here. The comment has said that there was an issues
11 with redisplaying fringes, but I don't see any differences with
12 and without this hack. Hopefully we can continue without it.
13 * xdisp.c (clear_garbaged_frames): Adjust user and do not clear
14 current frame matrices twice if resized_p is set.
15
162013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
17
18 Do not populate pure Xism x_sync to other ports.
19 * frame.h (x_sync): Move under HAVE_X_WINDOWS.
20 * frame.c (other_visible_frames) [HAVE_X_WINDOWS]: Use as such.
21 * nsfns.m, w32xfns.c (x_sync): Remove no-op.
22 * w32term.h (x_sync): Remove prototype.
23
242013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
25
26 Cleanup frame flushing.
27 * dispextern.h (struct redisplay_interface):
28 Drop flush_display_optional because flush_display is enough
29 for X and flushing via RIF is just a no-op for others.
30 * frame.h (flush_frame): New function.
31 * dispnew.c (update_frame):
32 * minibuf.c (read_minibuf):
33 * xdisp.c (echo_area_display, redisplay_preserve_echo_area):
34 Use it.
35 * keyboard.c (detect_input_pending_run_timers): Do not flush
36 all frames but selected one in redisplay_preserve_echo_area.
37 * nsterm.m (ns_flush): Remove no-op.
38 (ns_redisplay_interface): Adjust user.
39 * w32term.h (x_flush): Remove no-op.
40 (w32_redisplay_interface): Adjust user.
41 * xterm.c (x_flush): Simplify because we do not flush all
42 frames at once any more. Adjust comment.
43 (x_redisplay_interface): Adjust user.
44
452013-09-07 Paul Eggert <eggert@cs.ucla.edu>
46
47 Port --without-x --enable-gcc-warnings to Fedora 19.
48 * gfilenotify.c (globals_of_gfilenotify):
49 Call g_type_init only if using an older glib version that needs it.
50
512013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
52
53 * lisp.h (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
54 (last_glyphless_glyph_merged_face_id): Remove declarations.
55 * dispextern.h (merge_glyphless_glyph_face): Add prototype.
56 * xdisp.c (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
57 (last_glyphless_glyph_merged_face_id): Now static.
58 (merge_escape_glyph_face): New function, refactored from...
59 (get_next_display_element): ...here.
60 (merge_glyphless_glyph_face): New function, refactored from...
61 (produce_glyphless_glyph): ...here...
62 * term.c (produce_glyphless_glyph): ...and here.
63
642013-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
65
66 * eval.c (eval_sub): Only call Ffunction if necessary.
67
682013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
69
70 Attempt to make redisplay more selective when changing cursor type.
71 * frame.h (struct frame): New bitfield cursor_type_changed.
72 * xdisp.c (cursor_type_changed): Remove.
73 (try_cursor_movement, redisplay_window, try_window_id)
74 (set_frame_cursor_types, try_window_reusing_current_matrix):
75 Adjust to use per-frame bitfield.
76 (redisplay_internal): Look for cursor type change on each visible
77 frame and consider all frames if cursor type has been changed on
78 the frame other than selected. If cursor type has been changed on
79 selected frame only, do not use fast update.
80
812013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
82
83 Attempt to make redisplay more selective when changing fonts.
84 * frame.h (struct frame): New bitfield fonts_changed.
85 * dispextern.h (fonts_changed_p, adjust_glyphs): Remove declaration.
86 (adjust_frame_glyphs): Add prototype.
87 * dispnew.c (fonts_changed_p): Remove.
88 (adjust_glyphs): Remove because we do not
89 adjust matrices on all frames at once any more.
90 (adjust_frame_glyphs): Block and unblock input here.
91 (adjust_glyph_matrix): Use fonts_changed.
92 (change_frame_size_1): Use adjust_frame_glyphs.
93 * font.c (font_open_entity): Use fonts_changed.
94 * frame.c (set_menu_bar_lines, Fmake_terminal_frame):
95 * w32fns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
96 * window.c (Fdelete_other_windows_internal, Fwindow_resize_apply)
97 (Fsplit_window_internal, Fdelete_window_internal, grow_mini_window)
98 (shrink_mini_window, Fresize_mini_window_internal)
99 (window_scroll_pixel_based, Fset_window_configuration)
100 (apply_window_adjustment, Fset_window_vscroll):
101 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
102 Use adjust_frame_glyphs.
103 * xdisp.c (redisplay_tool_bar, redisplay_window, try_window)
104 (try_window_reusing_current_matrix, try_window_id, display_line)
105 (IT_EXPAND_MATRIX_WIDTH): Use fonts_changed.
106 (redisplay_internal): Consider fonts_changed and adjust frame
107 matrices for each frame only if the frame is visible. If font
108 has been changed on some frame during full redisplay, retry
109 only visible frames where the font has been actually changed.
110
1112013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
112
113 Cache current header and mode line height for each window.
114 * window.h (struct window): New fields mode_line_height
115 and header_line_height.
116 * window.c (make_window): Initialize them.
117 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
118 (CURRENT_HEADER_LINE_HEIGHT): Use them. Adjust comment.
119 (current_mode_line_height, current_header_line_height):
120 Remove declaration.
121 * xdisp.c (current_mode_line_height, current_header_line_height):
122 Remove.
123 (pos_visible_p, init_xdisp): Adjust user.
124 (redisplay_window): Invalidate mode_line_height and
125 header_line_height if current and desired matrices do not agree.
126
1272013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
128
129 * fontset.c, window.c, xdisp.c (toplevel): Use TERM_HEADER.
130 * xfaces.c (toplevel) [HAVE_X_WINDOWS]: Do not include xterm.h twice.
131
1322013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
133
134 Make --without-x compatible with --enable-gcc-warnings.
135 * font.c (register_font_driver): Move check under HAVE_WINDOW_SYSTEM.
136 * font.h (struct font_driver): Move draw, get_bitmap and free_bitmap
137 members under HAVE_WINDOW_SYSTEM.
138 * keyboard.c (make_lispy_focus_out): Likewise.
139 (record_menu_key): Move under HAVE_MENUS.
140 * xdisp.c (toplevel): Move hourglass_shown_p, hourglass_atimer and
141 THIN_SPACE_WIDTH under HAVE_WINDOW_SYSTEM.
142 (syms_of_xdisp): Adjust user.
143 (window_box_edges): Define only if HAVE_WINDOW_SYSTEM.
144 (start_hourglass, cancel_hourglass):
145 * xfaces.c (toplevel): Likewise with PT_PER_INCH,
146 clear_font_table_count, CLEAR_FONT_TABLE_COUNT
147 and CLEAR_FONT_TABLE_NFONTS.
148 (set_font_frame_param, clear_face_gcs, realize_non_ascii_face):
149 Declare only if HAVE_WINDOW_SYSTEM.
150 (lface_same_font_attributes_p, clear_face_gcs): Define only
151 if HAVE_WINDOW_SYSTEM.
152
1532013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
154
155 * frame.c (check_minibuf_window): Update 'frame' with frame pointer.
156 * xterm.c (x_scroll_bar_handle_click) [!USE_TOOLKIT_SCROLL_BARS]:
157 Don't pass C integer to XINT (tiny fix for 2013-09-03 change).
158
1592013-09-05 Stefan Monnier <monnier@iro.umontreal.ca>
160
161 * cmds.c (Fself_insert_command): Don't pass a non-integer to XINT.
162
1632013-09-04 Paul Eggert <eggert@cs.ucla.edu>
164
165 * alloc.c (make_event_array): First arg is now ptrdiff_t, not int.
166 This fixes a type error on hosts where ptrdiff_t is wider than int.
167
1682013-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
169
170 * keyboard.c (read_key_sequence_vs): New function.
171 (Fread_key_sequence_vector, Fread_key_sequence): Use it to factor out
172 common code.
173
174 * callint.c (Fcall_interactively): Always return a vector for 'K'.
175
1762013-09-04 Paul Eggert <eggert@cs.ucla.edu>
177
178 Makefile improvements.
179 * Makefile.in (config.status): Don't use double-colon rules, as
180 they are not portable according to POSIX. Fix shell typo with `;
181 I guess this rule has never been tested?
182 (VCSWITNESS): New macro, to override any environment var.
183
1842013-09-04 Dmitry Antipov <dmantipov@yandex.ru>
185
186 * xterm.h (struct x_display_info): Do not track X connection
187 fd separately because it is always available from Display.
188 * xterm.c (x_term_init, x_delete_terminal, x_delete_display):
189 Adjust users.
190
1912013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
192
193 * buffer.c (drop_overlay):
194 * fileio.c (restore_point_unwind): Prefer unchain_marker to
195 Fset_marker (X, Qnil, ...) (which is the same but a bit slower).
196
1972013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
198
199 * buffer.c (Fmake_overlay, Fmove_overlay):
200 * intervals.c (set_point_from_marker):
201 * print.c (PRINTPREPARE): Prefer signal_error
202 to plain error and report unsuitable marker too.
203
2042013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
205
206 * xterm.h (struct scroll_bar): Prefer int to Lisp_Object
207 for 'dragging' member.
208 (struct x_output): Remove set-but-unused leftovers
209 'left_before_move' and 'top_before_move'.
210 * gtkutil.c (xg_set_toolkit_scroll_bar_thumb):
211 * xterm.c (xt_action_hook, xm_scroll_callback, xg_scroll_callback)
212 (xg_end_scroll_callback, xaw_jump_callback, xaw_scroll_callback)
213 (x_set_toolkit_scroll_bar_thumb, x_scroll_bar_create)
214 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
215 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
216 (x_scroll_bar_report_motion, x_set_offset): Related users changed.
217 * xfns.c, image.c (XLIB_ILLEGAL_ACCESS): No longer needed.
218
2192013-09-03 Jan Djärv <jan.h.d@swipnet.se>
220
221 * nsfont.m (INVALID_GLYPH): New define.
222 (nsfont_encode_char): Use INVALID_GLYPH.
223 (ns_uni_to_glyphs): Ditto, check for NSNullGlyph (Bug#15138).
224
2252013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
226
227 * xterm.c (x_last_mouse_movement_time): Revert last change.
228 This code should use XDisplayMotionBufferSize to check display's
229 motion history first, and there are few other issues as well.
230 (x_scroll_bar_note_movement): Pass XMotionEvent rather than XEvent.
231 (handle_one_xevent): Adjust user.
232
2332013-09-02 Martin Rudalics <rudalics@gmx.at>
234
235 * dispnew.c (Flast_nonminibuf_frame): Move from here ...
236 * frame.c (Flast_nonminibuf_frame): ... to here.
237 (check_minibuf_window): Don't abort if no window was found
238 (Bug#15247).
239
2402013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
241
242 Use XGetMotionEvents to ask the last mouse motion time from X server.
243 * xterm.c (X_MOTION_HISTORY): Default to 1.
244 (x_last_mouse_movement_time) [X_MOTION_HISTORY]: New function.
245 (x_last_mouse_movement_time) [!X_MOTION_HISTORY]: Legacy version.
246 (note_mouse_movement, x_scroll_bar_note_movement) [!X_MOTION_HISTORY]:
247 Ifdef away legacy code.
248 (XTmouse_position, x_scroll_bar_report_motion):
249 Use x_last_mouse_movement_time.
250 (handle_one_xevent): Use event.xunmap and not event.xmap when handling
251 UnmapNotify event.
252
2532013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
254
255 * msdos.c (last_mouse_window): Move to...
256 (dos_rawgetc): ...this function and adjust comment.
257 * nsterm.m (last_window): Rename to last_mouse_window, move to...
258 (mouseMoved): ...this function and adjust comment.
259 * w32term.c (last_window): Likewise with...
260 (w32_read_socket): ...this function.
261 * xterm.c (last_window): Likewise with...
262 (handle_one_xevent): ...this function.
263
2642013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
265
266 * window.h (Vmouse_window, Vmouse_event): Remove the leftovers.
267 * xterm.c (toplevel): Drop obsolete comment and move compose_status...
268 (handle_one_xevent): ...to here.
269 (STORE_KEYSYM_FOR_DEBUG): Move under ENABLE_CHECKING and make no-op
270 otherwise.
271
2722013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
273
274 * msdos.c (IT_set_terminal_window): Remove no-op.
275 (initialize_msdos_display): Adjust terminal setup.
276 * w32console.c (w32con_set_terminal_window): Remove no-op.
277 (initialize_w32_display): Adjust terminal setup.
278 * w32term.c (w32_set_terminal_window): Remove no-op.
279 (w32_create_terminal): Adjust terminal setup.
280 * xterm.c (XTset_terminal_window): Remove no-op.
281 (x_create_terminal): Adjust terminal setup.
282
2832013-09-01 Dmitry Antipov <dmantipov@yandex.ru>
284
285 * nsterm.m (ns_set_terminal_modes, ns_reset_terminal_modes):
286 Remove no-ops.
287 (ns_create_terminal): Adjust terminal setup.
288 * w32term.c (w32_set_terminal_modes, w32_reset_terminal_modes):
289 Remove no-ops.
290 (w32_create_terminal): Adjust terminal setup.
291 * xterm.c (XTset_terminal_modes, XTreset_terminal_modes):
292 Remove no-ops.
293 (x_create_terminal): Adjust terminal setup.
294
2952013-09-01 Dmitry Antipov <dmantipov@yandex.ru>
296
297 * dispextern.h (SET_TEXT_POS_FROM_MARKER): Indent.
298 (CLIP_TEXT_POS_FROM_MARKER): New macro.
299 * dispnew.c (buffer_posn_from_coords):
300 * window.c (Fwindow_end, displayed_window_lines):
301 * xdisp.c (redisplay_mode_lines): Use it.
302
3032013-09-01 Jan Djärv <jan.h.d@swipnet.se>
304
305 * fontset.c (face_for_char): Check char in the current face font first
306 if HAVE_NS (Bug#15138).
307
3082013-08-31 Martin Rudalics <rudalics@gmx.at>
309
310 * window.c (temp_output_buffer_show): Make sure window returned
311 by display_buffer is live (Bug#15213).
312
3132013-08-30 Dmitry Antipov <dmantipov@yandex.ru>
314
315 Minor cleanup to avoid forward declarations.
316 * coding.h (struct ccl_spec): Remove forward declaration.
317 * composite.h (toplevel): Include font.h.
318 (struct composition_it, struct face, struct font_metrics):
319 Remove forward declaration.
320 * dispextern.h (struct image, struct atimer): Likewise.
321 * emacsgtkfixed.h (struct frame): Likewise.
322 * emacsgtkfixed.c (toplevel): Reorder headers and drop stdio.h.
323 * font.h (struct font_driver, struct font, struct glyph_string)
324 (struct face): Remove forward declaration.
325 * fontset.h (struct face, struct font): Likewise.
326 * frame.h (toplevel): Style cleanup.
327 (enum output_method): Move to...
328 * termhooks.h (enum output_method): ...here.
329 (struct glyph, struct frame, struct ns_display_info)
330 (struct x_display_info, struct w32_display_info):
331 Remove forward declaration.
332 * xterm.h (toplevel): Include termhooks.h.
333 (struct font, struct window, struct glyph_matrix, struct frame)
334 (struct input_event, struct face, struct image): Remove forward
335 declaration.
336 * gtkutil.h (struct _widget_value): Likewise.
337 * keyboard.h (toplevel): Include termhooks.h.
338 (struct input_event): Remove forward declaration.
339
3402013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
341
342 * intervals.c (set_point_from_marker): New function.
343 * editfns.c (Fgoto_char):
344 * process.c (Finternal_default_process_filter):
345 * window.c (select_window_1): Use it.
346 * buffer.h (set_point_from_marker): Add prototype.
347
3482013-08-29 Eli Zaretskii <eliz@gnu.org>
349
350 * w32.c (term_winsock): Call release_listen_threads before calling
351 WSACleanup.
352 (_sys_wait_accept): Wait for accept event in a loop with a finite
353 timeout, instead of waiting indefinitely. Will hopefully avoid
354 hanging during exit because WSACleanup deadlocks waiting for the
355 event object to be released. (Bug#14333)
356
357 * w32proc.c (release_listen_threads): New function, signals all
358 the reader threads that listen for connections to stop waiting.
359
360 * w32.h (release_listen_threads): Add prototype.
361
3622013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
363
364 * alloc.c (Fmake_marker, build_marker): Zero need_adjustment
365 field of new marker (for sanity and safety).
366 * lisp.h (XSETMARKER): Remove unused macro (it doesn't work
367 anyway because XMISCTYPE is a function and can't be an lvalue).
368
3692013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
370
371 * xterm.c (x_clear_area): Lost 7th arg because it is always False.
372 (x_after_update_window_line, x_scroll_bar_create):
373 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar):
374 (handle_one_xevent, x_clear_frame_area):
375 * gtkutil.c (xg_clear_under_internal_border, xg_update_scrollbar_pos):
376 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines): Adjust users.
377 * xterm.h (x_clear_area): Adjust prototype.
378
3792013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
380
381 Hook scanning and indentation functions to find_newline. This helps
382 to avoid duplicated code and renders more respect to newline cache.
383 * lisp.h (scan_newline): Prefer ptrdiff_t to EMACS_INT.
384 * cmds.c (Fforward_line):
385 * indent.c (scan_for_column, Fcurrent_indentation, indented_beyond_p):
386 Use find_newline and avoid unnecessary point movements.
387 * search.c (scan_newline): Implement on top of find_newline.
388
3892013-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
390
391 * eval.c (Ffuncall): Fix handling of ((lambda ..) ..) in lexically
392 scoped code (bug#11258).
393
3942013-08-28 Davor Cubranic <cubranic@stat.ubc.ca> (tiny change)
395
396 * nsterm.m (last_window): New variable.
397 (EV_TRAILER2): New macro.
398 (EV_TRAILER): Call EV_TRAILER2.
399 (mouseMoved:): Add support for mouse-autoselect-window
400 on nextstep (Bug#6888).
401
4022013-08-28 Andreas Schwab <schwab@suse.de>
403
404 * regex.c (CHAR_CHARSET, CHARSET_LEADING_CODE_BASE, CHAR_HEAD_P)
405 (SINGLE_BYTE_CHAR_P, SAME_CHARSET_P, MAKE_CHAR, BYTE8_TO_CHAR):
406 Remove unused macro definitions.
407 (CHARSET_RANGE_TABLE_BITS, EXTEND_RANGE_TABLE)
408 (SET_RANGE_TABLE_WORK_AREA_BIT, SET_RANGE_TABLE_WORK_AREA):
409 Only define if emacs.
410
4112013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
412
413 Prefer enum glyph_row_area to int where appropriate.
414 * dispextern.h (enum glyph_row_area): Add ANY_AREA member.
415 Fix comment.
416 (window_box, window_box_width, window_box_left, window_box_left_offset)
417 (window_box_right, window_box_right_offset): Adjust prototypes.
418 * xdisp.c (window_box, window_box_width, window_box_left)
419 (window_box_left_offset, window_box_right, window_box_right_offset):
420 Use enum glyph_row_area. Adjust users and tweak comment where needed.
421 (window_box_edges): Likewise. Lost 2nd arg since it is always ANY_AREA.
422 * nsterm.m (ns_clip_to_row):
423 * w32term.c (w32_clip_to_row):
424 * xterm.c (x_clip_to_row): Likewise.
425
4262013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
427
428 * buffer.c (Foverlays_at, Foverlays_in, Fnext_overlay_change)
429 (Fprevious_overlay_change): Fast path for buffer with no overlays.
430
4312013-08-28 Paul Eggert <eggert@cs.ucla.edu>
432
433 * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
434 for portability to hosts where /bin/sh has problems.
435
4362013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
437
438 Redesign redisplay interface to drop global output_cursor.
439 * dispextern.h (struct redisplay_interface): Remove cursor_to member.
440 (toplevel): Remove declaration of output_cursor.
441 (set_output_cursor, x_cursor_to): Remove prototype.
442 * window.h (struct window): New member output_cursor.
443 (output_cursor_to): New function to replace RIF member.
444 * dispnew.c (redraw_overlapped_rows, update_marginal_area)
445 (update_text_area, set_window_cursor_after_update): Use it.
446 * xdisp.c (output_cursor, set_output_cursor, x_cursor_to): Remove.
447 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
448 * nsterm.m (ns_update_window_begin, ns_update_window_end):
449 * w32term.c (x_update_window_begin, x_update_window_end):
450 * xterm.c (x_update_window_begin, x_update_window_end):
451 Adjust to use per-window output cursor.
452
12013-08-27 Paul Eggert <eggert@cs.ucla.edu> 4532013-08-27 Paul Eggert <eggert@cs.ucla.edu>
2 454
455 Simplify SELECT_TYPE-related code.
456 Like EMACS_TIME, this portability layer is no longer needed, since
457 Emacs has been using fd_set as a portability layer for some time.
458 * sysselect.h (FD_SETSIZE): Rename from MAXDESC. All uses changed.
459 (SELECT_TYPE): Remove. All uses changed to fd_set.
460 (fd_set) [!FD_SET]: New typedef.
461
3 Simplify EMACS_TIME-related code. 462 Simplify EMACS_TIME-related code.
4 This portability layer is no longer needed, since Emacs has been 463 This portability layer is no longer needed, since Emacs has been
5 using struct timespec as a portability layer for some time. 464 using struct timespec as a portability layer for some time.
diff --git a/src/Makefile.in b/src/Makefile.in
index 76a4e0c5703..aa51108ffc2 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -23,7 +23,7 @@
23# script may need modifying in sync with changes made here. Try to 23# script may need modifying in sync with changes made here. Try to
24# avoid shell-ism because the DOS build has to use the DOS shell. 24# avoid shell-ism because the DOS build has to use the DOS shell.
25 25
26SHELL = /bin/sh 26SHELL = @SHELL@
27 27
28# Here are the things that we expect ../configure to edit. 28# Here are the things that we expect ../configure to edit.
29# We use $(srcdir) explicitly in dependencies so as not to depend on VPATH. 29# We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
@@ -548,14 +548,9 @@ stamp-oldxmenu: $(OLDXMENU_DEPS)
548 548
549$(OLDXMENU): $(OLDXMENU_TARGET) 549$(OLDXMENU): $(OLDXMENU_TARGET)
550 550
551../config.status:: epaths.in 551../config.status: config.in epaths.in
552 @echo "The file epaths.h needs to be set up from epaths.in." 552 @echo "The file ${?:.in=.h} needs to be set up from $?."
553 @echo "Please run the `configure' script again." 553 @echo "Please run the 'configure' script again."
554 exit 1
555
556../config.status:: config.in
557 @echo "The file config.h needs to be set up from config.in."
558 @echo "Please run the `configure' script again."
559 exit 1 554 exit 1
560 555
561doc.o: buildobj.h 556doc.o: buildobj.h
@@ -668,6 +663,9 @@ $(lisp): $(BOOTSTRAPEMACS)
668 663
669## VCSWITNESS points to the file that holds info about the current checkout. 664## VCSWITNESS points to the file that holds info about the current checkout.
670## We use it as a heuristic to decide when to rebuild loaddefs.el. 665## We use it as a heuristic to decide when to rebuild loaddefs.el.
666## If empty it is ignored; the parent makefile can set it to some other value.
667VCSWITNESS =
668
671$(lispsource)/loaddefs.el: $(BOOTSTRAPEMACS) $(VCSWITNESS) 669$(lispsource)/loaddefs.el: $(BOOTSTRAPEMACS) $(VCSWITNESS)
672 cd ../lisp; $(MAKE) $(MFLAGS) autoloads EMACS=$(bootstrap_exe) 670 cd ../lisp; $(MAKE) $(MFLAGS) autoloads EMACS=$(bootstrap_exe)
673 671
diff --git a/src/alloc.c b/src/alloc.c
index ebb8ef58991..0989e63664f 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -3479,6 +3479,7 @@ DEFUN ("make-marker", Fmake_marker, Smake_marker, 0, 0, 0,
3479 p->charpos = 0; 3479 p->charpos = 0;
3480 p->next = NULL; 3480 p->next = NULL;
3481 p->insertion_type = 0; 3481 p->insertion_type = 0;
3482 p->need_adjustment = 0;
3482 return val; 3483 return val;
3483} 3484}
3484 3485
@@ -3503,6 +3504,7 @@ build_marker (struct buffer *buf, ptrdiff_t charpos, ptrdiff_t bytepos)
3503 m->charpos = charpos; 3504 m->charpos = charpos;
3504 m->bytepos = bytepos; 3505 m->bytepos = bytepos;
3505 m->insertion_type = 0; 3506 m->insertion_type = 0;
3507 m->need_adjustment = 0;
3506 m->next = BUF_MARKERS (buf); 3508 m->next = BUF_MARKERS (buf);
3507 BUF_MARKERS (buf) = m; 3509 BUF_MARKERS (buf) = m;
3508 return obj; 3510 return obj;
@@ -3525,9 +3527,9 @@ free_marker (Lisp_Object marker)
3525 Any number of arguments, even zero arguments, are allowed. */ 3527 Any number of arguments, even zero arguments, are allowed. */
3526 3528
3527Lisp_Object 3529Lisp_Object
3528make_event_array (register int nargs, Lisp_Object *args) 3530make_event_array (ptrdiff_t nargs, Lisp_Object *args)
3529{ 3531{
3530 int i; 3532 ptrdiff_t i;
3531 3533
3532 for (i = 0; i < nargs; i++) 3534 for (i = 0; i < nargs; i++)
3533 /* The things that fit in a string 3535 /* The things that fit in a string
diff --git a/src/buffer.c b/src/buffer.c
index e42dbb2befd..ff05da6d0d9 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -892,8 +892,8 @@ drop_overlay (struct buffer *b, struct Lisp_Overlay *ov)
892 eassert (b == XBUFFER (Fmarker_buffer (ov->start))); 892 eassert (b == XBUFFER (Fmarker_buffer (ov->start)));
893 modify_overlay (b, marker_position (ov->start), 893 modify_overlay (b, marker_position (ov->start),
894 marker_position (ov->end)); 894 marker_position (ov->end));
895 Fset_marker (ov->start, Qnil, Qnil); 895 unchain_marker (XMARKER (ov->start));
896 Fset_marker (ov->end, Qnil, Qnil); 896 unchain_marker (XMARKER (ov->end));
897 897
898} 898}
899 899
@@ -3843,7 +3843,8 @@ for the front of the overlay advance when text is inserted there
3843The fifth arg REAR-ADVANCE, if non-nil, makes the marker 3843The fifth arg REAR-ADVANCE, if non-nil, makes the marker
3844for the rear of the overlay advance when text is inserted there 3844for the rear of the overlay advance when text is inserted there
3845\(which means the text *is* included in the overlay). */) 3845\(which means the text *is* included in the overlay). */)
3846 (Lisp_Object beg, Lisp_Object end, Lisp_Object buffer, Lisp_Object front_advance, Lisp_Object rear_advance) 3846 (Lisp_Object beg, Lisp_Object end, Lisp_Object buffer,
3847 Lisp_Object front_advance, Lisp_Object rear_advance)
3847{ 3848{
3848 Lisp_Object overlay; 3849 Lisp_Object overlay;
3849 struct buffer *b; 3850 struct buffer *b;
@@ -3852,12 +3853,11 @@ for the rear of the overlay advance when text is inserted there
3852 XSETBUFFER (buffer, current_buffer); 3853 XSETBUFFER (buffer, current_buffer);
3853 else 3854 else
3854 CHECK_BUFFER (buffer); 3855 CHECK_BUFFER (buffer);
3855 if (MARKERP (beg) 3856
3856 && ! EQ (Fmarker_buffer (beg), buffer)) 3857 if (MARKERP (beg) && !EQ (Fmarker_buffer (beg), buffer))
3857 error ("Marker points into wrong buffer"); 3858 signal_error ("Marker points into wrong buffer", beg);
3858 if (MARKERP (end) 3859 if (MARKERP (end) && !EQ (Fmarker_buffer (end), buffer))
3859 && ! EQ (Fmarker_buffer (end), buffer)) 3860 signal_error ("Marker points into wrong buffer", end);
3860 error ("Marker points into wrong buffer");
3861 3861
3862 CHECK_NUMBER_COERCE_MARKER (beg); 3862 CHECK_NUMBER_COERCE_MARKER (beg);
3863 CHECK_NUMBER_COERCE_MARKER (end); 3863 CHECK_NUMBER_COERCE_MARKER (end);
@@ -3983,12 +3983,10 @@ buffer. */)
3983 if (NILP (Fbuffer_live_p (buffer))) 3983 if (NILP (Fbuffer_live_p (buffer)))
3984 error ("Attempt to move overlay to a dead buffer"); 3984 error ("Attempt to move overlay to a dead buffer");
3985 3985
3986 if (MARKERP (beg) 3986 if (MARKERP (beg) && !EQ (Fmarker_buffer (beg), buffer))
3987 && ! EQ (Fmarker_buffer (beg), buffer)) 3987 signal_error ("Marker points into wrong buffer", beg);
3988 error ("Marker points into wrong buffer"); 3988 if (MARKERP (end) && !EQ (Fmarker_buffer (end), buffer))
3989 if (MARKERP (end) 3989 signal_error ("Marker points into wrong buffer", end);
3990 && ! EQ (Fmarker_buffer (end), buffer))
3991 error ("Marker points into wrong buffer");
3992 3990
3993 CHECK_NUMBER_COERCE_MARKER (beg); 3991 CHECK_NUMBER_COERCE_MARKER (beg);
3994 CHECK_NUMBER_COERCE_MARKER (end); 3992 CHECK_NUMBER_COERCE_MARKER (end);
@@ -4170,6 +4168,9 @@ DEFUN ("overlays-at", Foverlays_at, Soverlays_at, 1, 1, 0,
4170 4168
4171 CHECK_NUMBER_COERCE_MARKER (pos); 4169 CHECK_NUMBER_COERCE_MARKER (pos);
4172 4170
4171 if (!buffer_has_overlays ())
4172 return Qnil;
4173
4173 len = 10; 4174 len = 10;
4174 /* We can't use alloca here because overlays_at can call xrealloc. */ 4175 /* We can't use alloca here because overlays_at can call xrealloc. */
4175 overlay_vec = xmalloc (len * sizeof *overlay_vec); 4176 overlay_vec = xmalloc (len * sizeof *overlay_vec);
@@ -4202,6 +4203,9 @@ end of the buffer. */)
4202 CHECK_NUMBER_COERCE_MARKER (beg); 4203 CHECK_NUMBER_COERCE_MARKER (beg);
4203 CHECK_NUMBER_COERCE_MARKER (end); 4204 CHECK_NUMBER_COERCE_MARKER (end);
4204 4205
4206 if (!buffer_has_overlays ())
4207 return Qnil;
4208
4205 len = 10; 4209 len = 10;
4206 overlay_vec = xmalloc (len * sizeof *overlay_vec); 4210 overlay_vec = xmalloc (len * sizeof *overlay_vec);
4207 4211
@@ -4230,6 +4234,9 @@ the value is (point-max). */)
4230 4234
4231 CHECK_NUMBER_COERCE_MARKER (pos); 4235 CHECK_NUMBER_COERCE_MARKER (pos);
4232 4236
4237 if (!buffer_has_overlays ())
4238 return make_number (ZV);
4239
4233 len = 10; 4240 len = 10;
4234 overlay_vec = xmalloc (len * sizeof *overlay_vec); 4241 overlay_vec = xmalloc (len * sizeof *overlay_vec);
4235 4242
@@ -4269,6 +4276,9 @@ the value is (point-min). */)
4269 4276
4270 CHECK_NUMBER_COERCE_MARKER (pos); 4277 CHECK_NUMBER_COERCE_MARKER (pos);
4271 4278
4279 if (!buffer_has_overlays ())
4280 return make_number (BEGV);
4281
4272 /* At beginning of buffer, we know the answer; 4282 /* At beginning of buffer, we know the answer;
4273 avoid bug subtracting 1 below. */ 4283 avoid bug subtracting 1 below. */
4274 if (XINT (pos) == BEGV) 4284 if (XINT (pos) == BEGV)
diff --git a/src/buffer.h b/src/buffer.h
index bedb7890939..169a15c7d0f 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -249,6 +249,7 @@ extern void temp_set_point (struct buffer *, ptrdiff_t);
249extern void set_point_both (ptrdiff_t, ptrdiff_t); 249extern void set_point_both (ptrdiff_t, ptrdiff_t);
250extern void temp_set_point_both (struct buffer *, 250extern void temp_set_point_both (struct buffer *,
251 ptrdiff_t, ptrdiff_t); 251 ptrdiff_t, ptrdiff_t);
252extern void set_point_from_marker (Lisp_Object);
252extern void enlarge_buffer_text (struct buffer *, ptrdiff_t); 253extern void enlarge_buffer_text (struct buffer *, ptrdiff_t);
253 254
254 255
diff --git a/src/callint.c b/src/callint.c
index 25096af5068..d31604b070e 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -616,8 +616,8 @@ invoke it. If KEYS is omitted or nil, the return value of
616 Fput_text_property (make_number (0), 616 Fput_text_property (make_number (0),
617 make_number (SCHARS (callint_message)), 617 make_number (SCHARS (callint_message)),
618 Qface, Qminibuffer_prompt, callint_message); 618 Qface, Qminibuffer_prompt, callint_message);
619 args[i] = Fread_key_sequence (callint_message, 619 args[i] = Fread_key_sequence_vector (callint_message,
620 Qnil, Qt, Qnil, Qnil); 620 Qnil, Qt, Qnil, Qnil);
621 teml = args[i]; 621 teml = args[i];
622 visargs[i] = Fkey_description (teml, Qnil); 622 visargs[i] = Fkey_description (teml, Qnil);
623 unbind_to (speccount1, Qnil); 623 unbind_to (speccount1, Qnil);
diff --git a/src/cmds.c b/src/cmds.c
index ce91877f85e..aeedb152f62 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -121,9 +121,7 @@ With positive N, a non-empty line at the end counts as one line
121successfully moved (for the return value). */) 121successfully moved (for the return value). */)
122 (Lisp_Object n) 122 (Lisp_Object n)
123{ 123{
124 ptrdiff_t opoint = PT, opoint_byte = PT_BYTE; 124 ptrdiff_t opoint = PT, pos, pos_byte, shortage, count;
125 ptrdiff_t pos, pos_byte;
126 EMACS_INT count, shortage;
127 125
128 if (NILP (n)) 126 if (NILP (n))
129 count = 1; 127 count = 1;
@@ -134,16 +132,12 @@ successfully moved (for the return value). */)
134 } 132 }
135 133
136 if (count <= 0) 134 if (count <= 0)
137 shortage = scan_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, count - 1, 1); 135 pos = find_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, count - 1,
136 &shortage, &pos_byte, 1);
138 else 137 else
139 shortage = scan_newline (PT, PT_BYTE, ZV, ZV_BYTE, count, 1); 138 pos = find_newline (PT, PT_BYTE, ZV, ZV_BYTE, count,
140 139 &shortage, &pos_byte, 1);
141 /* Since scan_newline does TEMP_SET_PT_BOTH, 140
142 and we want to set PT "for real",
143 go back to the old point and then come back here. */
144 pos = PT;
145 pos_byte = PT_BYTE;
146 TEMP_SET_PT_BOTH (opoint, opoint_byte);
147 SET_PT_BOTH (pos, pos_byte); 141 SET_PT_BOTH (pos, pos_byte);
148 142
149 if (shortage > 0 143 if (shortage > 0
@@ -310,7 +304,7 @@ At the end, it runs `post-self-insert-hook'. */)
310 /* Barf if the key that invoked this was not a character. */ 304 /* Barf if the key that invoked this was not a character. */
311 if (!CHARACTERP (last_command_event)) 305 if (!CHARACTERP (last_command_event))
312 bitch_at_user (); 306 bitch_at_user ();
313 { 307 else {
314 int character = translate_char (Vtranslation_table_for_input, 308 int character = translate_char (Vtranslation_table_for_input,
315 XINT (last_command_event)); 309 XINT (last_command_event));
316 int val = internal_self_insert (character, XFASTINT (n)); 310 int val = internal_self_insert (character, XFASTINT (n));
diff --git a/src/coding.h b/src/coding.h
index 7b7078e06fa..2c01a05d197 100644
--- a/src/coding.h
+++ b/src/coding.h
@@ -378,8 +378,6 @@ struct emacs_mule_spec
378 struct composition_status cmp_status; 378 struct composition_status cmp_status;
379}; 379};
380 380
381struct ccl_spec;
382
383struct undecided_spec 381struct undecided_spec
384{ 382{
385 /* Inhibit null byte detection. 1 means always inhibit, 383 /* Inhibit null byte detection. 1 means always inhibit,
diff --git a/src/composite.h b/src/composite.h
index 53665b36bd1..df170093797 100644
--- a/src/composite.h
+++ b/src/composite.h
@@ -25,6 +25,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
25#ifndef EMACS_COMPOSITE_H 25#ifndef EMACS_COMPOSITE_H
26#define EMACS_COMPOSITE_H 26#define EMACS_COMPOSITE_H
27 27
28#include "font.h"
29
28INLINE_HEADER_BEGIN 30INLINE_HEADER_BEGIN
29#ifndef COMPOSITE_INLINE 31#ifndef COMPOSITE_INLINE
30# define COMPOSITE_INLINE INLINE 32# define COMPOSITE_INLINE INLINE
@@ -312,10 +314,6 @@ enum lglyph_indices
312#define LGLYPH_WADJUST(g) (VECTORP (LGLYPH_ADJUSTMENT (g)) \ 314#define LGLYPH_WADJUST(g) (VECTORP (LGLYPH_ADJUSTMENT (g)) \
313 ? XINT (AREF (LGLYPH_ADJUSTMENT (g), 2)) : 0) 315 ? XINT (AREF (LGLYPH_ADJUSTMENT (g), 2)) : 0)
314 316
315struct composition_it;
316struct face;
317struct font_metrics;
318
319extern Lisp_Object composition_gstring_put_cache (Lisp_Object, ptrdiff_t); 317extern Lisp_Object composition_gstring_put_cache (Lisp_Object, ptrdiff_t);
320extern Lisp_Object composition_gstring_from_id (ptrdiff_t); 318extern Lisp_Object composition_gstring_from_id (ptrdiff_t);
321extern bool composition_gstring_p (Lisp_Object); 319extern bool composition_gstring_p (Lisp_Object);
diff --git a/src/dispextern.h b/src/dispextern.h
index c32577c41dc..e9f57d9fa22 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -223,8 +223,16 @@ struct text_pos
223/* Set text position POS from marker MARKER. */ 223/* Set text position POS from marker MARKER. */
224 224
225#define SET_TEXT_POS_FROM_MARKER(POS, MARKER) \ 225#define SET_TEXT_POS_FROM_MARKER(POS, MARKER) \
226 (CHARPOS (POS) = marker_position ((MARKER)), \ 226 (CHARPOS (POS) = marker_position (MARKER), \
227 BYTEPOS (POS) = marker_byte_position ((MARKER))) 227 BYTEPOS (POS) = marker_byte_position (MARKER))
228
229/* Like above, but clip POS within accessible range. */
230
231#define CLIP_TEXT_POS_FROM_MARKER(POS, MARKER) \
232 (CHARPOS (POS) = clip_to_bounds \
233 (BEGV, marker_position (MARKER), ZV), \
234 BYTEPOS (POS) = clip_to_bounds \
235 (BEGV_BYTE, marker_byte_position (MARKER), ZV_BYTE))
228 236
229/* Set marker MARKER from text position POS. */ 237/* Set marker MARKER from text position POS. */
230 238
@@ -758,11 +766,12 @@ void check_matrix_pointer_lossage (struct glyph_matrix *);
758 Glyph Rows 766 Glyph Rows
759 ***********************************************************************/ 767 ***********************************************************************/
760 768
761/* Area in window glyph matrix. If values are added or removed, the 769/* Area in window glyph matrix. If values are added or removed,
762 function mark_object in alloc.c has to be changed. */ 770 the function mark_glyph_matrix in alloc.c may need to be changed. */
763 771
764enum glyph_row_area 772enum glyph_row_area
765{ 773{
774 ANY_AREA = -1,
766 LEFT_MARGIN_AREA, 775 LEFT_MARGIN_AREA,
767 TEXT_AREA, 776 TEXT_AREA,
768 RIGHT_MARGIN_AREA, 777 RIGHT_MARGIN_AREA,
@@ -1193,12 +1202,6 @@ struct glyph_row *matrix_row (struct glyph_matrix *, int);
1193 ((ROW)->phys_height - (ROW)->phys_ascent \ 1202 ((ROW)->phys_height - (ROW)->phys_ascent \
1194 > (ROW)->height - (ROW)->ascent) 1203 > (ROW)->height - (ROW)->ascent)
1195 1204
1196/* True means that fonts have been loaded since the last glyph
1197 matrix adjustments. The function redisplay_internal adjusts glyph
1198 matrices when this flag is true. */
1199
1200extern bool fonts_changed_p;
1201
1202/* A glyph for a space. */ 1205/* A glyph for a space. */
1203 1206
1204extern struct glyph space_glyph; 1207extern struct glyph space_glyph;
@@ -1429,31 +1432,31 @@ struct glyph_string
1429#define CURRENT_MODE_LINE_FACE_ID(W) \ 1432#define CURRENT_MODE_LINE_FACE_ID(W) \
1430 (CURRENT_MODE_LINE_FACE_ID_3((W), XWINDOW (selected_window), (W))) 1433 (CURRENT_MODE_LINE_FACE_ID_3((W), XWINDOW (selected_window), (W)))
1431 1434
1432/* Return the current height of the mode line of window W. If not 1435/* Return the current height of the mode line of window W. If not known
1433 known from current_mode_line_height, look at W's current glyph 1436 from W->mode_line_height, look at W's current glyph matrix, or return
1434 matrix, or return a default based on the height of the font of the 1437 a default based on the height of the font of the face `mode-line'. */
1435 face `mode-line'. */
1436 1438
1437#define CURRENT_MODE_LINE_HEIGHT(W) \ 1439#define CURRENT_MODE_LINE_HEIGHT(W) \
1438 (current_mode_line_height >= 0 \ 1440 (W->mode_line_height >= 0 \
1439 ? current_mode_line_height \ 1441 ? W->mode_line_height \
1440 : (MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \ 1442 : (W->mode_line_height \
1441 ? MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \ 1443 = (MATRIX_MODE_LINE_HEIGHT (W->current_matrix) \
1442 : estimate_mode_line_height (XFRAME ((W)->frame), \ 1444 ? MATRIX_MODE_LINE_HEIGHT (W->current_matrix) \
1443 CURRENT_MODE_LINE_FACE_ID (W)))) 1445 : estimate_mode_line_height \
1446 (XFRAME (W->frame), CURRENT_MODE_LINE_FACE_ID (W)))))
1444 1447
1445/* Return the current height of the header line of window W. If not 1448/* Return the current height of the header line of window W. If not known
1446 known from current_header_line_height, look at W's current glyph 1449 from W->header_line_height, look at W's current glyph matrix, or return
1447 matrix, or return an estimation based on the height of the font of 1450 an estimation based on the height of the font of the face `header-line'. */
1448 the face `header-line'. */
1449 1451
1450#define CURRENT_HEADER_LINE_HEIGHT(W) \ 1452#define CURRENT_HEADER_LINE_HEIGHT(W) \
1451 (current_header_line_height >= 0 \ 1453 (W->header_line_height >= 0 \
1452 ? current_header_line_height \ 1454 ? W->header_line_height \
1453 : (MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \ 1455 : (W->header_line_height \
1454 ? MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \ 1456 = (MATRIX_HEADER_LINE_HEIGHT (W->current_matrix) \
1455 : estimate_mode_line_height (XFRAME ((W)->frame), \ 1457 ? MATRIX_HEADER_LINE_HEIGHT (W->current_matrix) \
1456 HEADER_LINE_FACE_ID))) 1458 : estimate_mode_line_height \
1459 (XFRAME (W->frame), HEADER_LINE_FACE_ID))))
1457 1460
1458/* Return the height of the desired mode line of window W. */ 1461/* Return the height of the desired mode line of window W. */
1459 1462
@@ -2818,19 +2821,9 @@ struct redisplay_interface
2818 void (*update_window_end_hook) (struct window *w, bool cursor_on_p, 2821 void (*update_window_end_hook) (struct window *w, bool cursor_on_p,
2819 bool mouse_face_overwritten_p); 2822 bool mouse_face_overwritten_p);
2820 2823
2821 /* Move cursor to row/column position VPOS/HPOS, pixel coordinates
2822 Y/X. HPOS/VPOS are window-relative row and column numbers and X/Y
2823 are window-relative pixel positions. */
2824 void (*cursor_to) (struct window *w, int vpos, int hpos, int y, int x);
2825
2826 /* Flush the display of frame F. For X, this is XFlush. */ 2824 /* Flush the display of frame F. For X, this is XFlush. */
2827 void (*flush_display) (struct frame *f); 2825 void (*flush_display) (struct frame *f);
2828 2826
2829 /* Flush the display of frame F if non-NULL. This is called
2830 during redisplay, and should be NULL on systems which flush
2831 automatically before reading input. */
2832 void (*flush_display_optional) (struct frame *f);
2833
2834 /* Clear the mouse highlight in window W, if there is any. */ 2827 /* Clear the mouse highlight in window W, if there is any. */
2835 void (*clear_window_mouse_face) (struct window *w); 2828 void (*clear_window_mouse_face) (struct window *w);
2836 2829
@@ -2901,11 +2894,6 @@ struct redisplay_interface
2901 2894
2902#ifdef HAVE_WINDOW_SYSTEM 2895#ifdef HAVE_WINDOW_SYSTEM
2903 2896
2904/* Structure forward declarations. */
2905
2906struct image;
2907
2908
2909/* Each image format (JPEG, TIFF, ...) supported is described by 2897/* Each image format (JPEG, TIFF, ...) supported is described by
2910 a structure of the type below. */ 2898 a structure of the type below. */
2911 2899
@@ -3196,14 +3184,15 @@ int resize_mini_window (struct window *, int);
3196void set_vertical_scroll_bar (struct window *); 3184void set_vertical_scroll_bar (struct window *);
3197#endif 3185#endif
3198int try_window (Lisp_Object, struct text_pos, int); 3186int try_window (Lisp_Object, struct text_pos, int);
3199void window_box (struct window *, int, int *, int *, int *, int *); 3187void window_box (struct window *, enum glyph_row_area,
3188 int *, int *, int *, int *);
3200int window_box_height (struct window *); 3189int window_box_height (struct window *);
3201int window_text_bottom_y (struct window *); 3190int window_text_bottom_y (struct window *);
3202int window_box_width (struct window *, int); 3191int window_box_width (struct window *, enum glyph_row_area);
3203int window_box_left (struct window *, int); 3192int window_box_left (struct window *, enum glyph_row_area);
3204int window_box_left_offset (struct window *, int); 3193int window_box_left_offset (struct window *, enum glyph_row_area);
3205int window_box_right (struct window *, int); 3194int window_box_right (struct window *, enum glyph_row_area);
3206int window_box_right_offset (struct window *, int); 3195int window_box_right_offset (struct window *, enum glyph_row_area);
3207int estimate_mode_line_height (struct frame *, enum face_id); 3196int estimate_mode_line_height (struct frame *, enum face_id);
3208void pixel_to_glyph_coords (struct frame *, int, int, int *, int *, 3197void pixel_to_glyph_coords (struct frame *, int, int, int *, int *,
3209 NativeRectangle *, int); 3198 NativeRectangle *, int);
@@ -3229,7 +3218,6 @@ int frame_mode_line_height (struct frame *);
3229extern Lisp_Object Qtool_bar; 3218extern Lisp_Object Qtool_bar;
3230extern bool redisplaying_p; 3219extern bool redisplaying_p;
3231extern int help_echo_showing_p; 3220extern int help_echo_showing_p;
3232extern int current_mode_line_height, current_header_line_height;
3233extern Lisp_Object help_echo_string, help_echo_window; 3221extern Lisp_Object help_echo_string, help_echo_window;
3234extern Lisp_Object help_echo_object, previous_help_echo_string; 3222extern Lisp_Object help_echo_object, previous_help_echo_string;
3235extern ptrdiff_t help_echo_pos; 3223extern ptrdiff_t help_echo_pos;
@@ -3243,6 +3231,7 @@ extern ptrdiff_t compute_display_string_pos (struct text_pos *,
3243extern ptrdiff_t compute_display_string_end (ptrdiff_t, 3231extern ptrdiff_t compute_display_string_end (ptrdiff_t,
3244 struct bidi_string_data *); 3232 struct bidi_string_data *);
3245extern void produce_stretch_glyph (struct it *); 3233extern void produce_stretch_glyph (struct it *);
3234extern int merge_glyphless_glyph_face (struct it *);
3246 3235
3247#ifdef HAVE_WINDOW_SYSTEM 3236#ifdef HAVE_WINDOW_SYSTEM
3248 3237
@@ -3260,9 +3249,6 @@ extern void x_insert_glyphs (struct window *, struct glyph_row *,
3260 struct glyph *, enum glyph_row_area, int); 3249 struct glyph *, enum glyph_row_area, int);
3261extern void x_clear_end_of_line (struct window *, struct glyph_row *, 3250extern void x_clear_end_of_line (struct window *, struct glyph_row *,
3262 enum glyph_row_area, int); 3251 enum glyph_row_area, int);
3263
3264extern struct cursor_pos output_cursor;
3265
3266extern void x_fix_overlapping_area (struct window *, struct glyph_row *, 3252extern void x_fix_overlapping_area (struct window *, struct glyph_row *,
3267 enum glyph_row_area, int); 3253 enum glyph_row_area, int);
3268extern void draw_phys_cursor_glyph (struct window *, 3254extern void draw_phys_cursor_glyph (struct window *,
@@ -3272,10 +3258,6 @@ extern void get_phys_cursor_geometry (struct window *, struct glyph_row *,
3272 struct glyph *, int *, int *, int *); 3258 struct glyph *, int *, int *, int *);
3273extern void erase_phys_cursor (struct window *); 3259extern void erase_phys_cursor (struct window *);
3274extern void display_and_set_cursor (struct window *, bool, int, int, int, int); 3260extern void display_and_set_cursor (struct window *, bool, int, int, int, int);
3275
3276extern void set_output_cursor (struct cursor_pos *);
3277extern void x_cursor_to (struct window *, int, int, int, int);
3278
3279extern void x_update_cursor (struct frame *, bool); 3261extern void x_update_cursor (struct frame *, bool);
3280extern void x_clear_cursor (struct window *); 3262extern void x_clear_cursor (struct window *);
3281extern void x_draw_vertical_border (struct window *w); 3263extern void x_draw_vertical_border (struct window *w);
@@ -3439,8 +3421,6 @@ extern frame_parm_handler x_frame_parm_handlers[];
3439extern void start_hourglass (void); 3421extern void start_hourglass (void);
3440extern void cancel_hourglass (void); 3422extern void cancel_hourglass (void);
3441extern int hourglass_shown_p; 3423extern int hourglass_shown_p;
3442
3443struct atimer; /* Defined in atimer.h. */
3444/* If non-null, an asynchronous timer that, when it expires, displays 3424/* If non-null, an asynchronous timer that, when it expires, displays
3445 an hourglass cursor on all frames. */ 3425 an hourglass cursor on all frames. */
3446extern struct atimer *hourglass_atimer; 3426extern struct atimer *hourglass_atimer;
@@ -3492,7 +3472,7 @@ extern void cancel_line (int, struct frame *);
3492extern void init_desired_glyphs (struct frame *); 3472extern void init_desired_glyphs (struct frame *);
3493extern bool update_frame (struct frame *, bool, bool); 3473extern bool update_frame (struct frame *, bool, bool);
3494extern void bitch_at_user (void); 3474extern void bitch_at_user (void);
3495void adjust_glyphs (struct frame *); 3475extern void adjust_frame_glyphs (struct frame *);
3496void free_glyphs (struct frame *); 3476void free_glyphs (struct frame *);
3497void free_window_matrices (struct window *); 3477void free_window_matrices (struct window *);
3498void check_glyph_memory (void); 3478void check_glyph_memory (void);
diff --git a/src/dispnew.c b/src/dispnew.c
index 096416db56e..c239d7ab745 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -80,7 +80,6 @@ struct dim
80static void update_frame_line (struct frame *, int); 80static void update_frame_line (struct frame *, int);
81static int required_matrix_height (struct window *); 81static int required_matrix_height (struct window *);
82static int required_matrix_width (struct window *); 82static int required_matrix_width (struct window *);
83static void adjust_frame_glyphs (struct frame *);
84static void change_frame_size_1 (struct frame *, int, int, bool, bool, bool); 83static void change_frame_size_1 (struct frame *, int, int, bool, bool, bool);
85static void increment_row_positions (struct glyph_row *, ptrdiff_t, ptrdiff_t); 84static void increment_row_positions (struct glyph_row *, ptrdiff_t, ptrdiff_t);
86static void fill_up_frame_row_with_spaces (struct glyph_row *, int); 85static void fill_up_frame_row_with_spaces (struct glyph_row *, int);
@@ -155,16 +154,6 @@ static int glyph_pool_count;
155 154
156static struct frame *frame_matrix_frame; 155static struct frame *frame_matrix_frame;
157 156
158/* True means that fonts have been loaded since the last glyph
159 matrix adjustments. Redisplay must stop, and glyph matrices must
160 be adjusted when this flag becomes true during display. The
161 reason fonts can be loaded so late is that fonts of fontsets are
162 loaded on demand. Another reason is that a line contains many
163 characters displayed by zero width or very narrow glyphs of
164 variable-width fonts. */
165
166bool fonts_changed_p;
167
168/* Convert vpos and hpos from frame to window and vice versa. 157/* Convert vpos and hpos from frame to window and vice versa.
169 This may only be used for terminal frames. */ 158 This may only be used for terminal frames. */
170 159
@@ -415,7 +404,7 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y
415 Get W's size. */ 404 Get W's size. */
416 if (w) 405 if (w)
417 { 406 {
418 window_box (w, -1, 0, 0, &window_width, &window_height); 407 window_box (w, ANY_AREA, 0, 0, &window_width, &window_height);
419 408
420 header_line_p = WINDOW_WANTS_HEADER_LINE_P (w); 409 header_line_p = WINDOW_WANTS_HEADER_LINE_P (w);
421 header_line_changed_p = header_line_p != matrix->header_line_p; 410 header_line_changed_p = header_line_p != matrix->header_line_p;
@@ -435,7 +424,7 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y
435 || right != matrix->right_margin_glyphs); 424 || right != matrix->right_margin_glyphs);
436 425
437 if (!marginal_areas_changed_p 426 if (!marginal_areas_changed_p
438 && !fonts_changed_p 427 && !XFRAME (w->frame)->fonts_changed
439 && !header_line_changed_p 428 && !header_line_changed_p
440 && matrix->window_left_col == WINDOW_LEFT_EDGE_COL (w) 429 && matrix->window_left_col == WINDOW_LEFT_EDGE_COL (w)
441 && matrix->window_top_line == WINDOW_TOP_EDGE_LINE (w) 430 && matrix->window_top_line == WINDOW_TOP_EDGE_LINE (w)
@@ -1801,37 +1790,17 @@ allocate_matrices_for_window_redisplay (struct window *w)
1801 } 1790 }
1802} 1791}
1803 1792
1804 1793/* Allocate/reallocate glyph matrices of a single frame F.
1805/* Re-allocate/ re-compute glyph matrices on frame F. If F is null, 1794 This function must be called when a new frame is created,
1806 do it for all frames; otherwise do it just for the given frame. 1795 its size changes, or its window configuration changes. */
1807 This function must be called when a new frame is created, its size
1808 changes, or its window configuration changes. */
1809 1796
1810void 1797void
1811adjust_glyphs (struct frame *f) 1798adjust_frame_glyphs (struct frame *f)
1812{ 1799{
1813 /* Block input so that expose events and other events that access 1800 /* Block input so that expose events and other events that access
1814 glyph matrices are not processed while we are changing them. */ 1801 glyph matrices are not processed while we are changing them. */
1815 block_input (); 1802 block_input ();
1816 1803
1817 if (f)
1818 adjust_frame_glyphs (f);
1819 else
1820 {
1821 Lisp_Object tail, lisp_frame;
1822
1823 FOR_EACH_FRAME (tail, lisp_frame)
1824 adjust_frame_glyphs (XFRAME (lisp_frame));
1825 }
1826
1827 unblock_input ();
1828}
1829
1830/* Allocate/reallocate glyph matrices of a single frame F. */
1831
1832static void
1833adjust_frame_glyphs (struct frame *f)
1834{
1835 if (FRAME_WINDOW_P (f)) 1804 if (FRAME_WINDOW_P (f))
1836 adjust_frame_glyphs_for_window_redisplay (f); 1805 adjust_frame_glyphs_for_window_redisplay (f);
1837 else 1806 else
@@ -1841,6 +1810,8 @@ adjust_frame_glyphs (struct frame *f)
1841 adjust_decode_mode_spec_buffer (f); 1810 adjust_decode_mode_spec_buffer (f);
1842 1811
1843 f->glyphs_initialized_p = 1; 1812 f->glyphs_initialized_p = 1;
1813
1814 unblock_input ();
1844} 1815}
1845 1816
1846/* Return true if any window in the tree has nonzero window margins. See 1817/* Return true if any window in the tree has nonzero window margins. See
@@ -3092,16 +3063,6 @@ update_frame (struct frame *f, bool force_p, bool inhibit_hairy_id_p)
3092 /* Update windows. */ 3063 /* Update windows. */
3093 paused_p = update_window_tree (root_window, force_p); 3064 paused_p = update_window_tree (root_window, force_p);
3094 update_end (f); 3065 update_end (f);
3095
3096 /* This flush is a performance bottleneck under X,
3097 and it doesn't seem to be necessary anyway (in general).
3098 It is necessary when resizing the window with the mouse, or
3099 at least the fringes are not redrawn in a timely manner. ++kfs */
3100 if (f->force_flush_display_p)
3101 {
3102 FRAME_RIF (f)->flush_display (f);
3103 f->force_flush_display_p = 0;
3104 }
3105 } 3066 }
3106 else 3067 else
3107 { 3068 {
@@ -3225,8 +3186,8 @@ redraw_overlapped_rows (struct window *w, int yb)
3225 3186
3226 for (area = LEFT_MARGIN_AREA; area < LAST_AREA; ++area) 3187 for (area = LEFT_MARGIN_AREA; area < LAST_AREA; ++area)
3227 { 3188 {
3228 FRAME_RIF (f)->cursor_to (w, i, 0, row->y, 3189 output_cursor_to (w, i, 0, row->y,
3229 area == TEXT_AREA ? row->x : 0); 3190 area == TEXT_AREA ? row->x : 0);
3230 if (row->used[area]) 3191 if (row->used[area])
3231 FRAME_RIF (f)->write_glyphs (w, row, row->glyphs[area], 3192 FRAME_RIF (f)->write_glyphs (w, row, row->glyphs[area],
3232 area, row->used[area]); 3193 area, row->used[area]);
@@ -3483,7 +3444,7 @@ update_window (struct window *w, bool force_p)
3483 /* End the update of window W. Don't set the cursor if we 3444 /* End the update of window W. Don't set the cursor if we
3484 paused updating the display because in this case, 3445 paused updating the display because in this case,
3485 set_window_cursor_after_update hasn't been called, and 3446 set_window_cursor_after_update hasn't been called, and
3486 output_cursor doesn't contain the cursor location. */ 3447 W->output_cursor doesn't contain the cursor location. */
3487 rif->update_window_end_hook (w, !paused_p, mouse_face_overwritten_p); 3448 rif->update_window_end_hook (w, !paused_p, mouse_face_overwritten_p);
3488 } 3449 }
3489 else 3450 else
@@ -3516,7 +3477,7 @@ update_marginal_area (struct window *w, struct glyph_row *updated_row,
3516 /* Set cursor to start of glyphs, write them, and clear to the end 3477 /* Set cursor to start of glyphs, write them, and clear to the end
3517 of the area. I don't think that something more sophisticated is 3478 of the area. I don't think that something more sophisticated is
3518 necessary here, since marginal areas will not be the default. */ 3479 necessary here, since marginal areas will not be the default. */
3519 rif->cursor_to (w, vpos, 0, desired_row->y, 0); 3480 output_cursor_to (w, vpos, 0, desired_row->y, 0);
3520 if (desired_row->used[area]) 3481 if (desired_row->used[area])
3521 rif->write_glyphs (w, updated_row, desired_row->glyphs[area], 3482 rif->write_glyphs (w, updated_row, desired_row->glyphs[area],
3522 area, desired_row->used[area]); 3483 area, desired_row->used[area]);
@@ -3554,7 +3515,7 @@ update_text_area (struct window *w, struct glyph_row *updated_row, int vpos)
3554 && !(current_row->mode_line_p && vpos > 0)) 3515 && !(current_row->mode_line_p && vpos > 0))
3555 || current_row->x != desired_row->x) 3516 || current_row->x != desired_row->x)
3556 { 3517 {
3557 rif->cursor_to (w, vpos, 0, desired_row->y, desired_row->x); 3518 output_cursor_to (w, vpos, 0, desired_row->y, desired_row->x);
3558 3519
3559 if (desired_row->used[TEXT_AREA]) 3520 if (desired_row->used[TEXT_AREA])
3560 rif->write_glyphs (w, updated_row, desired_row->glyphs[TEXT_AREA], 3521 rif->write_glyphs (w, updated_row, desired_row->glyphs[TEXT_AREA],
@@ -3697,7 +3658,7 @@ update_text_area (struct window *w, struct glyph_row *updated_row, int vpos)
3697 break; 3658 break;
3698 } 3659 }
3699 3660
3700 rif->cursor_to (w, vpos, start_hpos, desired_row->y, start_x); 3661 output_cursor_to (w, vpos, start_hpos, desired_row->y, start_x);
3701 rif->write_glyphs (w, updated_row, start, 3662 rif->write_glyphs (w, updated_row, start,
3702 TEXT_AREA, i - start_hpos); 3663 TEXT_AREA, i - start_hpos);
3703 changed_p = 1; 3664 changed_p = 1;
@@ -3707,7 +3668,7 @@ update_text_area (struct window *w, struct glyph_row *updated_row, int vpos)
3707 /* Write the rest. */ 3668 /* Write the rest. */
3708 if (i < desired_row->used[TEXT_AREA]) 3669 if (i < desired_row->used[TEXT_AREA])
3709 { 3670 {
3710 rif->cursor_to (w, vpos, i, desired_row->y, x); 3671 output_cursor_to (w, vpos, i, desired_row->y, x);
3711 rif->write_glyphs (w, updated_row, desired_glyph, 3672 rif->write_glyphs (w, updated_row, desired_glyph,
3712 TEXT_AREA, desired_row->used[TEXT_AREA] - i); 3673 TEXT_AREA, desired_row->used[TEXT_AREA] - i);
3713 changed_p = 1; 3674 changed_p = 1;
@@ -3729,8 +3690,8 @@ update_text_area (struct window *w, struct glyph_row *updated_row, int vpos)
3729 { 3690 {
3730 /* If old row extends to the end of the text area, clear. */ 3691 /* If old row extends to the end of the text area, clear. */
3731 if (i >= desired_row->used[TEXT_AREA]) 3692 if (i >= desired_row->used[TEXT_AREA])
3732 rif->cursor_to (w, vpos, i, desired_row->y, 3693 output_cursor_to (w, vpos, i, desired_row->y,
3733 desired_row->pixel_width); 3694 desired_row->pixel_width);
3734 rif->clear_end_of_line (w, updated_row, TEXT_AREA, -1); 3695 rif->clear_end_of_line (w, updated_row, TEXT_AREA, -1);
3735 changed_p = 1; 3696 changed_p = 1;
3736 } 3697 }
@@ -3741,8 +3702,8 @@ update_text_area (struct window *w, struct glyph_row *updated_row, int vpos)
3741 int xlim; 3702 int xlim;
3742 3703
3743 if (i >= desired_row->used[TEXT_AREA]) 3704 if (i >= desired_row->used[TEXT_AREA])
3744 rif->cursor_to (w, vpos, i, desired_row->y, 3705 output_cursor_to (w, vpos, i, desired_row->y,
3745 desired_row->pixel_width); 3706 desired_row->pixel_width);
3746 3707
3747 /* If cursor is displayed at the end of the line, make sure 3708 /* If cursor is displayed at the end of the line, make sure
3748 it's cleared. Nowadays we don't have a phys_cursor_glyph 3709 it's cleared. Nowadays we don't have a phys_cursor_glyph
@@ -3841,7 +3802,6 @@ static void
3841set_window_cursor_after_update (struct window *w) 3802set_window_cursor_after_update (struct window *w)
3842{ 3803{
3843 struct frame *f = XFRAME (w->frame); 3804 struct frame *f = XFRAME (w->frame);
3844 struct redisplay_interface *rif = FRAME_RIF (f);
3845 int cx, cy, vpos, hpos; 3805 int cx, cy, vpos, hpos;
3846 3806
3847 /* Not intended for frame matrix updates. */ 3807 /* Not intended for frame matrix updates. */
@@ -3913,7 +3873,7 @@ set_window_cursor_after_update (struct window *w)
3913 Horizontal position is -1 when cursor is on the left fringe. */ 3873 Horizontal position is -1 when cursor is on the left fringe. */
3914 hpos = clip_to_bounds (-1, hpos, w->current_matrix->matrix_w - 1); 3874 hpos = clip_to_bounds (-1, hpos, w->current_matrix->matrix_w - 1);
3915 vpos = clip_to_bounds (0, vpos, w->current_matrix->nrows - 1); 3875 vpos = clip_to_bounds (0, vpos, w->current_matrix->nrows - 1);
3916 rif->cursor_to (w, vpos, hpos, cy, cx); 3876 output_cursor_to (w, vpos, hpos, cy, cx);
3917} 3877}
3918 3878
3919 3879
@@ -5078,9 +5038,7 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p
5078 wrong thing with `face-remapping-alist' (bug#2044). */ 5038 wrong thing with `face-remapping-alist' (bug#2044). */
5079 Fset_buffer (w->contents); 5039 Fset_buffer (w->contents);
5080 itdata = bidi_shelve_cache (); 5040 itdata = bidi_shelve_cache ();
5081 SET_TEXT_POS_FROM_MARKER (startp, w->start); 5041 CLIP_TEXT_POS_FROM_MARKER (startp, w->start);
5082 CHARPOS (startp) = min (ZV, max (BEGV, CHARPOS (startp)));
5083 BYTEPOS (startp) = min (ZV_BYTE, max (BEGV_BYTE, BYTEPOS (startp)));
5084 start_display (&it, w, startp); 5042 start_display (&it, w, startp);
5085 /* start_display takes into account the header-line row, but IT's 5043 /* start_display takes into account the header-line row, but IT's
5086 vpos still counts from the glyph row that includes the window's 5044 vpos still counts from the glyph row that includes the window's
@@ -5560,7 +5518,7 @@ change_frame_size_1 (struct frame *f, int newheight, int newwidth,
5560 w->cursor.vpos = w->cursor.y = 0; 5518 w->cursor.vpos = w->cursor.y = 0;
5561 } 5519 }
5562 5520
5563 adjust_glyphs (f); 5521 adjust_frame_glyphs (f);
5564 calculate_costs (f); 5522 calculate_costs (f);
5565 SET_FRAME_GARBAGED (f); 5523 SET_FRAME_GARBAGED (f);
5566 f->resized_p = 1; 5524 f->resized_p = 1;
@@ -6186,19 +6144,6 @@ WINDOW nil or omitted means report on the selected window. */)
6186{ 6144{
6187 return decode_any_window (window)->cursor_off_p ? Qnil : Qt; 6145 return decode_any_window (window)->cursor_off_p ? Qnil : Qt;
6188} 6146}
6189
6190DEFUN ("last-nonminibuffer-frame", Flast_nonminibuf_frame,
6191 Slast_nonminibuf_frame, 0, 0, 0,
6192 doc: /* Value is last nonminibuffer frame. */)
6193 (void)
6194{
6195 Lisp_Object frame = Qnil;
6196
6197 if (last_nonminibuf_frame)
6198 XSETFRAME (frame, last_nonminibuf_frame);
6199
6200 return frame;
6201}
6202 6147
6203/*********************************************************************** 6148/***********************************************************************
6204 Initialization 6149 Initialization
@@ -6217,7 +6162,6 @@ syms_of_display (void)
6217 defsubr (&Ssend_string_to_terminal); 6162 defsubr (&Ssend_string_to_terminal);
6218 defsubr (&Sinternal_show_cursor); 6163 defsubr (&Sinternal_show_cursor);
6219 defsubr (&Sinternal_show_cursor_p); 6164 defsubr (&Sinternal_show_cursor_p);
6220 defsubr (&Slast_nonminibuf_frame);
6221 6165
6222#ifdef GLYPH_DEBUG 6166#ifdef GLYPH_DEBUG
6223 defsubr (&Sdump_redisplay_history); 6167 defsubr (&Sdump_redisplay_history);
diff --git a/src/editfns.c b/src/editfns.c
index 9e36655f3d3..84a5c8395fc 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -233,26 +233,12 @@ Beginning of buffer is position (point-min), end is (point-max).
233The return value is POSITION. */) 233The return value is POSITION. */)
234 (register Lisp_Object position) 234 (register Lisp_Object position)
235{ 235{
236 ptrdiff_t pos; 236 if (MARKERP (position))
237 237 set_point_from_marker (position);
238 if (MARKERP (position) 238 else if (INTEGERP (position))
239 && current_buffer == XMARKER (position)->buffer) 239 SET_PT (clip_to_bounds (BEGV, XINT (position), ZV));
240 { 240 else
241 pos = marker_position (position); 241 wrong_type_argument (Qinteger_or_marker_p, position);
242 if (pos < BEGV)
243 SET_PT_BOTH (BEGV, BEGV_BYTE);
244 else if (pos > ZV)
245 SET_PT_BOTH (ZV, ZV_BYTE);
246 else
247 SET_PT_BOTH (pos, marker_byte_position (position));
248
249 return position;
250 }
251
252 CHECK_NUMBER_COERCE_MARKER (position);
253
254 pos = clip_to_bounds (BEGV, XINT (position), ZV);
255 SET_PT (pos);
256 return position; 242 return position;
257} 243}
258 244
diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c
index 8635ab652ac..1e57eeb57c4 100644
--- a/src/emacsgtkfixed.c
+++ b/src/emacsgtkfixed.c
@@ -20,15 +20,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21#include <config.h> 21#include <config.h>
22 22
23#include "emacsgtkfixed.h"
24#include <stdio.h>
25
26#include "lisp.h" 23#include "lisp.h"
27#include "frame.h" 24#include "frame.h"
28#include "xterm.h" 25#include "xterm.h"
29#ifdef HAVE_XWIDGETS 26#ifdef HAVE_XWIDGETS
30#include "xwidget.h" 27#include "xwidget.h"
31#endif 28#endif
29#include "emacsgtkfixed.h"
30
32/* Silence a bogus diagnostic; see GNOME bug 683906. */ 31/* Silence a bogus diagnostic; see GNOME bug 683906. */
33#if 4 < __GNUC__ + (7 <= __GNUC_MINOR__) 32#if 4 < __GNUC__ + (7 <= __GNUC_MINOR__)
34# pragma GCC diagnostic push 33# pragma GCC diagnostic push
diff --git a/src/eval.c b/src/eval.c
index 566be0c2a83..6e964f6604b 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2033,7 +2033,9 @@ it is defines a macro. */)
2033 2033
2034DEFUN ("eval", Feval, Seval, 1, 2, 0, 2034DEFUN ("eval", Feval, Seval, 1, 2, 0,
2035 doc: /* Evaluate FORM and return its value. 2035 doc: /* Evaluate FORM and return its value.
2036If LEXICAL is t, evaluate using lexical scoping. */) 2036If LEXICAL is t, evaluate using lexical scoping.
2037LEXICAL can also be an actual lexical environment, in the form of an
2038alist mapping symbols to their value. */)
2037 (Lisp_Object form, Lisp_Object lexical) 2039 (Lisp_Object form, Lisp_Object lexical)
2038{ 2040{
2039 ptrdiff_t count = SPECPDL_INDEX (); 2041 ptrdiff_t count = SPECPDL_INDEX ();
@@ -2146,8 +2148,9 @@ eval_sub (Lisp_Object form)
2146 2148
2147 /* Optimize for no indirection. */ 2149 /* Optimize for no indirection. */
2148 fun = original_fun; 2150 fun = original_fun;
2149 if (SYMBOLP (fun) && !NILP (fun) 2151 if (!SYMBOLP (fun))
2150 && (fun = XSYMBOL (fun)->function, SYMBOLP (fun))) 2152 fun = Ffunction (Fcons (fun, Qnil));
2153 else if (!NILP (fun) && (fun = XSYMBOL (fun)->function, SYMBOLP (fun)))
2151 fun = indirect_function (fun); 2154 fun = indirect_function (fun);
2152 2155
2153 if (SUBRP (fun)) 2156 if (SUBRP (fun))
@@ -3151,20 +3154,17 @@ let_shadows_global_binding_p (Lisp_Object symbol)
3151 return 0; 3154 return 0;
3152} 3155}
3153 3156
3154/* `specpdl_ptr->symbol' is a field which describes which variable is 3157/* `specpdl_ptr' describes which variable is
3155 let-bound, so it can be properly undone when we unbind_to. 3158 let-bound, so it can be properly undone when we unbind_to.
3156 It can have the following two shapes: 3159 It can be either a plain SPECPDL_LET or a SPECPDL_LET_LOCAL/DEFAULT.
3157 - SYMBOL : if it's a plain symbol, it means that we have let-bound 3160 - SYMBOL is the variable being bound. Note that it should not be
3158 a symbol that is not buffer-local (at least at the time
3159 the let binding started). Note also that it should not be
3160 aliased (i.e. when let-binding V1 that's aliased to V2, we want 3161 aliased (i.e. when let-binding V1 that's aliased to V2, we want
3161 to record V2 here). 3162 to record V2 here).
3162 - (SYMBOL WHERE . BUFFER) : this means that it is a let-binding for 3163 - WHERE tells us in which buffer the binding took place.
3163 variable SYMBOL which can be buffer-local. WHERE tells us 3164 This is used for SPECPDL_LET_LOCAL bindings (i.e. bindings to a
3164 which buffer is affected (or nil if the let-binding affects the 3165 buffer-local variable) as well as for SPECPDL_LET_DEFAULT bindings,
3165 global value of the variable) and BUFFER tells us which buffer was 3166 i.e. bindings to the default value of a variable which can be
3166 current (i.e. if WHERE is non-nil, then BUFFER==WHERE, otherwise 3167 buffer-local. */
3167 BUFFER did not yet have a buffer-local value). */
3168 3168
3169void 3169void
3170specbind (Lisp_Object symbol, Lisp_Object value) 3170specbind (Lisp_Object symbol, Lisp_Object value)
diff --git a/src/fileio.c b/src/fileio.c
index a751a73ae50..0e6113f349d 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -233,7 +233,7 @@ void
233restore_point_unwind (Lisp_Object location) 233restore_point_unwind (Lisp_Object location)
234{ 234{
235 Fgoto_char (location); 235 Fgoto_char (location);
236 Fset_marker (location, Qnil, Qnil); 236 unchain_marker (XMARKER (location));
237} 237}
238 238
239 239
diff --git a/src/font.c b/src/font.c
index 6a8262623dc..2606a25dff8 100644
--- a/src/font.c
+++ b/src/font.c
@@ -2866,14 +2866,14 @@ font_open_entity (struct frame *f, Lisp_Object entity, int pixel_size)
2866 { 2866 {
2867 FRAME_SMALLEST_CHAR_WIDTH (f) = min_width; 2867 FRAME_SMALLEST_CHAR_WIDTH (f) = min_width;
2868 FRAME_SMALLEST_FONT_HEIGHT (f) = height; 2868 FRAME_SMALLEST_FONT_HEIGHT (f) = height;
2869 fonts_changed_p = 1; 2869 f->fonts_changed = 1;
2870 } 2870 }
2871 else 2871 else
2872 { 2872 {
2873 if (FRAME_SMALLEST_CHAR_WIDTH (f) > min_width) 2873 if (FRAME_SMALLEST_CHAR_WIDTH (f) > min_width)
2874 FRAME_SMALLEST_CHAR_WIDTH (f) = min_width, fonts_changed_p = 1; 2874 FRAME_SMALLEST_CHAR_WIDTH (f) = min_width, f->fonts_changed = 1;
2875 if (FRAME_SMALLEST_FONT_HEIGHT (f) > height) 2875 if (FRAME_SMALLEST_FONT_HEIGHT (f) > height)
2876 FRAME_SMALLEST_FONT_HEIGHT (f) = height, fonts_changed_p = 1; 2876 FRAME_SMALLEST_FONT_HEIGHT (f) = height, f->fonts_changed = 1;
2877 } 2877 }
2878#endif 2878#endif
2879 2879
@@ -3379,9 +3379,11 @@ register_font_driver (struct font_driver *driver, struct frame *f)
3379 struct font_driver_list *root = f ? f->font_driver_list : font_driver_list; 3379 struct font_driver_list *root = f ? f->font_driver_list : font_driver_list;
3380 struct font_driver_list *prev, *list; 3380 struct font_driver_list *prev, *list;
3381 3381
3382#ifdef HAVE_WINDOW_SYSTEM
3382 if (f && ! driver->draw) 3383 if (f && ! driver->draw)
3383 error ("Unusable font driver for a frame: %s", 3384 error ("Unusable font driver for a frame: %s",
3384 SDATA (SYMBOL_NAME (driver->type))); 3385 SDATA (SYMBOL_NAME (driver->type)));
3386#endif /* HAVE_WINDOW_SYSTEM */
3385 3387
3386 for (prev = NULL, list = root; list; prev = list, list = list->next) 3388 for (prev = NULL, list = root; list; prev = list, list = list->next)
3387 if (EQ (list->driver->type, driver->type)) 3389 if (EQ (list->driver->type, driver->type))
diff --git a/src/font.h b/src/font.h
index adb4a582fd8..3e0d97baaac 100644
--- a/src/font.h
+++ b/src/font.h
@@ -56,11 +56,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
56 56
57extern Lisp_Object Qfont_spec, Qfont_entity, Qfont_object; 57extern Lisp_Object Qfont_spec, Qfont_entity, Qfont_object;
58 58
59
60struct font_driver;
61struct font;
62struct glyph_string;
63
64/* An enumerator for each font property. This is used as an index to 59/* An enumerator for each font property. This is used as an index to
65 the vector of FONT-SPEC and FONT-ENTITY. 60 the vector of FONT-SPEC and FONT-ENTITY.
66 61
@@ -487,8 +482,6 @@ struct font_bitmap
487 this value. */ 482 this value. */
488#define FONT_PIXEL_SIZE_QUANTUM 1 483#define FONT_PIXEL_SIZE_QUANTUM 1
489 484
490struct face;
491
492#define FONT_INVALID_CODE 0xFFFFFFFF 485#define FONT_INVALID_CODE 0xFFFFFFFF
493 486
494/* Font driver. Members specified as "optional" can be NULL. */ 487/* Font driver. Members specified as "optional" can be NULL. */
@@ -582,6 +575,8 @@ struct font_driver
582 unsigned *code, int nglyphs, 575 unsigned *code, int nglyphs,
583 struct font_metrics *metrics); 576 struct font_metrics *metrics);
584 577
578#ifdef HAVE_WINDOW_SYSTEM
579
585 /* Optional. 580 /* Optional.
586 Draw glyphs between FROM and TO of S->char2b at (X Y) pixel 581 Draw glyphs between FROM and TO of S->char2b at (X Y) pixel
587 position of frame F with S->FACE and S->GC. If WITH_BACKGROUND, 582 position of frame F with S->FACE and S->GC. If WITH_BACKGROUND,
@@ -602,6 +597,8 @@ struct font_driver
602 Free bitmap data in BITMAP. */ 597 Free bitmap data in BITMAP. */
603 void (*free_bitmap) (struct font *font, struct font_bitmap *bitmap); 598 void (*free_bitmap) (struct font *font, struct font_bitmap *bitmap);
604 599
600#endif /* HAVE_WINDOW_SYSTEM */
601
605 /* Optional. 602 /* Optional.
606 Return an outline data for glyph-code CODE of FONT. The format 603 Return an outline data for glyph-code CODE of FONT. The format
607 of the outline data depends on the font-driver. */ 604 of the outline data depends on the font-driver. */
diff --git a/src/fontset.c b/src/fontset.c
index 0bf716bf1b2..797d51ac0a7 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -39,17 +39,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
39#include "intervals.h" 39#include "intervals.h"
40#include "fontset.h" 40#include "fontset.h"
41#include "window.h" 41#include "window.h"
42#ifdef HAVE_X_WINDOWS 42#ifdef HAVE_WINDOW_SYSTEM
43#include "xterm.h" 43#include TERM_HEADER
44#endif 44#endif /* HAVE_WINDOW_SYSTEM */
45#ifdef HAVE_NTGUI
46#include "w32term.h"
47#endif
48#ifdef HAVE_NS
49#include "nsterm.h"
50#endif
51#include "termhooks.h" 45#include "termhooks.h"
52
53#include "font.h" 46#include "font.h"
54 47
55/* FONTSET 48/* FONTSET
@@ -944,6 +937,19 @@ face_for_char (struct frame *f, struct face *face, int c, int pos, Lisp_Object o
944 if (ASCII_CHAR_P (c) || face->fontset < 0) 937 if (ASCII_CHAR_P (c) || face->fontset < 0)
945 return face->ascii_face->id; 938 return face->ascii_face->id;
946 939
940#ifdef HAVE_NS
941 if (face->font)
942 {
943 /* Fonts often have characters in other scripts, like symbol, even if they
944 don't match script: symbol. So check if the character is present
945 in the current face first. Only enable for NS for now, but should
946 perhaps be general? */
947 Lisp_Object font_object;
948 XSETFONT (font_object, face->font);
949 if (font_has_char (f, font_object, c)) return face->id;
950 }
951#endif
952
947 eassert (fontset_id_valid_p (face->fontset)); 953 eassert (fontset_id_valid_p (face->fontset));
948 fontset = FONTSET_FROM_ID (face->fontset); 954 fontset = FONTSET_FROM_ID (face->fontset);
949 eassert (!BASE_FONTSET_P (fontset)); 955 eassert (!BASE_FONTSET_P (fontset));
diff --git a/src/fontset.h b/src/fontset.h
index fd16c7178f5..b8ef4789e71 100644
--- a/src/fontset.h
+++ b/src/fontset.h
@@ -26,8 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
26#ifndef EMACS_FONTSET_H 26#ifndef EMACS_FONTSET_H
27#define EMACS_FONTSET_H 27#define EMACS_FONTSET_H
28 28
29struct face;
30
31extern void free_face_fontset (struct frame *, struct face *); 29extern void free_face_fontset (struct frame *, struct face *);
32extern int face_for_char (struct frame *, struct face *, int, 30extern int face_for_char (struct frame *, struct face *, int,
33 int, Lisp_Object); 31 int, Lisp_Object);
@@ -42,7 +40,6 @@ extern Lisp_Object Qlatin;
42extern Lisp_Object fontset_name (int); 40extern Lisp_Object fontset_name (int);
43extern Lisp_Object fontset_ascii (int); 41extern Lisp_Object fontset_ascii (int);
44 42
45struct font;
46extern int face_for_font (struct frame *, Lisp_Object, struct face *); 43extern int face_for_font (struct frame *, Lisp_Object, struct face *);
47 44
48#endif /* EMACS_FONTSET_H */ 45#endif /* EMACS_FONTSET_H */
diff --git a/src/frame.c b/src/frame.c
index 5ee421bb9bf..692d224866c 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -224,7 +224,7 @@ set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
224 FRAME_WINDOW_SIZES_CHANGED (f) = 1; 224 FRAME_WINDOW_SIZES_CHANGED (f) = 1;
225 FRAME_MENU_BAR_LINES (f) = nlines; 225 FRAME_MENU_BAR_LINES (f) = nlines;
226 set_menu_bar_lines_1 (f->root_window, nlines - olines); 226 set_menu_bar_lines_1 (f->root_window, nlines - olines);
227 adjust_glyphs (f); 227 adjust_frame_glyphs (f);
228 } 228 }
229} 229}
230 230
@@ -712,7 +712,7 @@ affects all frames on the same terminal device. */)
712 change_frame_size (f, height, width, 0, 0, 0); 712 change_frame_size (f, height, width, 0, 0, 0);
713 } 713 }
714 714
715 adjust_glyphs (f); 715 adjust_frame_glyphs (f);
716 calculate_costs (f); 716 calculate_costs (f);
717 XSETFRAME (frame, f); 717 XSETFRAME (frame, f);
718 718
@@ -1078,6 +1078,19 @@ Otherwise, include all frames. */)
1078 CHECK_LIVE_FRAME (frame); 1078 CHECK_LIVE_FRAME (frame);
1079 return prev_frame (frame, miniframe); 1079 return prev_frame (frame, miniframe);
1080} 1080}
1081
1082DEFUN ("last-nonminibuffer-frame", Flast_nonminibuf_frame,
1083 Slast_nonminibuf_frame, 0, 0, 0,
1084 doc: /* Return last non-minibuffer frame selected. */)
1085 (void)
1086{
1087 Lisp_Object frame = Qnil;
1088
1089 if (last_nonminibuf_frame)
1090 XSETFRAME (frame, last_nonminibuf_frame);
1091
1092 return frame;
1093}
1081 1094
1082/* Return 1 if it is ok to delete frame F; 1095/* Return 1 if it is ok to delete frame F;
1083 0 if all frames aside from F are invisible. 1096 0 if all frames aside from F are invisible.
@@ -1095,7 +1108,7 @@ other_visible_frames (struct frame *f)
1095 1108
1096 /* Verify that we can still talk to the frame's X window, 1109 /* Verify that we can still talk to the frame's X window,
1097 and note any recent change in visibility. */ 1110 and note any recent change in visibility. */
1098#ifdef HAVE_WINDOW_SYSTEM 1111#ifdef HAVE_X_WINDOWS
1099 if (FRAME_WINDOW_P (XFRAME (this))) 1112 if (FRAME_WINDOW_P (XFRAME (this)))
1100 x_sync (XFRAME (this)); 1113 x_sync (XFRAME (this));
1101#endif 1114#endif
@@ -1120,6 +1133,8 @@ check_minibuf_window (Lisp_Object frame, int select)
1120{ 1133{
1121 struct frame *f = decode_live_frame (frame); 1134 struct frame *f = decode_live_frame (frame);
1122 1135
1136 XSETFRAME (frame, f);
1137
1123 if (WINDOWP (minibuf_window) && EQ (f->minibuffer_window, minibuf_window)) 1138 if (WINDOWP (minibuf_window) && EQ (f->minibuffer_window, minibuf_window))
1124 { 1139 {
1125 Lisp_Object frames, this, window = make_number (0); 1140 Lisp_Object frames, this, window = make_number (0);
@@ -1137,9 +1152,8 @@ check_minibuf_window (Lisp_Object frame, int select)
1137 } 1152 }
1138 } 1153 }
1139 1154
1140 if (!WINDOWP (window)) 1155 /* Don't abort if no window was found (Bug#15247). */
1141 emacs_abort (); 1156 if (WINDOWP (window))
1142 else
1143 { 1157 {
1144 /* Use set_window_buffer instead of Fset_window_buffer (see 1158 /* Use set_window_buffer instead of Fset_window_buffer (see
1145 discussion of bug#11984, bug#12025, bug#12026). */ 1159 discussion of bug#11984, bug#12025, bug#12026). */
@@ -4493,6 +4507,7 @@ automatically. See also `mouse-autoselect-window'. */);
4493 defsubr (&Sframe_list); 4507 defsubr (&Sframe_list);
4494 defsubr (&Snext_frame); 4508 defsubr (&Snext_frame);
4495 defsubr (&Sprevious_frame); 4509 defsubr (&Sprevious_frame);
4510 defsubr (&Slast_nonminibuf_frame);
4496 defsubr (&Sdelete_frame); 4511 defsubr (&Sdelete_frame);
4497 defsubr (&Smouse_position); 4512 defsubr (&Smouse_position);
4498 defsubr (&Smouse_pixel_position); 4513 defsubr (&Smouse_pixel_position);
diff --git a/src/frame.h b/src/frame.h
index 2dcb7562524..87e218ee938 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -24,31 +24,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
24#define EMACS_FRAME_H 24#define EMACS_FRAME_H
25 25
26#include "dispextern.h" 26#include "dispextern.h"
27#include "termhooks.h"
27 28
28INLINE_HEADER_BEGIN 29INLINE_HEADER_BEGIN
29#ifndef FRAME_INLINE 30#ifndef FRAME_INLINE
30# define FRAME_INLINE INLINE 31# define FRAME_INLINE INLINE
31#endif 32#endif
32 33
33
34/* Miscellanea. */
35
36/* Nonzero means there is at least one garbaged frame. */
37extern bool frame_garbaged;
38
39
40/* The structure representing a frame. */
41
42enum output_method
43{
44 output_initial,
45 output_termcap,
46 output_x_window,
47 output_msdos_raw,
48 output_w32,
49 output_ns
50};
51
52enum vertical_scroll_bar_type 34enum vertical_scroll_bar_type
53{ 35{
54 vertical_scroll_bar_none, 36 vertical_scroll_bar_none,
@@ -66,10 +48,7 @@ enum fullscreen_type
66 FULLSCREEN_WAIT = 0x100 48 FULLSCREEN_WAIT = 0x100
67}; 49};
68 50
69 51/* The structure representing a frame. */
70#define FRAME_FOREGROUND_PIXEL(f) ((f)->foreground_pixel)
71#define FRAME_BACKGROUND_PIXEL(f) ((f)->background_pixel)
72
73 52
74struct frame 53struct frame
75{ 54{
@@ -206,10 +185,6 @@ struct frame
206 Clear the frame in clear_garbaged_frames if set. */ 185 Clear the frame in clear_garbaged_frames if set. */
207 unsigned resized_p : 1; 186 unsigned resized_p : 1;
208 187
209 /* Set to non-zero in when we want for force a flush_display in
210 update_frame, usually after resizing the frame. */
211 unsigned force_flush_display_p : 1;
212
213 /* Set to non-zero if the default face for the frame has been 188 /* Set to non-zero if the default face for the frame has been
214 realized. Reset to zero whenever the default face changes. 189 realized. Reset to zero whenever the default face changes.
215 Used to see the difference between a font change and face change. */ 190 Used to see the difference between a font change and face change. */
@@ -231,6 +206,13 @@ struct frame
231 unsigned external_tool_bar : 1; 206 unsigned external_tool_bar : 1;
232#endif 207#endif
233 208
209 /* Nonzero means that fonts have been loaded since the last glyph
210 matrix adjustments. */
211 unsigned fonts_changed : 1;
212
213 /* Nonzero means that cursor type has been changed. */
214 unsigned cursor_type_changed : 1;
215
234 /* Margin at the top of the frame. Used to display the tool-bar. */ 216 /* Margin at the top of the frame. Used to display the tool-bar. */
235 int tool_bar_lines; 217 int tool_bar_lines;
236 218
@@ -884,6 +866,9 @@ default_pixels_per_inch_y (void)
884#define FRAME_CURSOR_WIDTH(f) ((f)->cursor_width) 866#define FRAME_CURSOR_WIDTH(f) ((f)->cursor_width)
885#define FRAME_BLINK_OFF_CURSOR_WIDTH(f) ((f)->blink_off_cursor_width) 867#define FRAME_BLINK_OFF_CURSOR_WIDTH(f) ((f)->blink_off_cursor_width)
886 868
869#define FRAME_FOREGROUND_PIXEL(f) ((f)->foreground_pixel)
870#define FRAME_BACKGROUND_PIXEL(f) ((f)->background_pixel)
871
887/* Return a pointer to the face cache of frame F. */ 872/* Return a pointer to the face cache of frame F. */
888 873
889#define FRAME_FACE_CACHE(F) (F)->face_cache 874#define FRAME_FACE_CACHE(F) (F)->face_cache
@@ -950,6 +935,9 @@ extern Lisp_Object Qtty_color_mode;
950extern Lisp_Object Qterminal; 935extern Lisp_Object Qterminal;
951extern Lisp_Object Qnoelisp; 936extern Lisp_Object Qnoelisp;
952 937
938/* Nonzero means there is at least one garbaged frame. */
939extern bool frame_garbaged;
940
953extern struct frame *last_nonminibuf_frame; 941extern struct frame *last_nonminibuf_frame;
954 942
955extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); 943extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
@@ -1251,7 +1239,6 @@ extern Lisp_Object display_x_get_resource (Display_Info *,
1251extern void set_frame_menubar (struct frame *f, bool first_time, bool deep_p); 1239extern void set_frame_menubar (struct frame *f, bool first_time, bool deep_p);
1252extern void x_set_window_size (struct frame *f, int change_grav, 1240extern void x_set_window_size (struct frame *f, int change_grav,
1253 int cols, int rows); 1241 int cols, int rows);
1254extern void x_sync (struct frame *);
1255extern Lisp_Object x_get_focus_frame (struct frame *); 1242extern Lisp_Object x_get_focus_frame (struct frame *);
1256extern void x_set_mouse_position (struct frame *f, int h, int v); 1243extern void x_set_mouse_position (struct frame *f, int h, int v);
1257extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y); 1244extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y);
@@ -1277,13 +1264,24 @@ extern void x_wm_set_icon_position (struct frame *, int, int);
1277#if !defined USE_X_TOOLKIT 1264#if !defined USE_X_TOOLKIT
1278extern char *x_get_resource_string (const char *, const char *); 1265extern char *x_get_resource_string (const char *, const char *);
1279#endif 1266#endif
1280#endif 1267extern void x_sync (struct frame *);
1268#endif /* HAVE_X_WINDOWS */
1281 1269
1282extern void x_query_colors (struct frame *f, XColor *, int); 1270extern void x_query_colors (struct frame *f, XColor *, int);
1283extern void x_query_color (struct frame *f, XColor *); 1271extern void x_query_color (struct frame *f, XColor *);
1284 1272
1285#endif /* HAVE_WINDOW_SYSTEM */ 1273#endif /* HAVE_WINDOW_SYSTEM */
1286 1274
1275
1276FRAME_INLINE void
1277flush_frame (struct frame *f)
1278{
1279 struct redisplay_interface *rif = FRAME_RIF (f);
1280
1281 if (rif && rif->flush_display)
1282 rif->flush_display (f);
1283}
1284
1287/*********************************************************************** 1285/***********************************************************************
1288 Multimonitor data 1286 Multimonitor data
1289 ***********************************************************************/ 1287 ***********************************************************************/
diff --git a/src/gfilenotify.c b/src/gfilenotify.c
index 8f13c72df81..7415c3a2413 100644
--- a/src/gfilenotify.c
+++ b/src/gfilenotify.c
@@ -249,7 +249,9 @@ WATCH-DESCRIPTOR should be an object returned by `gfile-add-watch'. */)
249void 249void
250globals_of_gfilenotify (void) 250globals_of_gfilenotify (void)
251{ 251{
252#if ! GLIB_CHECK_VERSION (2, 36, 0)
252 g_type_init (); 253 g_type_init ();
254#endif
253 watch_list = Qnil; 255 watch_list = Qnil;
254} 256}
255 257
diff --git a/src/gtkutil.c b/src/gtkutil.c
index f03ca592834..6228f2150f5 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -872,29 +872,23 @@ xg_clear_under_internal_border (struct frame *f)
872 if (FRAME_INTERNAL_BORDER_WIDTH (f) > 0) 872 if (FRAME_INTERNAL_BORDER_WIDTH (f) > 0)
873 { 873 {
874 GtkWidget *wfixed = f->output_data.x->edit_widget; 874 GtkWidget *wfixed = f->output_data.x->edit_widget;
875
875 gtk_widget_queue_draw (wfixed); 876 gtk_widget_queue_draw (wfixed);
876 gdk_window_process_all_updates (); 877 gdk_window_process_all_updates ();
877 x_clear_area (FRAME_X_DISPLAY (f), 878
878 FRAME_X_WINDOW (f), 879 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 0, 0,
879 0, 0, 880 FRAME_PIXEL_WIDTH (f), FRAME_INTERNAL_BORDER_WIDTH (f));
880 FRAME_PIXEL_WIDTH (f), 881
881 FRAME_INTERNAL_BORDER_WIDTH (f), 0); 882 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 0, 0,
882 x_clear_area (FRAME_X_DISPLAY (f), 883 FRAME_INTERNAL_BORDER_WIDTH (f), FRAME_PIXEL_HEIGHT (f));
883 FRAME_X_WINDOW (f), 884
884 0, 0, 885 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 0,
885 FRAME_INTERNAL_BORDER_WIDTH (f), 886 FRAME_PIXEL_HEIGHT (f) - FRAME_INTERNAL_BORDER_WIDTH (f),
886 FRAME_PIXEL_HEIGHT (f), 0); 887 FRAME_PIXEL_WIDTH (f), FRAME_INTERNAL_BORDER_WIDTH (f));
887 x_clear_area (FRAME_X_DISPLAY (f), 888
888 FRAME_X_WINDOW (f), 889 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
889 0, FRAME_PIXEL_HEIGHT (f) - FRAME_INTERNAL_BORDER_WIDTH (f), 890 FRAME_PIXEL_WIDTH (f) - FRAME_INTERNAL_BORDER_WIDTH (f),
890 FRAME_PIXEL_WIDTH (f), 891 0, FRAME_INTERNAL_BORDER_WIDTH (f), FRAME_PIXEL_HEIGHT (f));
891 FRAME_INTERNAL_BORDER_WIDTH (f), 0);
892 x_clear_area (FRAME_X_DISPLAY (f),
893 FRAME_X_WINDOW (f),
894 FRAME_PIXEL_WIDTH (f) - FRAME_INTERNAL_BORDER_WIDTH (f),
895 0,
896 FRAME_INTERNAL_BORDER_WIDTH (f),
897 FRAME_PIXEL_HEIGHT (f), 0);
898 } 892 }
899} 893}
900 894
@@ -3751,14 +3745,11 @@ xg_update_scrollbar_pos (struct frame *f,
3751 gtk_widget_queue_draw (wfixed); 3745 gtk_widget_queue_draw (wfixed);
3752 gdk_window_process_all_updates (); 3746 gdk_window_process_all_updates ();
3753 if (oldx != -1 && oldw > 0 && oldh > 0) 3747 if (oldx != -1 && oldw > 0 && oldh > 0)
3754 { 3748 /* Clear under old scroll bar position. This must be done after
3755 /* Clear under old scroll bar position. This must be done after 3749 the gtk_widget_queue_draw and gdk_window_process_all_updates
3756 the gtk_widget_queue_draw and gdk_window_process_all_updates 3750 above. */
3757 above. */ 3751 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
3758 x_clear_area (FRAME_X_DISPLAY (f), 3752 oldx, oldy, oldw, oldh);
3759 FRAME_X_WINDOW (f),
3760 oldx, oldy, oldw, oldh, 0);
3761 }
3762 3753
3763 /* GTK does not redraw until the main loop is entered again, but 3754 /* GTK does not redraw until the main loop is entered again, but
3764 if there are no X events pending we will not enter it. So we sync 3755 if there are no X events pending we will not enter it. So we sync
@@ -3792,7 +3783,7 @@ xg_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar,
3792 3783
3793 struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); 3784 struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
3794 3785
3795 if (wscroll && NILP (bar->dragging)) 3786 if (wscroll && bar->dragging == -1)
3796 { 3787 {
3797 GtkAdjustment *adj; 3788 GtkAdjustment *adj;
3798 gdouble shown; 3789 gdouble shown;
diff --git a/src/gtkutil.h b/src/gtkutil.h
index 482331a8934..fc959862fd3 100644
--- a/src/gtkutil.h
+++ b/src/gtkutil.h
@@ -74,8 +74,6 @@ typedef struct xg_menu_item_cb_data_
74 74
75} xg_menu_item_cb_data; 75} xg_menu_item_cb_data;
76 76
77struct _widget_value;
78
79extern struct _widget_value *malloc_widget_value (void); 77extern struct _widget_value *malloc_widget_value (void);
80extern void free_widget_value (struct _widget_value *); 78extern void free_widget_value (struct _widget_value *);
81 79
diff --git a/src/image.c b/src/image.c
index bcc0fcd78a3..1271376bcab 100644
--- a/src/image.c
+++ b/src/image.c
@@ -30,13 +30,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
30#endif 30#endif
31 31
32#include <setjmp.h> 32#include <setjmp.h>
33
34#include <c-ctype.h> 33#include <c-ctype.h>
35 34
36/* This makes the fields of a Display accessible, in Xlib header files. */
37
38#define XLIB_ILLEGAL_ACCESS
39
40#include "lisp.h" 35#include "lisp.h"
41#include "frame.h" 36#include "frame.h"
42#include "window.h" 37#include "window.h"
diff --git a/src/indent.c b/src/indent.c
index 6aaf86579d7..891b42788ed 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -510,15 +510,10 @@ scan_for_column (ptrdiff_t *endpos, EMACS_INT *goalcol, ptrdiff_t *prevcol)
510 register ptrdiff_t col = 0, prev_col = 0; 510 register ptrdiff_t col = 0, prev_col = 0;
511 EMACS_INT goal = goalcol ? *goalcol : MOST_POSITIVE_FIXNUM; 511 EMACS_INT goal = goalcol ? *goalcol : MOST_POSITIVE_FIXNUM;
512 ptrdiff_t end = endpos ? *endpos : PT; 512 ptrdiff_t end = endpos ? *endpos : PT;
513 ptrdiff_t scan, scan_byte; 513 ptrdiff_t scan, scan_byte, next_boundary;
514 ptrdiff_t next_boundary; 514
515 { 515 scan = find_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, NULL, &scan_byte, 1);
516 ptrdiff_t opoint = PT, opoint_byte = PT_BYTE;
517 scan_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, 1);
518 scan = PT, scan_byte = PT_BYTE;
519 SET_PT_BOTH (opoint, opoint_byte);
520 next_boundary = scan; 516 next_boundary = scan;
521 }
522 517
523 window = Fget_buffer_window (Fcurrent_buffer (), Qnil); 518 window = Fget_buffer_window (Fcurrent_buffer (), Qnil);
524 w = ! NILP (window) ? XWINDOW (window) : NULL; 519 w = ! NILP (window) ? XWINDOW (window) : NULL;
@@ -835,14 +830,10 @@ This is the horizontal position of the character
835following any initial whitespace. */) 830following any initial whitespace. */)
836 (void) 831 (void)
837{ 832{
838 Lisp_Object val; 833 ptrdiff_t posbyte;
839 ptrdiff_t opoint = PT, opoint_byte = PT_BYTE;
840
841 scan_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, 1);
842 834
843 XSETFASTINT (val, position_indentation (PT_BYTE)); 835 find_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, NULL, &posbyte, 1);
844 SET_PT_BOTH (opoint, opoint_byte); 836 return make_number (position_indentation (posbyte));
845 return val;
846} 837}
847 838
848static ptrdiff_t 839static ptrdiff_t
@@ -935,16 +926,13 @@ position_indentation (ptrdiff_t pos_byte)
935bool 926bool
936indented_beyond_p (ptrdiff_t pos, ptrdiff_t pos_byte, EMACS_INT column) 927indented_beyond_p (ptrdiff_t pos, ptrdiff_t pos_byte, EMACS_INT column)
937{ 928{
938 ptrdiff_t val; 929 while (pos > BEGV && FETCH_BYTE (pos_byte) == '\n')
939 ptrdiff_t opoint = PT, opoint_byte = PT_BYTE; 930 {
940 931 DEC_BOTH (pos, pos_byte);
941 SET_PT_BOTH (pos, pos_byte); 932 pos = find_newline (pos, pos_byte, BEGV, BEGV_BYTE,
942 while (PT > BEGV && FETCH_BYTE (PT_BYTE) == '\n') 933 -1, NULL, &pos_byte, 0);
943 scan_newline (PT - 1, PT_BYTE - 1, BEGV, BEGV_BYTE, -1, 0); 934 }
944 935 return position_indentation (pos_byte) >= column;
945 val = position_indentation (PT_BYTE);
946 SET_PT_BOTH (opoint, opoint_byte);
947 return val >= column;
948} 936}
949 937
950DEFUN ("move-to-column", Fmove_to_column, Smove_to_column, 1, 2, 938DEFUN ("move-to-column", Fmove_to_column, Smove_to_column, 1, 2,
diff --git a/src/intervals.c b/src/intervals.c
index f2ddcd01507..ded536ca3c8 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -1821,6 +1821,18 @@ set_point (ptrdiff_t charpos)
1821 set_point_both (charpos, buf_charpos_to_bytepos (current_buffer, charpos)); 1821 set_point_both (charpos, buf_charpos_to_bytepos (current_buffer, charpos));
1822} 1822}
1823 1823
1824/* Set PT from MARKER's clipped position. */
1825
1826void
1827set_point_from_marker (Lisp_Object marker)
1828{
1829 if (XMARKER (marker)->buffer != current_buffer)
1830 signal_error ("Marker points into wrong buffer", marker);
1831 set_point_both
1832 (clip_to_bounds (BEGV, marker_position (marker), ZV),
1833 clip_to_bounds (BEGV_BYTE, marker_byte_position (marker), ZV_BYTE));
1834}
1835
1824/* If there's an invisible character at position POS + TEST_OFFS in the 1836/* If there's an invisible character at position POS + TEST_OFFS in the
1825 current buffer, and the invisible property has a `stickiness' such that 1837 current buffer, and the invisible property has a `stickiness' such that
1826 inserting a character at position POS would inherit the property it, 1838 inserting a character at position POS would inherit the property it,
diff --git a/src/keyboard.c b/src/keyboard.c
index a2f772dea8a..5996986bfb4 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -425,7 +425,9 @@ static Lisp_Object modify_event_symbol (ptrdiff_t, int, Lisp_Object,
425 Lisp_Object *, ptrdiff_t); 425 Lisp_Object *, ptrdiff_t);
426static Lisp_Object make_lispy_switch_frame (Lisp_Object); 426static Lisp_Object make_lispy_switch_frame (Lisp_Object);
427static Lisp_Object make_lispy_focus_in (Lisp_Object); 427static Lisp_Object make_lispy_focus_in (Lisp_Object);
428#ifdef HAVE_WINDOW_SYSTEM
428static Lisp_Object make_lispy_focus_out (Lisp_Object); 429static Lisp_Object make_lispy_focus_out (Lisp_Object);
430#endif /* HAVE_WINDOW_SYSTEM */
429static bool help_char_p (Lisp_Object); 431static bool help_char_p (Lisp_Object);
430static void save_getcjmp (sys_jmp_buf); 432static void save_getcjmp (sys_jmp_buf);
431static void restore_getcjmp (sys_jmp_buf); 433static void restore_getcjmp (sys_jmp_buf);
@@ -3213,6 +3215,8 @@ read_char (int commandflag, Lisp_Object map,
3213 RETURN_UNGCPRO (c); 3215 RETURN_UNGCPRO (c);
3214} 3216}
3215 3217
3218#ifdef HAVE_MENUS
3219
3216/* Record a key that came from a mouse menu. 3220/* Record a key that came from a mouse menu.
3217 Record it for echoing, for this-command-keys, and so on. */ 3221 Record it for echoing, for this-command-keys, and so on. */
3218 3222
@@ -3248,6 +3252,8 @@ record_menu_key (Lisp_Object c)
3248 num_input_events++; 3252 num_input_events++;
3249} 3253}
3250 3254
3255#endif /* HAVE_MENUS */
3256
3251/* Return true if should recognize C as "the help character". */ 3257/* Return true if should recognize C as "the help character". */
3252 3258
3253static bool 3259static bool
@@ -6095,12 +6101,17 @@ make_lispy_focus_in (Lisp_Object frame)
6095{ 6101{
6096 return list2 (Qfocus_in, frame); 6102 return list2 (Qfocus_in, frame);
6097} 6103}
6104
6105#ifdef HAVE_WINDOW_SYSTEM
6106
6098static Lisp_Object 6107static Lisp_Object
6099make_lispy_focus_out (Lisp_Object frame) 6108make_lispy_focus_out (Lisp_Object frame)
6100{ 6109{
6101 return list2 (Qfocus_out, frame); 6110 return list2 (Qfocus_out, frame);
6102} 6111}
6103 6112
6113#endif /* HAVE_WINDOW_SYSTEM */
6114
6104/* Manipulating modifiers. */ 6115/* Manipulating modifiers. */
6105 6116
6106/* Parse the name of SYMBOL, and return the set of modifiers it contains. 6117/* Parse the name of SYMBOL, and return the set of modifiers it contains.
@@ -9738,54 +9749,11 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
9738 return t; 9749 return t;
9739} 9750}
9740 9751
9741DEFUN ("read-key-sequence", Fread_key_sequence, Sread_key_sequence, 1, 5, 0, 9752static Lisp_Object
9742 doc: /* Read a sequence of keystrokes and return as a string or vector. 9753read_key_sequence_vs (Lisp_Object prompt, Lisp_Object continue_echo,
9743The sequence is sufficient to specify a non-prefix command in the 9754 Lisp_Object dont_downcase_last,
9744current local and global maps. 9755 Lisp_Object can_return_switch_frame,
9745 9756 Lisp_Object cmd_loop, bool allow_string)
9746First arg PROMPT is a prompt string. If nil, do not prompt specially.
9747Second (optional) arg CONTINUE-ECHO, if non-nil, means this key echos
9748as a continuation of the previous key.
9749
9750The third (optional) arg DONT-DOWNCASE-LAST, if non-nil, means do not
9751convert the last event to lower case. (Normally any upper case event
9752is converted to lower case if the original event is undefined and the lower
9753case equivalent is defined.) A non-nil value is appropriate for reading
9754a key sequence to be defined.
9755
9756A C-g typed while in this function is treated like any other character,
9757and `quit-flag' is not set.
9758
9759If the key sequence starts with a mouse click, then the sequence is read
9760using the keymaps of the buffer of the window clicked in, not the buffer
9761of the selected window as normal.
9762
9763`read-key-sequence' drops unbound button-down events, since you normally
9764only care about the click or drag events which follow them. If a drag
9765or multi-click event is unbound, but the corresponding click event would
9766be bound, `read-key-sequence' turns the event into a click event at the
9767drag's starting position. This means that you don't have to distinguish
9768between click and drag, double, or triple events unless you want to.
9769
9770`read-key-sequence' prefixes mouse events on mode lines, the vertical
9771lines separating windows, and scroll bars with imaginary keys
9772`mode-line', `vertical-line', and `vertical-scroll-bar'.
9773
9774Optional fourth argument CAN-RETURN-SWITCH-FRAME non-nil means that this
9775function will process a switch-frame event if the user switches frames
9776before typing anything. If the user switches frames in the middle of a
9777key sequence, or at the start of the sequence but CAN-RETURN-SWITCH-FRAME
9778is nil, then the event will be put off until after the current key sequence.
9779
9780`read-key-sequence' checks `function-key-map' for function key
9781sequences, where they wouldn't conflict with ordinary bindings. See
9782`function-key-map' for more details.
9783
9784The optional fifth argument CMD-LOOP, if non-nil, means
9785that this key sequence is being read by something that will
9786read commands one after another. It should be nil if the caller
9787will read just one key sequence. */)
9788 (Lisp_Object prompt, Lisp_Object continue_echo, Lisp_Object dont_downcase_last, Lisp_Object can_return_switch_frame, Lisp_Object cmd_loop)
9789{ 9757{
9790 Lisp_Object keybuf[30]; 9758 Lisp_Object keybuf[30];
9791 register int i; 9759 register int i;
@@ -9836,60 +9804,71 @@ will read just one key sequence. */)
9836 QUIT; 9804 QUIT;
9837 } 9805 }
9838 UNGCPRO; 9806 UNGCPRO;
9839 return unbind_to (count, make_event_array (i, keybuf)); 9807 return unbind_to (count,
9808 ((allow_string ? make_event_array : Fvector)
9809 (i, keybuf)));
9840} 9810}
9841 9811
9842DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector, 9812DEFUN ("read-key-sequence", Fread_key_sequence, Sread_key_sequence, 1, 5, 0,
9843 Sread_key_sequence_vector, 1, 5, 0, 9813 doc: /* Read a sequence of keystrokes and return as a string or vector.
9844 doc: /* Like `read-key-sequence' but always return a vector. */) 9814The sequence is sufficient to specify a non-prefix command in the
9845 (Lisp_Object prompt, Lisp_Object continue_echo, Lisp_Object dont_downcase_last, Lisp_Object can_return_switch_frame, Lisp_Object cmd_loop) 9815current local and global maps.
9846{
9847 Lisp_Object keybuf[30];
9848 register int i;
9849 struct gcpro gcpro1;
9850 ptrdiff_t count = SPECPDL_INDEX ();
9851 9816
9852 if (!NILP (prompt)) 9817First arg PROMPT is a prompt string. If nil, do not prompt specially.
9853 CHECK_STRING (prompt); 9818Second (optional) arg CONTINUE-ECHO, if non-nil, means this key echos
9854 QUIT; 9819as a continuation of the previous key.
9855 9820
9856 specbind (Qinput_method_exit_on_first_char, 9821The third (optional) arg DONT-DOWNCASE-LAST, if non-nil, means do not
9857 (NILP (cmd_loop) ? Qt : Qnil)); 9822convert the last event to lower case. (Normally any upper case event
9858 specbind (Qinput_method_use_echo_area, 9823is converted to lower case if the original event is undefined and the lower
9859 (NILP (cmd_loop) ? Qt : Qnil)); 9824case equivalent is defined.) A non-nil value is appropriate for reading
9825a key sequence to be defined.
9860 9826
9861 memset (keybuf, 0, sizeof keybuf); 9827A C-g typed while in this function is treated like any other character,
9862 GCPRO1 (keybuf[0]); 9828and `quit-flag' is not set.
9863 gcpro1.nvars = (sizeof keybuf / sizeof (keybuf[0]));
9864 9829
9865 if (NILP (continue_echo)) 9830If the key sequence starts with a mouse click, then the sequence is read
9866 { 9831using the keymaps of the buffer of the window clicked in, not the buffer
9867 this_command_key_count = 0; 9832of the selected window as normal.
9868 this_command_key_count_reset = 0;
9869 this_single_command_key_start = 0;
9870 }
9871 9833
9872#ifdef HAVE_WINDOW_SYSTEM 9834`read-key-sequence' drops unbound button-down events, since you normally
9873 if (display_hourglass_p) 9835only care about the click or drag events which follow them. If a drag
9874 cancel_hourglass (); 9836or multi-click event is unbound, but the corresponding click event would
9875#endif 9837be bound, `read-key-sequence' turns the event into a click event at the
9838drag's starting position. This means that you don't have to distinguish
9839between click and drag, double, or triple events unless you want to.
9876 9840
9877 i = read_key_sequence (keybuf, (sizeof keybuf / sizeof (keybuf[0])), 9841`read-key-sequence' prefixes mouse events on mode lines, the vertical
9878 prompt, ! NILP (dont_downcase_last), 9842lines separating windows, and scroll bars with imaginary keys
9879 ! NILP (can_return_switch_frame), 0); 9843`mode-line', `vertical-line', and `vertical-scroll-bar'.
9880 9844
9881#ifdef HAVE_WINDOW_SYSTEM 9845Optional fourth argument CAN-RETURN-SWITCH-FRAME non-nil means that this
9882 if (display_hourglass_p) 9846function will process a switch-frame event if the user switches frames
9883 start_hourglass (); 9847before typing anything. If the user switches frames in the middle of a
9884#endif 9848key sequence, or at the start of the sequence but CAN-RETURN-SWITCH-FRAME
9849is nil, then the event will be put off until after the current key sequence.
9885 9850
9886 if (i == -1) 9851`read-key-sequence' checks `function-key-map' for function key
9887 { 9852sequences, where they wouldn't conflict with ordinary bindings. See
9888 Vquit_flag = Qt; 9853`function-key-map' for more details.
9889 QUIT; 9854
9890 } 9855The optional fifth argument CMD-LOOP, if non-nil, means
9891 UNGCPRO; 9856that this key sequence is being read by something that will
9892 return unbind_to (count, Fvector (i, keybuf)); 9857read commands one after another. It should be nil if the caller
9858will read just one key sequence. */)
9859 (Lisp_Object prompt, Lisp_Object continue_echo, Lisp_Object dont_downcase_last, Lisp_Object can_return_switch_frame, Lisp_Object cmd_loop)
9860{
9861 return read_key_sequence_vs (prompt, continue_echo, dont_downcase_last,
9862 can_return_switch_frame, cmd_loop, true);
9863}
9864
9865DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector,
9866 Sread_key_sequence_vector, 1, 5, 0,
9867 doc: /* Like `read-key-sequence' but always return a vector. */)
9868 (Lisp_Object prompt, Lisp_Object continue_echo, Lisp_Object dont_downcase_last, Lisp_Object can_return_switch_frame, Lisp_Object cmd_loop)
9869{
9870 return read_key_sequence_vs (prompt, continue_echo, dont_downcase_last,
9871 can_return_switch_frame, cmd_loop, false);
9893} 9872}
9894 9873
9895/* Return true if input events are pending. */ 9874/* Return true if input events are pending. */
@@ -9920,20 +9899,7 @@ detect_input_pending_run_timers (bool do_display)
9920 get_input_pending (READABLE_EVENTS_DO_TIMERS_NOW); 9899 get_input_pending (READABLE_EVENTS_DO_TIMERS_NOW);
9921 9900
9922 if (old_timers_run != timers_run && do_display) 9901 if (old_timers_run != timers_run && do_display)
9923 { 9902 redisplay_preserve_echo_area (8);
9924 redisplay_preserve_echo_area (8);
9925 /* The following fixes a bug when using lazy-lock with
9926 lazy-lock-defer-on-the-fly set to t, i.e. when fontifying
9927 from an idle timer function. The symptom of the bug is that
9928 the cursor sometimes doesn't become visible until the next X
9929 event is processed. --gerd. */
9930 {
9931 Lisp_Object tail, frame;
9932 FOR_EACH_FRAME (tail, frame)
9933 if (FRAME_RIF (XFRAME (frame)))
9934 FRAME_RIF (XFRAME (frame))->flush_display (XFRAME (frame));
9935 }
9936 }
9937 9903
9938 return input_pending; 9904 return input_pending;
9939} 9905}
diff --git a/src/keyboard.h b/src/keyboard.h
index 0953f1b7cfd..1ee4a97c5c5 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -19,6 +19,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19 19
20#include "systime.h" /* for struct timespec, Time */ 20#include "systime.h" /* for struct timespec, Time */
21#include "coding.h" /* for ENCODE_UTF_8 and ENCODE_SYSTEM */ 21#include "coding.h" /* for ENCODE_UTF_8 and ENCODE_SYSTEM */
22#include "termhooks.h"
22 23
23INLINE_HEADER_BEGIN 24INLINE_HEADER_BEGIN
24#ifndef KEYBOARD_INLINE 25#ifndef KEYBOARD_INLINE
@@ -477,9 +478,6 @@ extern bool ignore_mouse_drag_p;
477/* The primary selection. */ 478/* The primary selection. */
478extern Lisp_Object QPRIMARY; 479extern Lisp_Object QPRIMARY;
479 480
480/* Forward declaration for prototypes. */
481struct input_event;
482
483extern Lisp_Object parse_modifiers (Lisp_Object); 481extern Lisp_Object parse_modifiers (Lisp_Object);
484extern Lisp_Object reorder_modifiers (Lisp_Object); 482extern Lisp_Object reorder_modifiers (Lisp_Object);
485extern Lisp_Object read_char (int, Lisp_Object, Lisp_Object, 483extern Lisp_Object read_char (int, Lisp_Object, Lisp_Object,
diff --git a/src/lisp.h b/src/lisp.h
index ef5e54d8cb6..dce1b17146b 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -871,11 +871,7 @@ make_lisp_proc (struct Lisp_Process *p)
871#define XSETSTRING(a, b) ((a) = make_lisp_ptr (b, Lisp_String)) 871#define XSETSTRING(a, b) ((a) = make_lisp_ptr (b, Lisp_String))
872#define XSETSYMBOL(a, b) ((a) = make_lisp_ptr (b, Lisp_Symbol)) 872#define XSETSYMBOL(a, b) ((a) = make_lisp_ptr (b, Lisp_Symbol))
873#define XSETFLOAT(a, b) ((a) = make_lisp_ptr (b, Lisp_Float)) 873#define XSETFLOAT(a, b) ((a) = make_lisp_ptr (b, Lisp_Float))
874
875/* Misc types. */
876
877#define XSETMISC(a, b) ((a) = make_lisp_ptr (b, Lisp_Misc)) 874#define XSETMISC(a, b) ((a) = make_lisp_ptr (b, Lisp_Misc))
878#define XSETMARKER(a, b) (XSETMISC (a, b), XMISCTYPE (a) = Lisp_Misc_Marker)
879 875
880/* Pseudovector types. */ 876/* Pseudovector types. */
881 877
@@ -2639,19 +2635,6 @@ typedef jmp_buf sys_jmp_buf;
2639 they are bound by a function application or a let form, stores the 2635 they are bound by a function application or a let form, stores the
2640 code to be executed for unwind-protect forms. 2636 code to be executed for unwind-protect forms.
2641 2637
2642 If func is non-zero, undoing this binding applies func to old_value;
2643 This implements record_unwind_protect.
2644
2645 Otherwise, the element is a variable binding.
2646
2647 If the symbol field is a symbol, it is an ordinary variable binding.
2648
2649 Otherwise, it should be a structure (SYMBOL WHERE . CURRENT-BUFFER),
2650 which means having bound a local value while CURRENT-BUFFER was active.
2651 If WHERE is nil this means we saw the default value when binding SYMBOL.
2652 WHERE being a buffer or frame means we saw a buffer-local or frame-local
2653 value. Other values of WHERE mean an internal error.
2654
2655 NOTE: The specbinding union is defined here, because SPECPDL_INDEX is 2638 NOTE: The specbinding union is defined here, because SPECPDL_INDEX is
2656 used all over the place, needs to be fast, and needs to know the size of 2639 used all over the place, needs to be fast, and needs to know the size of
2657 union specbinding. But only eval.c should access it. */ 2640 union specbinding. But only eval.c should access it. */
@@ -3381,9 +3364,6 @@ extern Lisp_Object Qglyphless_char;
3381extern Lisp_Object QCdata, QCfile; 3364extern Lisp_Object QCdata, QCfile;
3382extern Lisp_Object QCmap; 3365extern Lisp_Object QCmap;
3383extern Lisp_Object Qrisky_local_variable; 3366extern Lisp_Object Qrisky_local_variable;
3384extern struct frame *last_glyphless_glyph_frame;
3385extern int last_glyphless_glyph_face_id;
3386extern int last_glyphless_glyph_merged_face_id;
3387extern int noninteractive_need_newline; 3367extern int noninteractive_need_newline;
3388extern Lisp_Object echo_area_buffer[2]; 3368extern Lisp_Object echo_area_buffer[2];
3389extern void add_to_log (const char *, Lisp_Object, Lisp_Object); 3369extern void add_to_log (const char *, Lisp_Object, Lisp_Object);
@@ -3485,7 +3465,7 @@ build_unibyte_string (const char *str)
3485} 3465}
3486 3466
3487extern Lisp_Object make_multibyte_string (const char *, ptrdiff_t, ptrdiff_t); 3467extern Lisp_Object make_multibyte_string (const char *, ptrdiff_t, ptrdiff_t);
3488extern Lisp_Object make_event_array (int, Lisp_Object *); 3468extern Lisp_Object make_event_array (ptrdiff_t, Lisp_Object *);
3489extern Lisp_Object make_uninit_string (EMACS_INT); 3469extern Lisp_Object make_uninit_string (EMACS_INT);
3490extern Lisp_Object make_uninit_multibyte_string (EMACS_INT, EMACS_INT); 3470extern Lisp_Object make_uninit_multibyte_string (EMACS_INT, EMACS_INT);
3491extern Lisp_Object make_string_from_bytes (const char *, ptrdiff_t, ptrdiff_t); 3471extern Lisp_Object make_string_from_bytes (const char *, ptrdiff_t, ptrdiff_t);
@@ -3839,8 +3819,8 @@ extern ptrdiff_t fast_looking_at (Lisp_Object, ptrdiff_t, ptrdiff_t,
3839 ptrdiff_t, ptrdiff_t, Lisp_Object); 3819 ptrdiff_t, ptrdiff_t, Lisp_Object);
3840extern ptrdiff_t find_newline (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t, 3820extern ptrdiff_t find_newline (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t,
3841 ptrdiff_t, ptrdiff_t *, ptrdiff_t *, bool); 3821 ptrdiff_t, ptrdiff_t *, ptrdiff_t *, bool);
3842extern EMACS_INT scan_newline (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t, 3822extern ptrdiff_t scan_newline (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t,
3843 EMACS_INT, bool); 3823 ptrdiff_t, bool);
3844extern ptrdiff_t find_newline_no_quit (ptrdiff_t, ptrdiff_t, 3824extern ptrdiff_t find_newline_no_quit (ptrdiff_t, ptrdiff_t,
3845 ptrdiff_t, ptrdiff_t *); 3825 ptrdiff_t, ptrdiff_t *);
3846extern ptrdiff_t find_before_next_newline (ptrdiff_t, ptrdiff_t, 3826extern ptrdiff_t find_before_next_newline (ptrdiff_t, ptrdiff_t,
diff --git a/src/minibuf.c b/src/minibuf.c
index 7403fc6c32d..cc6f234f7da 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -672,12 +672,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
672 XWINDOW (minibuf_window)->cursor.x = 0; 672 XWINDOW (minibuf_window)->cursor.x = 0;
673 XWINDOW (minibuf_window)->must_be_updated_p = 1; 673 XWINDOW (minibuf_window)->must_be_updated_p = 1;
674 update_frame (XFRAME (selected_frame), 1, 1); 674 update_frame (XFRAME (selected_frame), 1, 1);
675 { 675 flush_frame (XFRAME (XWINDOW (minibuf_window)->frame));
676 struct frame *f = XFRAME (XWINDOW (minibuf_window)->frame);
677 struct redisplay_interface *rif = FRAME_RIF (f);
678 if (rif && rif->flush_display)
679 rif->flush_display (f);
680 }
681 } 676 }
682 677
683 /* Make minibuffer contents into a string. */ 678 /* Make minibuffer contents into a string. */
diff --git a/src/msdos.c b/src/msdos.c
index 3c78efbc47b..7142c3ada77 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -946,9 +946,6 @@ IT_write_glyphs (struct frame *f, struct glyph *str, int str_len)
946 Mouse Highlight (and friends..) 946 Mouse Highlight (and friends..)
947 ************************************************************************/ 947 ************************************************************************/
948 948
949/* Last window where we saw the mouse. Used by mouse-autoselect-window. */
950static Lisp_Object last_mouse_window;
951
952static int mouse_preempted = 0; /* non-zero when XMenu gobbles mouse events */ 949static int mouse_preempted = 0; /* non-zero when XMenu gobbles mouse events */
953 950
954int 951int
@@ -1546,11 +1543,6 @@ IT_reset_terminal_modes (struct terminal *term)
1546 term_setup_done = 0; 1543 term_setup_done = 0;
1547} 1544}
1548 1545
1549static void
1550IT_set_terminal_window (struct frame *f, int foo)
1551{
1552}
1553
1554/* Remember the screen colors of the current frame, to serve as the 1546/* Remember the screen colors of the current frame, to serve as the
1555 default colors for newly-created frames. */ 1547 default colors for newly-created frames. */
1556DEFUN ("msdos-remember-default-colors", Fmsdos_remember_default_colors, 1548DEFUN ("msdos-remember-default-colors", Fmsdos_remember_default_colors,
@@ -1871,7 +1863,7 @@ initialize_msdos_display (struct terminal *term)
1871 term->ring_bell_hook = IT_ring_bell; 1863 term->ring_bell_hook = IT_ring_bell;
1872 term->reset_terminal_modes_hook = IT_reset_terminal_modes; 1864 term->reset_terminal_modes_hook = IT_reset_terminal_modes;
1873 term->set_terminal_modes_hook = IT_set_terminal_modes; 1865 term->set_terminal_modes_hook = IT_set_terminal_modes;
1874 term->set_terminal_window_hook = IT_set_terminal_window; 1866 term->set_terminal_window_hook = NULL;
1875 term->update_begin_hook = IT_update_begin; 1867 term->update_begin_hook = IT_update_begin;
1876 term->update_end_hook = IT_update_end; 1868 term->update_end_hook = IT_update_end;
1877 term->frame_up_to_date_hook = IT_frame_up_to_date; 1869 term->frame_up_to_date_hook = IT_frame_up_to_date;
@@ -2673,10 +2665,10 @@ dos_rawgetc (void)
2673 /* Generate SELECT_WINDOW_EVENTs when needed. */ 2665 /* Generate SELECT_WINDOW_EVENTs when needed. */
2674 if (!NILP (Vmouse_autoselect_window)) 2666 if (!NILP (Vmouse_autoselect_window))
2675 { 2667 {
2676 mouse_window = window_from_coordinates (SELECTED_FRAME (), 2668 static Lisp_Object last_mouse_window;
2677 mouse_last_x, 2669
2678 mouse_last_y, 2670 mouse_window = window_from_coordinates
2679 0, 0); 2671 (SELECTED_FRAME (), mouse_last_x, mouse_last_y, 0, 0);
2680 /* A window will be selected only when it is not 2672 /* A window will be selected only when it is not
2681 selected now, and the last mouse movement event was 2673 selected now, and the last mouse movement event was
2682 not in it. A minibuffer window will be selected iff 2674 not in it. A minibuffer window will be selected iff
@@ -2691,10 +2683,9 @@ dos_rawgetc (void)
2691 event.timestamp = event_timestamp (); 2683 event.timestamp = event_timestamp ();
2692 kbd_buffer_store_event (&event); 2684 kbd_buffer_store_event (&event);
2693 } 2685 }
2686 /* Remember the last window where we saw the mouse. */
2694 last_mouse_window = mouse_window; 2687 last_mouse_window = mouse_window;
2695 } 2688 }
2696 else
2697 last_mouse_window = Qnil;
2698 2689
2699 previous_help_echo_string = help_echo_string; 2690 previous_help_echo_string = help_echo_string;
2700 help_echo_string = help_echo_object = help_echo_window = Qnil; 2691 help_echo_string = help_echo_object = help_echo_window = Qnil;
diff --git a/src/nsfns.m b/src/nsfns.m
index fc276c2b12d..f021e834d59 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -2231,15 +2231,6 @@ x_get_focus_frame (struct frame *frame)
2231 return nsfocus; 2231 return nsfocus;
2232} 2232}
2233 2233
2234void
2235x_sync (struct frame *f)
2236{
2237 /* XXX Not implemented XXX */
2238 return;
2239}
2240
2241
2242
2243/* ========================================================================== 2234/* ==========================================================================
2244 2235
2245 Lisp definitions that, for whatever reason, we can't alias as 'ns-XXX'. 2236 Lisp definitions that, for whatever reason, we can't alias as 'ns-XXX'.
diff --git a/src/nsfont.m b/src/nsfont.m
index 235150e3aef..e1c7d32dde0 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -61,6 +61,7 @@ static void ns_uni_to_glyphs (struct nsfont_info *font_info,
61static void ns_glyph_metrics (struct nsfont_info *font_info, 61static void ns_glyph_metrics (struct nsfont_info *font_info,
62 unsigned char block); 62 unsigned char block);
63 63
64#define INVALID_GLYPH 0xFFFF
64 65
65/* ========================================================================== 66/* ==========================================================================
66 67
@@ -981,7 +982,7 @@ nsfont_encode_char (struct font *font, int c)
981 ns_uni_to_glyphs (font_info, high); 982 ns_uni_to_glyphs (font_info, high);
982 983
983 g = font_info->glyphs[high][low]; 984 g = font_info->glyphs[high][low];
984 return g == 0xFFFF ? FONT_INVALID_CODE : g; 985 return g == INVALID_GLYPH ? FONT_INVALID_CODE : g;
985} 986}
986 987
987 988
@@ -1354,8 +1355,8 @@ ns_uni_to_glyphs (struct nsfont_info *font_info, unsigned char block)
1354#else 1355#else
1355 g = glyphStorage->cglyphs[i]; 1356 g = glyphStorage->cglyphs[i];
1356 /* TODO: is this a good check? maybe need to use coveredChars.. */ 1357 /* TODO: is this a good check? maybe need to use coveredChars.. */
1357 if (g > numGlyphs) 1358 if (g > numGlyphs || g == NSNullGlyph)
1358 g = 0xFFFF; /* hopefully unused... */ 1359 g = INVALID_GLYPH; /* hopefully unused... */
1359#endif 1360#endif
1360 *glyphs = g; 1361 *glyphs = g;
1361 } 1362 }
@@ -1483,7 +1484,7 @@ ns_glyph_metrics (struct nsfont_info *font_info, unsigned char block)
1483 characterIndex: (NSUInteger)charIndex 1484 characterIndex: (NSUInteger)charIndex
1484{ 1485{
1485 len = glyphIndex+length; 1486 len = glyphIndex+length;
1486 for (i =glyphIndex; i<len; i++) 1487 for (i =glyphIndex; i<len; i++)
1487 cglyphs[i] = glyphs[i-glyphIndex]; 1488 cglyphs[i] = glyphs[i-glyphIndex];
1488 if (len > maxGlyph) 1489 if (len > maxGlyph)
1489 maxGlyph = len; 1490 maxGlyph = len;
diff --git a/src/nsterm.m b/src/nsterm.m
index ec365df0c22..38d76e9389c 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -308,8 +308,13 @@ static CGPoint menu_mouse_point;
308/* This is a piece of code which is common to all the event handling 308/* This is a piece of code which is common to all the event handling
309 methods. Maybe it should even be a function. */ 309 methods. Maybe it should even be a function. */
310#define EV_TRAILER(e) \ 310#define EV_TRAILER(e) \
311 { \ 311 { \
312 XSETFRAME (emacs_event->frame_or_window, emacsframe); \ 312 XSETFRAME (emacs_event->frame_or_window, emacsframe); \
313 EV_TRAILER2 (e); \
314 }
315
316#define EV_TRAILER2(e) \
317 { \
313 if (e) emacs_event->timestamp = EV_TIMESTAMP (e); \ 318 if (e) emacs_event->timestamp = EV_TIMESTAMP (e); \
314 if (q_event_ptr) \ 319 if (q_event_ptr) \
315 { \ 320 { \
@@ -720,7 +725,7 @@ ns_update_window_begin (struct window *w)
720 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); 725 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
721 726
722 NSTRACE (ns_update_window_begin); 727 NSTRACE (ns_update_window_begin);
723 set_output_cursor (&w->cursor); 728 w->output_cursor = w->cursor;
724 729
725 block_input (); 730 block_input ();
726 731
@@ -756,8 +761,8 @@ ns_update_window_end (struct window *w, bool cursor_on_p,
756 761
757 if (cursor_on_p) 762 if (cursor_on_p)
758 display_and_set_cursor (w, 1, 763 display_and_set_cursor (w, 1,
759 output_cursor.hpos, output_cursor.vpos, 764 w->output_cursor.hpos, w->output_cursor.vpos,
760 output_cursor.x, output_cursor.y); 765 w->output_cursor.x, w->output_cursor.y);
761 766
762 if (draw_window_fringes (w, 1)) 767 if (draw_window_fringes (w, 1))
763 x_draw_vertical_border (w); 768 x_draw_vertical_border (w);
@@ -796,18 +801,6 @@ ns_update_end (struct frame *f)
796 NSTRACE (ns_update_end); 801 NSTRACE (ns_update_end);
797} 802}
798 803
799
800static void
801ns_flush (struct frame *f)
802/* --------------------------------------------------------------------------
803 external (RIF) call
804 NS impl is no-op since currently we flush in ns_update_end and elsewhere
805 -------------------------------------------------------------------------- */
806{
807 NSTRACE (ns_flush);
808}
809
810
811static void 804static void
812ns_focus (struct frame *f, NSRect *r, int n) 805ns_focus (struct frame *f, NSRect *r, int n)
813/* -------------------------------------------------------------------------- 806/* --------------------------------------------------------------------------
@@ -885,7 +878,8 @@ ns_unfocus (struct frame *f)
885 878
886 879
887static void 880static void
888ns_clip_to_row (struct window *w, struct glyph_row *row, int area, BOOL gc) 881ns_clip_to_row (struct window *w, struct glyph_row *row,
882 enum glyph_row_area area, BOOL gc)
889/* -------------------------------------------------------------------------- 883/* --------------------------------------------------------------------------
890 Internal (but parallels other terms): Focus drawing on given row 884 Internal (but parallels other terms): Focus drawing on given row
891 -------------------------------------------------------------------------- */ 885 -------------------------------------------------------------------------- */
@@ -954,24 +948,6 @@ ns_ring_bell (struct frame *f)
954 } 948 }
955} 949}
956 950
957
958static void
959ns_reset_terminal_modes (struct terminal *terminal)
960/* Externally called as hook */
961{
962 NSTRACE (ns_reset_terminal_modes);
963}
964
965
966static void
967ns_set_terminal_modes (struct terminal *terminal)
968/* Externally called as hook */
969{
970 NSTRACE (ns_set_terminal_modes);
971}
972
973
974
975/* ========================================================================== 951/* ==========================================================================
976 952
977 Frame / window manager related functions 953 Frame / window manager related functions
@@ -1989,9 +1965,6 @@ ns_clear_frame (struct frame *f)
1989 1965
1990 mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f))); 1966 mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f)));
1991 1967
1992 output_cursor.hpos = output_cursor.vpos = 0;
1993 output_cursor.x = -1;
1994
1995 r = [view bounds]; 1968 r = [view bounds];
1996 1969
1997 block_input (); 1970 block_input ();
@@ -2047,7 +2020,7 @@ ns_scroll_run (struct window *w, struct run *run)
2047 /* Get frame-relative bounding box of the text display area of W, 2020 /* Get frame-relative bounding box of the text display area of W,
2048 without mode lines. Include in this box the left and right 2021 without mode lines. Include in this box the left and right
2049 fringe of W. */ 2022 fringe of W. */
2050 window_box (w, -1, &x, &y, &width, &height); 2023 window_box (w, ANY_AREA, &x, &y, &width, &height);
2051 2024
2052 from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y); 2025 from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y);
2053 to_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->desired_y); 2026 to_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->desired_y);
@@ -2222,7 +2195,7 @@ ns_draw_fringe_bitmap (struct window *w, struct glyph_row *row,
2222 } 2195 }
2223 2196
2224 /* Must clip because of partially visible lines. */ 2197 /* Must clip because of partially visible lines. */
2225 ns_clip_to_row (w, row, -1, YES); 2198 ns_clip_to_row (w, row, ANY_AREA, YES);
2226 2199
2227 if (!p->overlay_p) 2200 if (!p->overlay_p)
2228 { 2201 {
@@ -2402,7 +2375,7 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
2402 2375
2403 /* TODO: only needed in rare cases with last-resort font in HELLO.. 2376 /* TODO: only needed in rare cases with last-resort font in HELLO..
2404 should we do this more efficiently? */ 2377 should we do this more efficiently? */
2405 ns_clip_to_row (w, glyph_row, -1, NO); /* do ns_focus(f, &r, 1); if remove */ 2378 ns_clip_to_row (w, glyph_row, ANY_AREA, NO); /* do ns_focus(f, &r, 1); if remove */
2406 2379
2407 2380
2408 face = FACE_FROM_ID (f, phys_cursor_glyph->face_id); 2381 face = FACE_FROM_ID (f, phys_cursor_glyph->face_id);
@@ -3713,7 +3686,7 @@ ns_set_vertical_scroll_bar (struct window *window,
3713 NSTRACE (ns_set_vertical_scroll_bar); 3686 NSTRACE (ns_set_vertical_scroll_bar);
3714 3687
3715 /* Get dimensions. */ 3688 /* Get dimensions. */
3716 window_box (window, -1, 0, &window_y, 0, &window_height); 3689 window_box (window, ANY_AREA, 0, &window_y, 0, &window_height);
3717 top = window_y; 3690 top = window_y;
3718 height = window_height; 3691 height = window_height;
3719 width = WINDOW_CONFIG_SCROLL_BAR_COLS (window) * FRAME_COLUMN_WIDTH (f); 3692 width = WINDOW_CONFIG_SCROLL_BAR_COLS (window) * FRAME_COLUMN_WIDTH (f);
@@ -3978,9 +3951,7 @@ static struct redisplay_interface ns_redisplay_interface =
3978 ns_after_update_window_line, 3951 ns_after_update_window_line,
3979 ns_update_window_begin, 3952 ns_update_window_begin,
3980 ns_update_window_end, 3953 ns_update_window_end,
3981 x_cursor_to, 3954 0, /* flush_display */
3982 ns_flush,
3983 0, /* flush_display_optional */
3984 x_clear_window_mouse_face, 3955 x_clear_window_mouse_face,
3985 x_get_glyph_overhangs, 3956 x_get_glyph_overhangs,
3986 x_fix_overlapping_area, 3957 x_fix_overlapping_area,
@@ -4045,8 +4016,8 @@ ns_create_terminal (struct ns_display_info *dpyinfo)
4045 terminal->ins_del_lines_hook = 0; /* XXX vestigial? */ 4016 terminal->ins_del_lines_hook = 0; /* XXX vestigial? */
4046 terminal->delete_glyphs_hook = 0; /* XXX vestigial? */ 4017 terminal->delete_glyphs_hook = 0; /* XXX vestigial? */
4047 terminal->ring_bell_hook = ns_ring_bell; 4018 terminal->ring_bell_hook = ns_ring_bell;
4048 terminal->reset_terminal_modes_hook = ns_reset_terminal_modes; 4019 terminal->reset_terminal_modes_hook = NULL;
4049 terminal->set_terminal_modes_hook = ns_set_terminal_modes; 4020 terminal->set_terminal_modes_hook = NULL;
4050 terminal->update_begin_hook = ns_update_begin; 4021 terminal->update_begin_hook = ns_update_begin;
4051 terminal->update_end_hook = ns_update_end; 4022 terminal->update_end_hook = ns_update_end;
4052 terminal->set_terminal_window_hook = NULL; /* XXX vestigial? */ 4023 terminal->set_terminal_window_hook = NULL; /* XXX vestigial? */
@@ -4686,7 +4657,7 @@ not_in_argv (NSString *arg)
4686 int waiting = 1, nfds; 4657 int waiting = 1, nfds;
4687 char c; 4658 char c;
4688 4659
4689 SELECT_TYPE readfds, writefds, *wfds; 4660 fd_set readfds, writefds, *wfds;
4690 struct timespec timeout, *tmo; 4661 struct timespec timeout, *tmo;
4691 NSAutoreleasePool *pool = nil; 4662 NSAutoreleasePool *pool = nil;
4692 4663
@@ -4699,7 +4670,7 @@ not_in_argv (NSString *arg)
4699 4670
4700 if (waiting) 4671 if (waiting)
4701 { 4672 {
4702 SELECT_TYPE fds; 4673 fd_set fds;
4703 FD_ZERO (&fds); 4674 FD_ZERO (&fds);
4704 FD_SET (selfds[0], &fds); 4675 FD_SET (selfds[0], &fds);
4705 result = select (selfds[0]+1, &fds, NULL, NULL, NULL); 4676 result = select (selfds[0]+1, &fds, NULL, NULL, NULL);
@@ -5468,6 +5439,30 @@ not_in_argv (NSString *arg)
5468 previous_help_echo_string = help_echo_string; 5439 previous_help_echo_string = help_echo_string;
5469 help_echo_string = Qnil; 5440 help_echo_string = Qnil;
5470 5441
5442 if (!NILP (Vmouse_autoselect_window))
5443 {
5444 NSTRACE (mouse_autoselect_window);
5445 static Lisp_Object last_mouse_window;
5446 Lisp_Object window = window_from_coordinates
5447 (emacsframe, last_mouse_motion_position.x,
5448 last_mouse_motion_position.y, 0, 0);
5449
5450 if (WINDOWP (window)
5451 && !EQ (window, last_mouse_window)
5452 && !EQ (window, selected_window)
5453 && (focus_follows_mouse
5454 || (EQ (XWINDOW (window)->frame,
5455 XWINDOW (selected_window)->frame))))
5456 {
5457 NSTRACE (in_window);
5458 emacs_event->kind = SELECT_WINDOW_EVENT;
5459 emacs_event->frame_or_window = window;
5460 EV_TRAILER2 (e);
5461 }
5462 /* Remember the last window where we saw the mouse. */
5463 last_mouse_window = window;
5464 }
5465
5471 if (!note_mouse_movement (emacsframe, last_mouse_motion_position.x, 5466 if (!note_mouse_movement (emacsframe, last_mouse_motion_position.x,
5472 last_mouse_motion_position.y)) 5467 last_mouse_motion_position.y))
5473 help_echo_string = previous_help_echo_string; 5468 help_echo_string = previous_help_echo_string;
diff --git a/src/print.c b/src/print.c
index e55657d7d8c..03e781cac18 100644
--- a/src/print.c
+++ b/src/print.c
@@ -126,7 +126,8 @@ bool print_output_debug_flag EXTERNALLY_VISIBLE = 1;
126 set_buffer_internal (XMARKER (printcharfun)->buffer); \ 126 set_buffer_internal (XMARKER (printcharfun)->buffer); \
127 marker_pos = marker_position (printcharfun); \ 127 marker_pos = marker_position (printcharfun); \
128 if (marker_pos < BEGV || marker_pos > ZV) \ 128 if (marker_pos < BEGV || marker_pos > ZV) \
129 error ("Marker is outside the accessible part of the buffer"); \ 129 signal_error ("Marker is outside the accessible " \
130 "part of the buffer", printcharfun); \
130 old_point = PT; \ 131 old_point = PT; \
131 old_point_byte = PT_BYTE; \ 132 old_point_byte = PT_BYTE; \
132 SET_PT_BOTH (marker_pos, \ 133 SET_PT_BOTH (marker_pos, \
@@ -138,10 +139,10 @@ bool print_output_debug_flag EXTERNALLY_VISIBLE = 1;
138 if (NILP (printcharfun)) \ 139 if (NILP (printcharfun)) \
139 { \ 140 { \
140 Lisp_Object string; \ 141 Lisp_Object string; \
141 if (NILP (BVAR (current_buffer, enable_multibyte_characters)) \ 142 if (NILP (BVAR (current_buffer, enable_multibyte_characters)) \
142 && ! print_escape_multibyte) \ 143 && ! print_escape_multibyte) \
143 specbind (Qprint_escape_multibyte, Qt); \ 144 specbind (Qprint_escape_multibyte, Qt); \
144 if (! NILP (BVAR (current_buffer, enable_multibyte_characters)) \ 145 if (! NILP (BVAR (current_buffer, enable_multibyte_characters)) \
145 && ! print_escape_nonascii) \ 146 && ! print_escape_nonascii) \
146 specbind (Qprint_escape_nonascii, Qt); \ 147 specbind (Qprint_escape_nonascii, Qt); \
147 if (print_buffer != 0) \ 148 if (print_buffer != 0) \
@@ -168,7 +169,7 @@ bool print_output_debug_flag EXTERNALLY_VISIBLE = 1;
168 if (NILP (printcharfun)) \ 169 if (NILP (printcharfun)) \
169 { \ 170 { \
170 if (print_buffer_pos != print_buffer_pos_byte \ 171 if (print_buffer_pos != print_buffer_pos_byte \
171 && NILP (BVAR (current_buffer, enable_multibyte_characters))) \ 172 && NILP (BVAR (current_buffer, enable_multibyte_characters)))\
172 { \ 173 { \
173 unsigned char *temp = alloca (print_buffer_pos + 1); \ 174 unsigned char *temp = alloca (print_buffer_pos + 1); \
174 copy_text ((unsigned char *) print_buffer, temp, \ 175 copy_text ((unsigned char *) print_buffer, temp, \
diff --git a/src/process.c b/src/process.c
index 3b62f45bf0a..20f84990d6f 100644
--- a/src/process.c
+++ b/src/process.c
@@ -132,7 +132,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
132#endif 132#endif
133 133
134#ifdef WINDOWSNT 134#ifdef WINDOWSNT
135extern int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *, 135extern int sys_select (int, fd_set *, fd_set *, fd_set *,
136 struct timespec *, void *); 136 struct timespec *, void *);
137#endif 137#endif
138 138
@@ -280,7 +280,7 @@ static bool process_output_skip;
280 280
281static void create_process (Lisp_Object, char **, Lisp_Object); 281static void create_process (Lisp_Object, char **, Lisp_Object);
282#ifdef USABLE_SIGIO 282#ifdef USABLE_SIGIO
283static bool keyboard_bit_set (SELECT_TYPE *); 283static bool keyboard_bit_set (fd_set *);
284#endif 284#endif
285static void deactivate_process (Lisp_Object); 285static void deactivate_process (Lisp_Object);
286static void status_notify (struct Lisp_Process *); 286static void status_notify (struct Lisp_Process *);
@@ -299,26 +299,26 @@ static void exec_sentinel (Lisp_Object proc, Lisp_Object reason);
299 299
300/* Mask of bits indicating the descriptors that we wait for input on. */ 300/* Mask of bits indicating the descriptors that we wait for input on. */
301 301
302static SELECT_TYPE input_wait_mask; 302static fd_set input_wait_mask;
303 303
304/* Mask that excludes keyboard input descriptor(s). */ 304/* Mask that excludes keyboard input descriptor(s). */
305 305
306static SELECT_TYPE non_keyboard_wait_mask; 306static fd_set non_keyboard_wait_mask;
307 307
308/* Mask that excludes process input descriptor(s). */ 308/* Mask that excludes process input descriptor(s). */
309 309
310static SELECT_TYPE non_process_wait_mask; 310static fd_set non_process_wait_mask;
311 311
312/* Mask for selecting for write. */ 312/* Mask for selecting for write. */
313 313
314static SELECT_TYPE write_mask; 314static fd_set write_mask;
315 315
316#ifdef NON_BLOCKING_CONNECT 316#ifdef NON_BLOCKING_CONNECT
317/* Mask of bits indicating the descriptors that we wait for connect to 317/* Mask of bits indicating the descriptors that we wait for connect to
318 complete on. Once they complete, they are removed from this mask 318 complete on. Once they complete, they are removed from this mask
319 and added to the input_wait_mask and non_keyboard_wait_mask. */ 319 and added to the input_wait_mask and non_keyboard_wait_mask. */
320 320
321static SELECT_TYPE connect_wait_mask; 321static fd_set connect_wait_mask;
322 322
323/* Number of bits set in connect_wait_mask. */ 323/* Number of bits set in connect_wait_mask. */
324static int num_pending_connects; 324static int num_pending_connects;
@@ -331,7 +331,7 @@ static int max_process_desc;
331static int max_input_desc; 331static int max_input_desc;
332 332
333/* Indexed by descriptor, gives the process (if any) for that descriptor */ 333/* Indexed by descriptor, gives the process (if any) for that descriptor */
334static Lisp_Object chan_process[MAXDESC]; 334static Lisp_Object chan_process[FD_SETSIZE];
335 335
336/* Alist of elements (NAME . PROCESS) */ 336/* Alist of elements (NAME . PROCESS) */
337static Lisp_Object Vprocess_alist; 337static Lisp_Object Vprocess_alist;
@@ -342,18 +342,18 @@ static Lisp_Object Vprocess_alist;
342 output from the process is to read at least one char. 342 output from the process is to read at least one char.
343 Always -1 on systems that support FIONREAD. */ 343 Always -1 on systems that support FIONREAD. */
344 344
345static int proc_buffered_char[MAXDESC]; 345static int proc_buffered_char[FD_SETSIZE];
346 346
347/* Table of `struct coding-system' for each process. */ 347/* Table of `struct coding-system' for each process. */
348static struct coding_system *proc_decode_coding_system[MAXDESC]; 348static struct coding_system *proc_decode_coding_system[FD_SETSIZE];
349static struct coding_system *proc_encode_coding_system[MAXDESC]; 349static struct coding_system *proc_encode_coding_system[FD_SETSIZE];
350 350
351#ifdef DATAGRAM_SOCKETS 351#ifdef DATAGRAM_SOCKETS
352/* Table of `partner address' for datagram sockets. */ 352/* Table of `partner address' for datagram sockets. */
353static struct sockaddr_and_len { 353static struct sockaddr_and_len {
354 struct sockaddr *sa; 354 struct sockaddr *sa;
355 int len; 355 int len;
356} datagram_address[MAXDESC]; 356} datagram_address[FD_SETSIZE];
357#define DATAGRAM_CHAN_P(chan) (datagram_address[chan].sa != 0) 357#define DATAGRAM_CHAN_P(chan) (datagram_address[chan].sa != 0)
358#define DATAGRAM_CONN_P(proc) (PROCESSP (proc) && datagram_address[XPROCESS (proc)->infd].sa != 0) 358#define DATAGRAM_CONN_P(proc) (PROCESSP (proc) && datagram_address[XPROCESS (proc)->infd].sa != 0)
359#else 359#else
@@ -458,7 +458,7 @@ static struct fd_callback_data
458#define FOR_READ 1 458#define FOR_READ 1
459#define FOR_WRITE 2 459#define FOR_WRITE 2
460 int condition; /* mask of the defines above. */ 460 int condition; /* mask of the defines above. */
461} fd_callback_info[MAXDESC]; 461} fd_callback_info[FD_SETSIZE];
462 462
463 463
464/* Add a file descriptor FD to be monitored for when read is possible. 464/* Add a file descriptor FD to be monitored for when read is possible.
@@ -467,7 +467,7 @@ static struct fd_callback_data
467void 467void
468add_read_fd (int fd, fd_callback func, void *data) 468add_read_fd (int fd, fd_callback func, void *data)
469{ 469{
470 eassert (fd < MAXDESC); 470 eassert (fd < FD_SETSIZE);
471 add_keyboard_wait_descriptor (fd); 471 add_keyboard_wait_descriptor (fd);
472 472
473 fd_callback_info[fd].func = func; 473 fd_callback_info[fd].func = func;
@@ -480,7 +480,7 @@ add_read_fd (int fd, fd_callback func, void *data)
480void 480void
481delete_read_fd (int fd) 481delete_read_fd (int fd)
482{ 482{
483 eassert (fd < MAXDESC); 483 eassert (fd < FD_SETSIZE);
484 delete_keyboard_wait_descriptor (fd); 484 delete_keyboard_wait_descriptor (fd);
485 485
486 fd_callback_info[fd].condition &= ~FOR_READ; 486 fd_callback_info[fd].condition &= ~FOR_READ;
@@ -497,7 +497,7 @@ delete_read_fd (int fd)
497void 497void
498add_write_fd (int fd, fd_callback func, void *data) 498add_write_fd (int fd, fd_callback func, void *data)
499{ 499{
500 eassert (fd < MAXDESC); 500 eassert (fd < FD_SETSIZE);
501 FD_SET (fd, &write_mask); 501 FD_SET (fd, &write_mask);
502 if (fd > max_input_desc) 502 if (fd > max_input_desc)
503 max_input_desc = fd; 503 max_input_desc = fd;
@@ -528,7 +528,7 @@ delete_input_desc (int fd)
528void 528void
529delete_write_fd (int fd) 529delete_write_fd (int fd)
530{ 530{
531 eassert (fd < MAXDESC); 531 eassert (fd < FD_SETSIZE);
532 FD_CLR (fd, &write_mask); 532 FD_CLR (fd, &write_mask);
533 fd_callback_info[fd].condition &= ~FOR_WRITE; 533 fd_callback_info[fd].condition &= ~FOR_WRITE;
534 if (fd_callback_info[fd].condition == 0) 534 if (fd_callback_info[fd].condition == 0)
@@ -3232,7 +3232,7 @@ usage: (make-network-process &rest ARGS) */)
3232 wait for completion is pselect(). */ 3232 wait for completion is pselect(). */
3233 int sc; 3233 int sc;
3234 socklen_t len; 3234 socklen_t len;
3235 SELECT_TYPE fdset; 3235 fd_set fdset;
3236 retry_select: 3236 retry_select:
3237 FD_ZERO (&fdset); 3237 FD_ZERO (&fdset);
3238 FD_SET (s, &fdset); 3238 FD_SET (s, &fdset);
@@ -4232,8 +4232,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
4232 struct Lisp_Process *wait_proc, int just_wait_proc) 4232 struct Lisp_Process *wait_proc, int just_wait_proc)
4233{ 4233{
4234 int channel, nfds; 4234 int channel, nfds;
4235 SELECT_TYPE Available; 4235 fd_set Available;
4236 SELECT_TYPE Writeok; 4236 fd_set Writeok;
4237 bool check_write; 4237 bool check_write;
4238 int check_delay; 4238 int check_delay;
4239 bool no_avail; 4239 bool no_avail;
@@ -4387,8 +4387,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
4387 timeout to get our attention. */ 4387 timeout to get our attention. */
4388 if (update_tick != process_tick) 4388 if (update_tick != process_tick)
4389 { 4389 {
4390 SELECT_TYPE Atemp; 4390 fd_set Atemp;
4391 SELECT_TYPE Ctemp; 4391 fd_set Ctemp;
4392 4392
4393 if (kbd_on_hold_p ()) 4393 if (kbd_on_hold_p ())
4394 FD_ZERO (&Atemp); 4394 FD_ZERO (&Atemp);
@@ -4571,7 +4571,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
4571 the gnutls library -- 2.12.14 has been confirmed 4571 the gnutls library -- 2.12.14 has been confirmed
4572 to need it. See 4572 to need it. See
4573 http://comments.gmane.org/gmane.emacs.devel/145074 */ 4573 http://comments.gmane.org/gmane.emacs.devel/145074 */
4574 for (channel = 0; channel < MAXDESC; ++channel) 4574 for (channel = 0; channel < FD_SETSIZE; ++channel)
4575 if (! NILP (chan_process[channel])) 4575 if (! NILP (chan_process[channel]))
4576 { 4576 {
4577 struct Lisp_Process *p = 4577 struct Lisp_Process *p =
@@ -5178,15 +5178,10 @@ DEFUN ("internal-default-process-filter", Finternal_default_process_filter,
5178 5178
5179 bset_read_only (current_buffer, Qnil); 5179 bset_read_only (current_buffer, Qnil);
5180 5180
5181 /* Insert new output into buffer 5181 /* Insert new output into buffer at the current end-of-output
5182 at the current end-of-output marker, 5182 marker, thus preserving logical ordering of input and output. */
5183 thus preserving logical ordering of input and output. */
5184 if (XMARKER (p->mark)->buffer) 5183 if (XMARKER (p->mark)->buffer)
5185 SET_PT_BOTH (clip_to_bounds (BEGV, 5184 set_point_from_marker (p->mark);
5186 marker_position (p->mark), ZV),
5187 clip_to_bounds (BEGV_BYTE,
5188 marker_byte_position (p->mark),
5189 ZV_BYTE));
5190 else 5185 else
5191 SET_PT_BOTH (ZV, ZV_BYTE); 5186 SET_PT_BOTH (ZV, ZV_BYTE);
5192 before = PT; 5187 before = PT;
@@ -6542,7 +6537,7 @@ keyboard_bit_set (fd_set *mask)
6542#else /* not subprocesses */ 6537#else /* not subprocesses */
6543 6538
6544/* Defined on msdos.c. */ 6539/* Defined on msdos.c. */
6545extern int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *, 6540extern int sys_select (int, fd_set *, fd_set *, fd_set *,
6546 struct timespec *, void *); 6541 struct timespec *, void *);
6547 6542
6548/* Implementation of wait_reading_process_output, assuming that there 6543/* Implementation of wait_reading_process_output, assuming that there
@@ -6608,7 +6603,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
6608 while (1) 6603 while (1)
6609 { 6604 {
6610 bool timeout_reduced_for_timers = 0; 6605 bool timeout_reduced_for_timers = 0;
6611 SELECT_TYPE waitchannels; 6606 fd_set waitchannels;
6612 int xerrno; 6607 int xerrno;
6613 6608
6614 /* If calling from keyboard input, do not quit 6609 /* If calling from keyboard input, do not quit
@@ -7072,7 +7067,7 @@ init_process_emacs (void)
7072 7067
7073 Vprocess_alist = Qnil; 7068 Vprocess_alist = Qnil;
7074 deleted_pid_list = Qnil; 7069 deleted_pid_list = Qnil;
7075 for (i = 0; i < MAXDESC; i++) 7070 for (i = 0; i < FD_SETSIZE; i++)
7076 { 7071 {
7077 chan_process[i] = Qnil; 7072 chan_process[i] = Qnil;
7078 proc_buffered_char[i] = -1; 7073 proc_buffered_char[i] = -1;
diff --git a/src/regex.c b/src/regex.c
index 2363fe2a290..1befececd22 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -257,15 +257,10 @@ xrealloc (void *block, size_t size)
257enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 }; 257enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 };
258 258
259/* Dummy macros for non-Emacs environments. */ 259/* Dummy macros for non-Emacs environments. */
260# define CHAR_CHARSET(c) 0
261# define CHARSET_LEADING_CODE_BASE(c) 0
262# define MAX_MULTIBYTE_LENGTH 1 260# define MAX_MULTIBYTE_LENGTH 1
263# define RE_MULTIBYTE_P(x) 0 261# define RE_MULTIBYTE_P(x) 0
264# define RE_TARGET_MULTIBYTE_P(x) 0 262# define RE_TARGET_MULTIBYTE_P(x) 0
265# define WORD_BOUNDARY_P(c1, c2) (0) 263# define WORD_BOUNDARY_P(c1, c2) (0)
266# define CHAR_HEAD_P(p) (1)
267# define SINGLE_BYTE_CHAR_P(c) (1)
268# define SAME_CHARSET_P(c1, c2) (1)
269# define BYTES_BY_CHAR_HEAD(p) (1) 264# define BYTES_BY_CHAR_HEAD(p) (1)
270# define PREV_CHAR_BOUNDARY(p, limit) ((p)--) 265# define PREV_CHAR_BOUNDARY(p, limit) ((p)--)
271# define STRING_CHAR(p) (*(p)) 266# define STRING_CHAR(p) (*(p))
@@ -279,8 +274,6 @@ enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 };
279 (c = ((p) == (str2) ? *((end1) - 1) : *((p) - 1))) 274 (c = ((p) == (str2) ? *((end1) - 1) : *((p) - 1)))
280# define GET_CHAR_AFTER(c, p, len) \ 275# define GET_CHAR_AFTER(c, p, len) \
281 (c = *p, len = 1) 276 (c = *p, len = 1)
282# define MAKE_CHAR(charset, c1, c2) (c1)
283# define BYTE8_TO_CHAR(c) (c)
284# define CHAR_BYTE8_P(c) (0) 277# define CHAR_BYTE8_P(c) (0)
285# define CHAR_LEADING_CODE(c) (c) 278# define CHAR_LEADING_CODE(c) (c)
286 279
@@ -775,10 +768,12 @@ extract_number_and_incr (re_char **source)
775 and the 2 bytes of flags at the start of the range table. */ 768 and the 2 bytes of flags at the start of the range table. */
776#define CHARSET_RANGE_TABLE(p) (&(p)[4 + CHARSET_BITMAP_SIZE (p)]) 769#define CHARSET_RANGE_TABLE(p) (&(p)[4 + CHARSET_BITMAP_SIZE (p)])
777 770
771#ifdef emacs
778/* Extract the bit flags that start a range table. */ 772/* Extract the bit flags that start a range table. */
779#define CHARSET_RANGE_TABLE_BITS(p) \ 773#define CHARSET_RANGE_TABLE_BITS(p) \
780 ((p)[2 + CHARSET_BITMAP_SIZE (p)] \ 774 ((p)[2 + CHARSET_BITMAP_SIZE (p)] \
781 + (p)[3 + CHARSET_BITMAP_SIZE (p)] * 0x100) 775 + (p)[3 + CHARSET_BITMAP_SIZE (p)] * 0x100)
776#endif
782 777
783/* Return the address of end of RANGE_TABLE. COUNT is number of 778/* Return the address of end of RANGE_TABLE. COUNT is number of
784 ranges (which is a pair of (start, end)) in the RANGE_TABLE. `* 2' 779 ranges (which is a pair of (start, end)) in the RANGE_TABLE. `* 2'
@@ -1830,6 +1825,8 @@ struct range_table_work_area
1830 int bits; /* flag to record character classes */ 1825 int bits; /* flag to record character classes */
1831}; 1826};
1832 1827
1828#ifdef emacs
1829
1833/* Make sure that WORK_AREA can hold more N multibyte characters. 1830/* Make sure that WORK_AREA can hold more N multibyte characters.
1834 This is used only in set_image_of_range and set_image_of_range_1. 1831 This is used only in set_image_of_range and set_image_of_range_1.
1835 It expects WORK_AREA to be a pointer. 1832 It expects WORK_AREA to be a pointer.
@@ -1848,15 +1845,6 @@ struct range_table_work_area
1848#define SET_RANGE_TABLE_WORK_AREA_BIT(work_area, bit) \ 1845#define SET_RANGE_TABLE_WORK_AREA_BIT(work_area, bit) \
1849 (work_area).bits |= (bit) 1846 (work_area).bits |= (bit)
1850 1847
1851/* Bits used to implement the multibyte-part of the various character classes
1852 such as [:alnum:] in a charset's range table. */
1853#define BIT_WORD 0x1
1854#define BIT_LOWER 0x2
1855#define BIT_PUNCT 0x4
1856#define BIT_SPACE 0x8
1857#define BIT_UPPER 0x10
1858#define BIT_MULTIBYTE 0x20
1859
1860/* Set a range (RANGE_START, RANGE_END) to WORK_AREA. */ 1848/* Set a range (RANGE_START, RANGE_END) to WORK_AREA. */
1861#define SET_RANGE_TABLE_WORK_AREA(work_area, range_start, range_end) \ 1849#define SET_RANGE_TABLE_WORK_AREA(work_area, range_start, range_end) \
1862 do { \ 1850 do { \
@@ -1865,6 +1853,8 @@ struct range_table_work_area
1865 (work_area).table[(work_area).used++] = (range_end); \ 1853 (work_area).table[(work_area).used++] = (range_end); \
1866 } while (0) 1854 } while (0)
1867 1855
1856#endif /* emacs */
1857
1868/* Free allocated memory for WORK_AREA. */ 1858/* Free allocated memory for WORK_AREA. */
1869#define FREE_RANGE_TABLE_WORK_AREA(work_area) \ 1859#define FREE_RANGE_TABLE_WORK_AREA(work_area) \
1870 do { \ 1860 do { \
@@ -1876,6 +1866,15 @@ struct range_table_work_area
1876#define RANGE_TABLE_WORK_USED(work_area) ((work_area).used) 1866#define RANGE_TABLE_WORK_USED(work_area) ((work_area).used)
1877#define RANGE_TABLE_WORK_BITS(work_area) ((work_area).bits) 1867#define RANGE_TABLE_WORK_BITS(work_area) ((work_area).bits)
1878#define RANGE_TABLE_WORK_ELT(work_area, i) ((work_area).table[i]) 1868#define RANGE_TABLE_WORK_ELT(work_area, i) ((work_area).table[i])
1869
1870/* Bits used to implement the multibyte-part of the various character classes
1871 such as [:alnum:] in a charset's range table. */
1872#define BIT_WORD 0x1
1873#define BIT_LOWER 0x2
1874#define BIT_PUNCT 0x4
1875#define BIT_SPACE 0x8
1876#define BIT_UPPER 0x10
1877#define BIT_MULTIBYTE 0x20
1879 1878
1880 1879
1881/* Set the bit for character C in a list. */ 1880/* Set the bit for character C in a list. */
diff --git a/src/search.c b/src/search.c
index 761c12a364a..99e8d2501fe 100644
--- a/src/search.c
+++ b/src/search.c
@@ -859,88 +859,20 @@ find_newline (ptrdiff_t start, ptrdiff_t start_byte, ptrdiff_t end,
859 If ALLOW_QUIT, set immediate_quit. That's good to do 859 If ALLOW_QUIT, set immediate_quit. That's good to do
860 except in special cases. */ 860 except in special cases. */
861 861
862EMACS_INT 862ptrdiff_t
863scan_newline (ptrdiff_t start, ptrdiff_t start_byte, 863scan_newline (ptrdiff_t start, ptrdiff_t start_byte,
864 ptrdiff_t limit, ptrdiff_t limit_byte, 864 ptrdiff_t limit, ptrdiff_t limit_byte,
865 EMACS_INT count, bool allow_quit) 865 ptrdiff_t count, bool allow_quit)
866{ 866{
867 int direction = ((count > 0) ? 1 : -1); 867 ptrdiff_t charpos, bytepos, shortage;
868
869 unsigned char *cursor;
870 unsigned char *base;
871
872 ptrdiff_t ceiling;
873 unsigned char *ceiling_addr;
874
875 bool old_immediate_quit = immediate_quit;
876
877 if (allow_quit)
878 immediate_quit++;
879 868
880 if (count > 0) 869 charpos = find_newline (start, start_byte, limit, limit_byte,
881 { 870 count, &shortage, &bytepos, allow_quit);
882 while (start_byte < limit_byte) 871 if (shortage)
883 { 872 TEMP_SET_PT_BOTH (limit, limit_byte);
884 ceiling = BUFFER_CEILING_OF (start_byte);
885 ceiling = min (limit_byte - 1, ceiling);
886 ceiling_addr = BYTE_POS_ADDR (ceiling) + 1;
887 base = (cursor = BYTE_POS_ADDR (start_byte));
888
889 do
890 {
891 unsigned char *nl = memchr (cursor, '\n', ceiling_addr - cursor);
892 if (! nl)
893 break;
894 if (--count == 0)
895 {
896 immediate_quit = old_immediate_quit;
897 start_byte += nl - base + 1;
898 start = BYTE_TO_CHAR (start_byte);
899 TEMP_SET_PT_BOTH (start, start_byte);
900 return 0;
901 }
902 cursor = nl + 1;
903 }
904 while (cursor < ceiling_addr);
905
906 start_byte += ceiling_addr - base;
907 }
908 }
909 else 873 else
910 { 874 TEMP_SET_PT_BOTH (charpos, bytepos);
911 while (start_byte > limit_byte) 875 return shortage;
912 {
913 ceiling = BUFFER_FLOOR_OF (start_byte - 1);
914 ceiling = max (limit_byte, ceiling);
915 ceiling_addr = BYTE_POS_ADDR (ceiling);
916 base = (cursor = BYTE_POS_ADDR (start_byte - 1) + 1);
917 while (1)
918 {
919 unsigned char *nl = memrchr (ceiling_addr, '\n',
920 cursor - ceiling_addr);
921 if (! nl)
922 break;
923
924 if (++count == 0)
925 {
926 immediate_quit = old_immediate_quit;
927 /* Return the position AFTER the match we found. */
928 start_byte += nl - base + 1;
929 start = BYTE_TO_CHAR (start_byte);
930 TEMP_SET_PT_BOTH (start, start_byte);
931 return 0;
932 }
933
934 cursor = nl;
935 }
936 start_byte += ceiling_addr - base;
937 }
938 }
939
940 TEMP_SET_PT_BOTH (limit, limit_byte);
941 immediate_quit = old_immediate_quit;
942
943 return count * direction;
944} 876}
945 877
946/* Like find_newline, but doesn't allow QUITting and doesn't return 878/* Like find_newline, but doesn't allow QUITting and doesn't return
diff --git a/src/sysdep.c b/src/sysdep.c
index e43991f41ab..6439697501e 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -588,7 +588,7 @@ restore_signal_handlers (struct save_signal *saved_handlers)
588} 588}
589 589
590#ifdef USABLE_SIGIO 590#ifdef USABLE_SIGIO
591static int old_fcntl_flags[MAXDESC]; 591static int old_fcntl_flags[FD_SETSIZE];
592#endif 592#endif
593 593
594void 594void
@@ -817,7 +817,7 @@ emacs_set_tty (int fd, struct emacs_tty *settings, bool flushp)
817 817
818 818
819#ifdef F_SETOWN 819#ifdef F_SETOWN
820static int old_fcntl_owner[MAXDESC]; 820static int old_fcntl_owner[FD_SETSIZE];
821#endif /* F_SETOWN */ 821#endif /* F_SETOWN */
822 822
823/* This may also be defined in stdio, 823/* This may also be defined in stdio,
diff --git a/src/sysselect.h b/src/sysselect.h
index 0a4f7e3ad96..5df0af9ed37 100644
--- a/src/sysselect.h
+++ b/src/sysselect.h
@@ -25,15 +25,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
25 definitions in w32.h are incompatible with the below. */ 25 definitions in w32.h are incompatible with the below. */
26#ifndef WINDOWSNT 26#ifndef WINDOWSNT
27#ifdef FD_SET 27#ifdef FD_SET
28#ifdef FD_SETSIZE 28#ifndef FD_SETSIZE
29#define MAXDESC FD_SETSIZE 29#define FD_SETSIZE 64
30#else
31#define MAXDESC 64
32#endif 30#endif
33#define SELECT_TYPE fd_set
34#else /* no FD_SET */ 31#else /* no FD_SET */
35#define MAXDESC 32 32#define FD_SETSIZE 32
36#define SELECT_TYPE int 33typedef int fd_set;
37 34
38/* Define the macros to access a single-int bitmap of descriptors. */ 35/* Define the macros to access a single-int bitmap of descriptors. */
39#define FD_SET(n, p) (*(p) |= (1 << (n))) 36#define FD_SET(n, p) (*(p) |= (1 << (n)))
diff --git a/src/term.c b/src/term.c
index aa61fde06ee..0270c1eefa6 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1800,27 +1800,10 @@ append_glyphless_glyph (struct it *it, int face_id, const char *str)
1800static void 1800static void
1801produce_glyphless_glyph (struct it *it, Lisp_Object acronym) 1801produce_glyphless_glyph (struct it *it, Lisp_Object acronym)
1802{ 1802{
1803 int face_id; 1803 int len, face_id = merge_glyphless_glyph_face (it);
1804 int len;
1805 char buf[sizeof "\\x" + max (6, (sizeof it->c * CHAR_BIT + 3) / 4)]; 1804 char buf[sizeof "\\x" + max (6, (sizeof it->c * CHAR_BIT + 3) / 4)];
1806 char const *str = " "; 1805 char const *str = " ";
1807 1806
1808 /* Get a face ID for the glyph by utilizing a cache (the same way as
1809 done for `escape-glyph' in get_next_display_element). */
1810 if (it->f == last_glyphless_glyph_frame
1811 && it->face_id == last_glyphless_glyph_face_id)
1812 {
1813 face_id = last_glyphless_glyph_merged_face_id;
1814 }
1815 else
1816 {
1817 /* Merge the `glyphless-char' face into the current face. */
1818 face_id = merge_faces (it->f, Qglyphless_char, 0, it->face_id);
1819 last_glyphless_glyph_frame = it->f;
1820 last_glyphless_glyph_face_id = it->face_id;
1821 last_glyphless_glyph_merged_face_id = face_id;
1822 }
1823
1824 if (it->glyphless_method == GLYPHLESS_DISPLAY_THIN_SPACE) 1807 if (it->glyphless_method == GLYPHLESS_DISPLAY_THIN_SPACE)
1825 { 1808 {
1826 /* As there's no way to produce a thin space, we produce a space 1809 /* As there's no way to produce a thin space, we produce a space
diff --git a/src/termhooks.h b/src/termhooks.h
index b22367b6751..e47d9701229 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -18,7 +18,9 @@ GNU General Public License for more details.
18You should have received a copy of the GNU General Public License 18You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21 21#ifndef EMACS_TERMHOOKS_H
22#define EMACS_TERMHOOKS_H
23
22/* Miscellanea. */ 24/* Miscellanea. */
23 25
24#include "systime.h" /* for Time */ 26#include "systime.h" /* for Time */
@@ -28,10 +30,6 @@ INLINE_HEADER_BEGIN
28# define TERMHOOKS_INLINE INLINE 30# define TERMHOOKS_INLINE INLINE
29#endif 31#endif
30 32
31struct glyph;
32struct frame;
33
34
35enum scroll_bar_part { 33enum scroll_bar_part {
36 scroll_bar_above_handle, 34 scroll_bar_above_handle,
37 scroll_bar_handle, 35 scroll_bar_handle,
@@ -49,7 +47,18 @@ enum scroll_bar_part {
49 may do something OS dependent, like extended window manager hints on X11. */ 47 may do something OS dependent, like extended window manager hints on X11. */
50extern void (*fullscreen_hook) (struct frame *f); 48extern void (*fullscreen_hook) (struct frame *f);
51 49
52 50/* Output method of a terminal (and frames on this terminal, respectively). */
51
52enum output_method
53{
54 output_initial,
55 output_termcap,
56 output_x_window,
57 output_msdos_raw,
58 output_w32,
59 output_ns
60};
61
53/* Input queue declarations and hooks. */ 62/* Input queue declarations and hooks. */
54 63
55enum event_kind 64enum event_kind
@@ -324,11 +333,6 @@ extern void term_mouse_moveto (int, int);
324extern struct tty_display_info *gpm_tty; 333extern struct tty_display_info *gpm_tty;
325#endif 334#endif
326 335
327
328struct ns_display_info;
329struct x_display_info;
330struct w32_display_info;
331
332/* Terminal-local parameters. */ 336/* Terminal-local parameters. */
333struct terminal 337struct terminal
334{ 338{
@@ -663,3 +667,5 @@ extern void close_gpm (int gpm_fd);
663#endif 667#endif
664 668
665INLINE_HEADER_END 669INLINE_HEADER_END
670
671#endif /* EMACS_TERMHOOKS_H */
diff --git a/src/w32.c b/src/w32.c
index 05a3fde97ce..1dcf46b5f4b 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -6092,6 +6092,7 @@ term_winsock (void)
6092{ 6092{
6093 if (winsock_lib != NULL && winsock_inuse == 0) 6093 if (winsock_lib != NULL && winsock_inuse == 0)
6094 { 6094 {
6095 release_listen_threads ();
6095 /* Not sure what would cause WSAENETDOWN, or even if it can happen 6096 /* Not sure what would cause WSAENETDOWN, or even if it can happen
6096 after WSAStartup returns successfully, but it seems reasonable 6097 after WSAStartup returns successfully, but it seems reasonable
6097 to allow unloading winsock anyway in that case. */ 6098 to allow unloading winsock anyway in that case. */
@@ -7076,7 +7077,12 @@ _sys_wait_accept (int fd)
7076 rc = pfn_WSAEventSelect (SOCK_HANDLE (fd), hEv, FD_ACCEPT); 7077 rc = pfn_WSAEventSelect (SOCK_HANDLE (fd), hEv, FD_ACCEPT);
7077 if (rc != SOCKET_ERROR) 7078 if (rc != SOCKET_ERROR)
7078 { 7079 {
7079 rc = WaitForSingleObject (hEv, INFINITE); 7080 do {
7081 rc = WaitForSingleObject (hEv, 500);
7082 Sleep (5);
7083 } while (rc == WAIT_TIMEOUT
7084 && cp->status != STATUS_READ_ERROR
7085 && cp->char_avail);
7080 pfn_WSAEventSelect (SOCK_HANDLE (fd), NULL, 0); 7086 pfn_WSAEventSelect (SOCK_HANDLE (fd), NULL, 0);
7081 if (rc == WAIT_OBJECT_0) 7087 if (rc == WAIT_OBJECT_0)
7082 cp->status = STATUS_READ_SUCCEEDED; 7088 cp->status = STATUS_READ_SUCCEEDED;
diff --git a/src/w32.h b/src/w32.h
index 9c1f1efa699..32d0fdbe3cf 100644
--- a/src/w32.h
+++ b/src/w32.h
@@ -163,6 +163,7 @@ extern void reset_standard_handles (int in, int out,
163/* Return the string resource associated with KEY of type TYPE. */ 163/* Return the string resource associated with KEY of type TYPE. */
164extern LPBYTE w32_get_resource (char * key, LPDWORD type); 164extern LPBYTE w32_get_resource (char * key, LPDWORD type);
165 165
166extern void release_listen_threads (void);
166extern void init_ntproc (int); 167extern void init_ntproc (int);
167extern void term_ntproc (int); 168extern void term_ntproc (int);
168extern void globals_of_w32 (void); 169extern void globals_of_w32 (void);
diff --git a/src/w32console.c b/src/w32console.c
index a707344efc8..8da1ccf1892 100644
--- a/src/w32console.c
+++ b/src/w32console.c
@@ -53,7 +53,6 @@ static void w32con_write_glyphs (struct frame *f, struct glyph *string, int len)
53static void w32con_delete_glyphs (struct frame *f, int n); 53static void w32con_delete_glyphs (struct frame *f, int n);
54static void w32con_reset_terminal_modes (struct terminal *t); 54static void w32con_reset_terminal_modes (struct terminal *t);
55static void w32con_set_terminal_modes (struct terminal *t); 55static void w32con_set_terminal_modes (struct terminal *t);
56static void w32con_set_terminal_window (struct frame *f, int size);
57static void w32con_update_begin (struct frame * f); 56static void w32con_update_begin (struct frame * f);
58static void w32con_update_end (struct frame * f); 57static void w32con_update_end (struct frame * f);
59static WORD w32_face_attributes (struct frame *f, int face_id); 58static WORD w32_face_attributes (struct frame *f, int face_id);
@@ -497,11 +496,6 @@ w32con_update_end (struct frame * f)
497 SetConsoleCursorPosition (cur_screen, cursor_coords); 496 SetConsoleCursorPosition (cur_screen, cursor_coords);
498} 497}
499 498
500static void
501w32con_set_terminal_window (struct frame *f, int size)
502{
503}
504
505/*********************************************************************** 499/***********************************************************************
506 stubs from termcap.c 500 stubs from termcap.c
507 ***********************************************************************/ 501 ***********************************************************************/
@@ -619,7 +613,7 @@ initialize_w32_display (struct terminal *term, int *width, int *height)
619 term->ring_bell_hook = w32_sys_ring_bell; 613 term->ring_bell_hook = w32_sys_ring_bell;
620 term->reset_terminal_modes_hook = w32con_reset_terminal_modes; 614 term->reset_terminal_modes_hook = w32con_reset_terminal_modes;
621 term->set_terminal_modes_hook = w32con_set_terminal_modes; 615 term->set_terminal_modes_hook = w32con_set_terminal_modes;
622 term->set_terminal_window_hook = w32con_set_terminal_window; 616 term->set_terminal_window_hook = NULL;
623 term->update_begin_hook = w32con_update_begin; 617 term->update_begin_hook = w32con_update_begin;
624 term->update_end_hook = w32con_update_end; 618 term->update_end_hook = w32con_update_end;
625 619
diff --git a/src/w32fns.c b/src/w32fns.c
index b8c445a3a36..58c63d959ef 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -1637,7 +1637,7 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
1637 x_set_window_size (f, 0, FRAME_COLS (f), FRAME_LINES (f)); 1637 x_set_window_size (f, 0, FRAME_COLS (f), FRAME_LINES (f));
1638 do_pending_window_change (0); 1638 do_pending_window_change (0);
1639 } 1639 }
1640 adjust_glyphs (f); 1640 adjust_frame_glyphs (f);
1641} 1641}
1642 1642
1643 1643
@@ -1679,7 +1679,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
1679 1679
1680 FRAME_TOOL_BAR_LINES (f) = nlines; 1680 FRAME_TOOL_BAR_LINES (f) = nlines;
1681 resize_frame_windows (f, FRAME_LINES (f), 0); 1681 resize_frame_windows (f, FRAME_LINES (f), 0);
1682 adjust_glyphs (f); 1682 adjust_frame_glyphs (f);
1683 1683
1684 /* We also have to make sure that the internal border at the top of 1684 /* We also have to make sure that the internal border at the top of
1685 the frame, below the menu bar or tool bar, is redrawn when the 1685 the frame, below the menu bar or tool bar, is redrawn when the
@@ -6059,7 +6059,7 @@ Text larger than the specified size is clipped. */)
6059 } 6059 }
6060 6060
6061 FRAME_TOTAL_COLS (f) = WINDOW_TOTAL_COLS (w); 6061 FRAME_TOTAL_COLS (f) = WINDOW_TOTAL_COLS (w);
6062 adjust_glyphs (f); 6062 adjust_frame_glyphs (f);
6063 w->pseudo_window_p = 1; 6063 w->pseudo_window_p = 1;
6064 6064
6065 /* Display the tooltip text in a temporary buffer. */ 6065 /* Display the tooltip text in a temporary buffer. */
@@ -6128,7 +6128,7 @@ Text larger than the specified size is clipped. */)
6128 width /= WINDOW_FRAME_COLUMN_WIDTH (w); 6128 width /= WINDOW_FRAME_COLUMN_WIDTH (w);
6129 w->total_cols = width; 6129 w->total_cols = width;
6130 FRAME_TOTAL_COLS (f) = width; 6130 FRAME_TOTAL_COLS (f) = width;
6131 adjust_glyphs (f); 6131 adjust_frame_glyphs (f);
6132 w->pseudo_window_p = 1; 6132 w->pseudo_window_p = 1;
6133 clear_glyph_matrix (w->desired_matrix); 6133 clear_glyph_matrix (w->desired_matrix);
6134 clear_glyph_matrix (w->current_matrix); 6134 clear_glyph_matrix (w->current_matrix);
diff --git a/src/w32proc.c b/src/w32proc.c
index 54316a6f80f..dabaa62f71c 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -990,6 +990,18 @@ find_child_pid (DWORD pid)
990 return NULL; 990 return NULL;
991} 991}
992 992
993void
994release_listen_threads (void)
995{
996 int i;
997
998 for (i = child_proc_count - 1; i >= 0; i--)
999 {
1000 if (CHILD_ACTIVE (&child_procs[i])
1001 && (fd_info[child_procs[i].fd].flags & FILE_LISTEN))
1002 child_procs[i].status = STATUS_READ_ERROR;
1003 }
1004}
993 1005
994/* Thread proc for child process and socket reader threads. Each thread 1006/* Thread proc for child process and socket reader threads. Each thread
995 is normally blocked until woken by select() to check for input by 1007 is normally blocked until woken by select() to check for input by
diff --git a/src/w32term.c b/src/w32term.c
index ba3aadd0b49..681f70b5888 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -84,9 +84,6 @@ static int last_mousemove_y = 0;
84 84
85static int any_help_event_p; 85static int any_help_event_p;
86 86
87/* Last window where we saw the mouse. Used by mouse-autoselect-window. */
88static Lisp_Object last_window;
89
90extern unsigned int msh_mousewheel; 87extern unsigned int msh_mousewheel;
91 88
92extern void free_frame_menubar (struct frame *); 89extern void free_frame_menubar (struct frame *);
@@ -224,8 +221,6 @@ void x_wm_set_icon_pixmap (struct frame *, int);
224static void w32_initialize (void); 221static void w32_initialize (void);
225static void x_update_end (struct frame *); 222static void x_update_end (struct frame *);
226static void w32_frame_up_to_date (struct frame *); 223static void w32_frame_up_to_date (struct frame *);
227static void w32_set_terminal_modes (struct terminal *);
228static void w32_reset_terminal_modes (struct terminal *);
229static void x_clear_frame (struct frame *); 224static void x_clear_frame (struct frame *);
230static void frame_highlight (struct frame *); 225static void frame_highlight (struct frame *);
231static void frame_unhighlight (struct frame *); 226static void frame_unhighlight (struct frame *);
@@ -240,7 +235,8 @@ static void x_frame_rehighlight (struct w32_display_info *);
240static void x_draw_hollow_cursor (struct window *, struct glyph_row *); 235static void x_draw_hollow_cursor (struct window *, struct glyph_row *);
241static void x_draw_bar_cursor (struct window *, struct glyph_row *, int, 236static void x_draw_bar_cursor (struct window *, struct glyph_row *, int,
242 enum text_cursor_kinds); 237 enum text_cursor_kinds);
243static void w32_clip_to_row (struct window *, struct glyph_row *, int, HDC); 238static void w32_clip_to_row (struct window *, struct glyph_row *,
239 enum glyph_row_area, HDC);
244static BOOL my_show_window (struct frame *, HWND, int); 240static BOOL my_show_window (struct frame *, HWND, int);
245static void my_set_window_pos (HWND, HWND, int, int, int, int, UINT); 241static void my_set_window_pos (HWND, HWND, int, int, int, int, UINT);
246#if 0 242#if 0
@@ -576,8 +572,7 @@ x_update_begin (struct frame *f)
576} 572}
577 573
578 574
579/* Start update of window W. Set output_cursor to the cursor 575/* Start update of window W. */
580 position of W. */
581 576
582static void 577static void
583x_update_window_begin (struct window *w) 578x_update_window_begin (struct window *w)
@@ -591,7 +586,7 @@ x_update_window_begin (struct window *w)
591 SendMessage (w32_system_caret_hwnd, WM_EMACS_HIDE_CARET, 0, 0); 586 SendMessage (w32_system_caret_hwnd, WM_EMACS_HIDE_CARET, 0, 0);
592 } 587 }
593 588
594 set_output_cursor (&w->cursor); 589 w->output_cursor = w->cursor;
595 590
596 block_input (); 591 block_input ();
597 592
@@ -683,9 +678,9 @@ x_update_window_end (struct window *w, bool cursor_on_p,
683 block_input (); 678 block_input ();
684 679
685 if (cursor_on_p) 680 if (cursor_on_p)
686 display_and_set_cursor (w, 1, output_cursor.hpos, 681 display_and_set_cursor (w, 1,
687 output_cursor.vpos, 682 w->output_cursor.hpos, w->output_cursor.vpos,
688 output_cursor.x, output_cursor.y); 683 w->output_cursor.x, w->output_cursor.y);
689 684
690 if (draw_window_fringes (w, 1)) 685 if (draw_window_fringes (w, 1))
691 x_draw_vertical_border (w); 686 x_draw_vertical_border (w);
@@ -849,7 +844,7 @@ w32_draw_fringe_bitmap (struct window *w, struct glyph_row *row,
849 } 844 }
850 845
851 /* Must clip because of partially visible lines. */ 846 /* Must clip because of partially visible lines. */
852 w32_clip_to_row (w, row, -1, hdc); 847 w32_clip_to_row (w, row, ANY_AREA, hdc);
853 848
854 if (p->which && p->which < max_fringe_bmp) 849 if (p->which && p->which < max_fringe_bmp)
855 { 850 {
@@ -934,28 +929,6 @@ w32_destroy_fringe_bitmap (int which)
934 fringe_bmp[which] = 0; 929 fringe_bmp[which] = 0;
935} 930}
936 931
937
938
939/* This is called when starting Emacs and when restarting after
940 suspend. When starting Emacs, no window is mapped. And nothing
941 must be done to Emacs's own window if it is suspended (though that
942 rarely happens). */
943
944static void
945w32_set_terminal_modes (struct terminal *term)
946{
947}
948
949/* This is called when exiting or suspending Emacs. Exiting will make
950 the W32 windows go away, and suspending requires no action. */
951
952static void
953w32_reset_terminal_modes (struct terminal *term)
954{
955}
956
957
958
959/*********************************************************************** 932/***********************************************************************
960 Display Iterator 933 Display Iterator
961 ***********************************************************************/ 934 ***********************************************************************/
@@ -2651,11 +2624,7 @@ x_clear_frame (struct frame *f)
2651 /* Clearing the frame will erase any cursor, so mark them all as no 2624 /* Clearing the frame will erase any cursor, so mark them all as no
2652 longer visible. */ 2625 longer visible. */
2653 mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f))); 2626 mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f)));
2654 output_cursor.hpos = output_cursor.vpos = 0;
2655 output_cursor.x = -1;
2656 2627
2657 /* We don't set the output cursor here because there will always
2658 follow an explicit cursor_to. */
2659 block_input (); 2628 block_input ();
2660 2629
2661 w32_clear_window (f); 2630 w32_clear_window (f);
@@ -2693,19 +2662,6 @@ w32_ring_bell (struct frame *f)
2693 unblock_input (); 2662 unblock_input ();
2694} 2663}
2695 2664
2696
2697/* Specify how many text lines, from the top of the window,
2698 should be affected by insert-lines and delete-lines operations.
2699 This, and those operations, are used only within an update
2700 that is bounded by calls to x_update_begin and x_update_end. */
2701
2702static void
2703w32_set_terminal_window (struct frame *f, int n)
2704{
2705 /* This function intentionally left blank. */
2706}
2707
2708
2709/*********************************************************************** 2665/***********************************************************************
2710 Line Dance 2666 Line Dance
2711 ***********************************************************************/ 2667 ***********************************************************************/
@@ -2736,7 +2692,7 @@ x_scroll_run (struct window *w, struct run *run)
2736 /* Get frame-relative bounding box of the text display area of W, 2692 /* Get frame-relative bounding box of the text display area of W,
2737 without mode lines. Include in this box the left and right 2693 without mode lines. Include in this box the left and right
2738 fringes of W. */ 2694 fringes of W. */
2739 window_box (w, -1, &x, &y, &width, &height); 2695 window_box (w, ANY_AREA, &x, &y, &width, &height);
2740 2696
2741 /* If the fringe is adjacent to the left (right) scroll bar of a 2697 /* If the fringe is adjacent to the left (right) scroll bar of a
2742 leftmost (rightmost, respectively) window, then extend its 2698 leftmost (rightmost, respectively) window, then extend its
@@ -3830,7 +3786,7 @@ w32_set_vertical_scroll_bar (struct window *w,
3830 bool fringe_extended_p; 3786 bool fringe_extended_p;
3831 3787
3832 /* Get window dimensions. */ 3788 /* Get window dimensions. */
3833 window_box (w, -1, 0, &window_y, 0, &window_height); 3789 window_box (w, ANY_AREA, 0, &window_y, 0, &window_height);
3834 top = window_y; 3790 top = window_y;
3835 width = WINDOW_CONFIG_SCROLL_BAR_COLS (w) * FRAME_COLUMN_WIDTH (f); 3791 width = WINDOW_CONFIG_SCROLL_BAR_COLS (w) * FRAME_COLUMN_WIDTH (f);
3836 height = window_height; 3792 height = window_height;
@@ -4544,18 +4500,16 @@ w32_read_socket (struct terminal *terminal,
4544 /* Generate SELECT_WINDOW_EVENTs when needed. */ 4500 /* Generate SELECT_WINDOW_EVENTs when needed. */
4545 if (!NILP (Vmouse_autoselect_window)) 4501 if (!NILP (Vmouse_autoselect_window))
4546 { 4502 {
4547 Lisp_Object window; 4503 static Lisp_Object last_mouse_window;
4548 int x = LOWORD (msg.msg.lParam); 4504 Lisp_Object window = window_from_coordinates
4549 int y = HIWORD (msg.msg.lParam); 4505 (f, LOWORD (msg.msg.lParam), HIWORD (msg.msg.lParam), 0, 0);
4550
4551 window = window_from_coordinates (f, x, y, 0, 0);
4552 4506
4553 /* Window will be selected only when it is not 4507 /* Window will be selected only when it is not
4554 selected now and last mouse movement event was 4508 selected now and last mouse movement event was
4555 not in it. Minibuffer window will be selected 4509 not in it. Minibuffer window will be selected
4556 only when it is active. */ 4510 only when it is active. */
4557 if (WINDOWP (window) 4511 if (WINDOWP (window)
4558 && !EQ (window, last_window) 4512 && !EQ (window, last_mouse_window)
4559 && !EQ (window, selected_window) 4513 && !EQ (window, selected_window)
4560 /* For click-to-focus window managers 4514 /* For click-to-focus window managers
4561 create event iff we don't leave the 4515 create event iff we don't leave the
@@ -4567,8 +4521,8 @@ w32_read_socket (struct terminal *terminal,
4567 inev.kind = SELECT_WINDOW_EVENT; 4521 inev.kind = SELECT_WINDOW_EVENT;
4568 inev.frame_or_window = window; 4522 inev.frame_or_window = window;
4569 } 4523 }
4570 4524 /* Remember the last window where we saw the mouse. */
4571 last_window = window; 4525 last_mouse_window = window;
4572 } 4526 }
4573 if (!note_mouse_movement (f, &msg.msg)) 4527 if (!note_mouse_movement (f, &msg.msg))
4574 help_echo_string = previous_help_echo_string; 4528 help_echo_string = previous_help_echo_string;
@@ -5123,7 +5077,8 @@ w32_read_socket (struct terminal *terminal,
5123 mode lines must be clipped to the whole window. */ 5077 mode lines must be clipped to the whole window. */
5124 5078
5125static void 5079static void
5126w32_clip_to_row (struct window *w, struct glyph_row *row, int area, HDC hdc) 5080w32_clip_to_row (struct window *w, struct glyph_row *row,
5081 enum glyph_row_area area, HDC hdc)
5127{ 5082{
5128 RECT clip_rect; 5083 RECT clip_rect;
5129 int window_x, window_y, window_width; 5084 int window_x, window_y, window_width;
@@ -6303,11 +6258,6 @@ w32_make_rdb (char *xrm_option)
6303 return buffer; 6258 return buffer;
6304} 6259}
6305 6260
6306void
6307x_flush (struct frame * f)
6308{ /* Nothing to do */ }
6309
6310
6311extern frame_parm_handler w32_frame_parm_handlers[]; 6261extern frame_parm_handler w32_frame_parm_handlers[];
6312 6262
6313static struct redisplay_interface w32_redisplay_interface = 6263static struct redisplay_interface w32_redisplay_interface =
@@ -6321,9 +6271,7 @@ static struct redisplay_interface w32_redisplay_interface =
6321 x_after_update_window_line, 6271 x_after_update_window_line,
6322 x_update_window_begin, 6272 x_update_window_begin,
6323 x_update_window_end, 6273 x_update_window_end,
6324 x_cursor_to, 6274 0, /* flush_display */
6325 x_flush,
6326 0, /* flush_display_optional */
6327 x_clear_window_mouse_face, 6275 x_clear_window_mouse_face,
6328 x_get_glyph_overhangs, 6276 x_get_glyph_overhangs,
6329 x_fix_overlapping_area, 6277 x_fix_overlapping_area,
@@ -6358,11 +6306,11 @@ w32_create_terminal (struct w32_display_info *dpyinfo)
6358 terminal->ins_del_lines_hook = x_ins_del_lines; 6306 terminal->ins_del_lines_hook = x_ins_del_lines;
6359 terminal->delete_glyphs_hook = x_delete_glyphs; 6307 terminal->delete_glyphs_hook = x_delete_glyphs;
6360 terminal->ring_bell_hook = w32_ring_bell; 6308 terminal->ring_bell_hook = w32_ring_bell;
6361 terminal->reset_terminal_modes_hook = w32_reset_terminal_modes; 6309 terminal->reset_terminal_modes_hook = NULL;
6362 terminal->set_terminal_modes_hook = w32_set_terminal_modes; 6310 terminal->set_terminal_modes_hook = NULL;
6363 terminal->update_begin_hook = x_update_begin; 6311 terminal->update_begin_hook = x_update_begin;
6364 terminal->update_end_hook = x_update_end; 6312 terminal->update_end_hook = x_update_end;
6365 terminal->set_terminal_window_hook = w32_set_terminal_window; 6313 terminal->set_terminal_window_hook = NULL;
6366 terminal->read_socket_hook = w32_read_socket; 6314 terminal->read_socket_hook = w32_read_socket;
6367 terminal->frame_up_to_date_hook = w32_frame_up_to_date; 6315 terminal->frame_up_to_date_hook = w32_frame_up_to_date;
6368 terminal->mouse_position_hook = w32_mouse_position; 6316 terminal->mouse_position_hook = w32_mouse_position;
diff --git a/src/w32term.h b/src/w32term.h
index 41c5c71832a..b4818f69aee 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -211,7 +211,6 @@ extern void x_set_window_size (struct frame *f, int change_grav,
211 int cols, int rows); 211 int cols, int rows);
212extern int x_display_pixel_height (struct w32_display_info *); 212extern int x_display_pixel_height (struct w32_display_info *);
213extern int x_display_pixel_width (struct w32_display_info *); 213extern int x_display_pixel_width (struct w32_display_info *);
214extern void x_sync (struct frame *);
215extern Lisp_Object x_get_focus_frame (struct frame *); 214extern Lisp_Object x_get_focus_frame (struct frame *);
216extern void x_set_mouse_position (struct frame *f, int h, int v); 215extern void x_set_mouse_position (struct frame *f, int h, int v);
217extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y); 216extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y);
diff --git a/src/w32xfns.c b/src/w32xfns.c
index 19c6b72bf89..7629e49caf8 100644
--- a/src/w32xfns.c
+++ b/src/w32xfns.c
@@ -333,9 +333,3 @@ drain_message_queue (void)
333 } 333 }
334 return retval; 334 return retval;
335} 335}
336
337/* x_sync is a no-op on W32. */
338void
339x_sync (struct frame *f)
340{
341}
diff --git a/src/window.c b/src/window.c
index 1331ac014ff..410015e472e 100644
--- a/src/window.c
+++ b/src/window.c
@@ -39,13 +39,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
39#include "blockinput.h" 39#include "blockinput.h"
40#include "intervals.h" 40#include "intervals.h"
41#include "termhooks.h" /* For FRAME_TERMINAL. */ 41#include "termhooks.h" /* For FRAME_TERMINAL. */
42 42#ifdef HAVE_WINDOW_SYSTEM
43#ifdef HAVE_X_WINDOWS 43#include TERM_HEADER
44#include "xterm.h" 44#endif /* HAVE_WINDOW_SYSTEM */
45#endif /* HAVE_X_WINDOWS */
46#ifdef HAVE_NTGUI
47#include "w32term.h"
48#endif
49#ifdef MSDOS 45#ifdef MSDOS
50#include "msdos.h" 46#include "msdos.h"
51#endif 47#endif
@@ -552,15 +548,7 @@ select_window_1 (Lisp_Object window, bool inhibit_point_swap)
552 than one window. It also matters when 548 than one window. It also matters when
553 redisplay_window has altered point after scrolling, 549 redisplay_window has altered point after scrolling,
554 because it makes the change only in the window. */ 550 because it makes the change only in the window. */
555 { 551 set_point_from_marker (XWINDOW (window)->pointm);
556 register ptrdiff_t new_point = marker_position (XWINDOW (window)->pointm);
557 if (new_point < BEGV)
558 SET_PT (BEGV);
559 else if (new_point > ZV)
560 SET_PT (ZV);
561 else
562 SET_PT (new_point);
563 }
564} 552}
565 553
566DEFUN ("select-window", Fselect_window, Sselect_window, 1, 2, 0, 554DEFUN ("select-window", Fselect_window, Sselect_window, 1, 2, 0,
@@ -1505,7 +1493,6 @@ if it isn't already recorded. */)
1505 && !noninteractive) 1493 && !noninteractive)
1506 { 1494 {
1507 struct text_pos startp; 1495 struct text_pos startp;
1508 ptrdiff_t charpos = marker_position (w->start);
1509 struct it it; 1496 struct it it;
1510 struct buffer *old_buffer = NULL; 1497 struct buffer *old_buffer = NULL;
1511 void *itdata = NULL; 1498 void *itdata = NULL;
@@ -1523,12 +1510,7 @@ if it isn't already recorded. */)
1523 `-l' containing a call to `rmail' with subsequent other 1510 `-l' containing a call to `rmail' with subsequent other
1524 commands. At the end, W->start happened to be BEG, while 1511 commands. At the end, W->start happened to be BEG, while
1525 rmail had already narrowed the buffer. */ 1512 rmail had already narrowed the buffer. */
1526 if (charpos < BEGV) 1513 CLIP_TEXT_POS_FROM_MARKER (startp, w->start);
1527 SET_TEXT_POS (startp, BEGV, BEGV_BYTE);
1528 else if (charpos > ZV)
1529 SET_TEXT_POS (startp, ZV, ZV_BYTE);
1530 else
1531 SET_TEXT_POS_FROM_MARKER (startp, w->start);
1532 1514
1533 itdata = bidi_shelve_cache (); 1515 itdata = bidi_shelve_cache ();
1534 start_display (&it, w, startp); 1516 start_display (&it, w, startp);
@@ -2969,7 +2951,7 @@ window-start value is reasonable when this function is called. */)
2969 } 2951 }
2970 } 2952 }
2971 2953
2972 adjust_glyphs (f); 2954 adjust_frame_glyphs (f);
2973 unblock_input (); 2955 unblock_input ();
2974 2956
2975 run_window_configuration_change_hook (f); 2957 run_window_configuration_change_hook (f);
@@ -3352,10 +3334,8 @@ temp_output_buffer_show (register Lisp_Object buf)
3352 3334
3353 if (!NILP (Vtemp_buffer_show_function)) 3335 if (!NILP (Vtemp_buffer_show_function))
3354 call1 (Vtemp_buffer_show_function, buf); 3336 call1 (Vtemp_buffer_show_function, buf);
3355 else 3337 else if (WINDOW_LIVE_P (window = display_buffer (buf, Qnil, Qnil)))
3356 { 3338 {
3357 window = display_buffer (buf, Qnil, Qnil);
3358
3359 if (!EQ (XWINDOW (window)->frame, selected_frame)) 3339 if (!EQ (XWINDOW (window)->frame, selected_frame))
3360 Fmake_frame_visible (WINDOW_FRAME (XWINDOW (window))); 3340 Fmake_frame_visible (WINDOW_FRAME (XWINDOW (window)));
3361 Vminibuf_scroll_window = window; 3341 Vminibuf_scroll_window = window;
@@ -3445,6 +3425,7 @@ make_window (void)
3445 non-Lisp data, so do it only for slots which should not be zero. */ 3425 non-Lisp data, so do it only for slots which should not be zero. */
3446 w->nrows_scale_factor = w->ncols_scale_factor = 1; 3426 w->nrows_scale_factor = w->ncols_scale_factor = 1;
3447 w->left_fringe_width = w->right_fringe_width = -1; 3427 w->left_fringe_width = w->right_fringe_width = -1;
3428 w->mode_line_height = w->header_line_height = -1;
3448 w->phys_cursor_type = -1; 3429 w->phys_cursor_type = -1;
3449 w->phys_cursor_width = -1; 3430 w->phys_cursor_width = -1;
3450 w->scroll_bar_width = -1; 3431 w->scroll_bar_width = -1;
@@ -3670,7 +3651,7 @@ be applied on the Elisp level. */)
3670 windows_or_buffers_changed++; 3651 windows_or_buffers_changed++;
3671 FRAME_WINDOW_SIZES_CHANGED (f) = 1; 3652 FRAME_WINDOW_SIZES_CHANGED (f) = 1;
3672 3653
3673 adjust_glyphs (f); 3654 adjust_frame_glyphs (f);
3674 unblock_input (); 3655 unblock_input ();
3675 3656
3676 run_window_configuration_change_hook (f); 3657 run_window_configuration_change_hook (f);
@@ -3940,7 +3921,7 @@ set correctly. See the code of `split-window' for how this is done. */)
3940 3921
3941 block_input (); 3922 block_input ();
3942 window_resize_apply (p, horflag); 3923 window_resize_apply (p, horflag);
3943 adjust_glyphs (f); 3924 adjust_frame_glyphs (f);
3944 /* Set buffer of NEW to buffer of reference window. Don't run 3925 /* Set buffer of NEW to buffer of reference window. Don't run
3945 any hooks. */ 3926 any hooks. */
3946 set_window_buffer (new, r->contents, 0, 1); 3927 set_window_buffer (new, r->contents, 0, 1);
@@ -4072,7 +4053,7 @@ Signal an error when WINDOW is the only window on its frame. */)
4072 recombine_windows (sibling); 4053 recombine_windows (sibling);
4073 } 4054 }
4074 4055
4075 adjust_glyphs (f); 4056 adjust_frame_glyphs (f);
4076 4057
4077 if (!WINDOW_LIVE_P (FRAME_SELECTED_WINDOW (f))) 4058 if (!WINDOW_LIVE_P (FRAME_SELECTED_WINDOW (f)))
4078 /* We deleted the frame's selected window. */ 4059 /* We deleted the frame's selected window. */
@@ -4159,7 +4140,7 @@ grow_mini_window (struct window *w, int delta)
4159 w->total_lines -= XINT (value); 4140 w->total_lines -= XINT (value);
4160 /* Enforce full redisplay. FIXME: make it more selective. */ 4141 /* Enforce full redisplay. FIXME: make it more selective. */
4161 windows_or_buffers_changed++; 4142 windows_or_buffers_changed++;
4162 adjust_glyphs (f); 4143 adjust_frame_glyphs (f);
4163 unblock_input (); 4144 unblock_input ();
4164 } 4145 }
4165} 4146}
@@ -4193,7 +4174,7 @@ shrink_mini_window (struct window *w)
4193 w->total_lines = 1; 4174 w->total_lines = 1;
4194 /* Enforce full redisplay. FIXME: make it more selective. */ 4175 /* Enforce full redisplay. FIXME: make it more selective. */
4195 windows_or_buffers_changed++; 4176 windows_or_buffers_changed++;
4196 adjust_glyphs (f); 4177 adjust_frame_glyphs (f);
4197 unblock_input (); 4178 unblock_input ();
4198 } 4179 }
4199 /* If the above failed for whatever strange reason we must make a 4180 /* If the above failed for whatever strange reason we must make a
@@ -4234,7 +4215,7 @@ DEFUN ("resize-mini-window-internal", Fresize_mini_window_internal, Sresize_mini
4234 4215
4235 windows_or_buffers_changed++; 4216 windows_or_buffers_changed++;
4236 FRAME_WINDOW_SIZES_CHANGED (f) = 1; 4217 FRAME_WINDOW_SIZES_CHANGED (f) = 1;
4237 adjust_glyphs (f); 4218 adjust_frame_glyphs (f);
4238 unblock_input (); 4219 unblock_input ();
4239 4220
4240 run_window_configuration_change_hook (f); 4221 run_window_configuration_change_hook (f);
@@ -4505,7 +4486,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, int noerror)
4505 visible. */ 4486 visible. */
4506 w->vscroll = (it.last_visible_y 4487 w->vscroll = (it.last_visible_y
4507 - it.current_y + it.max_ascent + it.max_descent); 4488 - it.current_y + it.max_ascent + it.max_descent);
4508 adjust_glyphs (it.f); 4489 adjust_frame_glyphs (it.f);
4509 } 4490 }
4510 else 4491 else
4511 { 4492 {
@@ -5054,7 +5035,6 @@ displayed_window_lines (struct window *w)
5054{ 5035{
5055 struct it it; 5036 struct it it;
5056 struct text_pos start; 5037 struct text_pos start;
5057 ptrdiff_t charpos = marker_position (w->start);
5058 int height = window_box_height (w); 5038 int height = window_box_height (w);
5059 struct buffer *old_buffer; 5039 struct buffer *old_buffer;
5060 int bottom_y; 5040 int bottom_y;
@@ -5071,12 +5051,7 @@ displayed_window_lines (struct window *w)
5071 /* In case W->start is out of the accessible range, do something 5051 /* In case W->start is out of the accessible range, do something
5072 reasonable. This happens in Info mode when Info-scroll-down 5052 reasonable. This happens in Info mode when Info-scroll-down
5073 calls (recenter -1) while W->start is 1. */ 5053 calls (recenter -1) while W->start is 1. */
5074 if (charpos < BEGV) 5054 CLIP_TEXT_POS_FROM_MARKER (start, w->start);
5075 SET_TEXT_POS (start, BEGV, BEGV_BYTE);
5076 else if (charpos > ZV)
5077 SET_TEXT_POS (start, ZV, ZV_BYTE);
5078 else
5079 SET_TEXT_POS_FROM_MARKER (start, w->start);
5080 5055
5081 itdata = bidi_shelve_cache (); 5056 itdata = bidi_shelve_cache ();
5082 start_display (&it, w, start); 5057 start_display (&it, w, start);
@@ -5788,7 +5763,7 @@ the return value is nil. Otherwise the value is t. */)
5788 ++n; 5763 ++n;
5789 } 5764 }
5790 5765
5791 adjust_glyphs (f); 5766 adjust_frame_glyphs (f);
5792 unblock_input (); 5767 unblock_input ();
5793 5768
5794 /* Scan dead buffer windows. */ 5769 /* Scan dead buffer windows. */
@@ -6117,7 +6092,7 @@ apply_window_adjustment (struct window *w)
6117 clear_glyph_matrix (w->current_matrix); 6092 clear_glyph_matrix (w->current_matrix);
6118 w->window_end_valid = 0; 6093 w->window_end_valid = 0;
6119 windows_or_buffers_changed++; 6094 windows_or_buffers_changed++;
6120 adjust_glyphs (XFRAME (WINDOW_FRAME (w))); 6095 adjust_frame_glyphs (XFRAME (WINDOW_FRAME (w)));
6121} 6096}
6122 6097
6123 6098
@@ -6383,7 +6358,7 @@ If PIXELS-P is non-nil, the return value is VSCROLL. */)
6383 /* Adjust glyph matrix of the frame if the virtual display 6358 /* Adjust glyph matrix of the frame if the virtual display
6384 area becomes larger than before. */ 6359 area becomes larger than before. */
6385 if (w->vscroll < 0 && w->vscroll < old_dy) 6360 if (w->vscroll < 0 && w->vscroll < old_dy)
6386 adjust_glyphs (f); 6361 adjust_frame_glyphs (f);
6387 6362
6388 /* Prevent redisplay shortcuts. */ 6363 /* Prevent redisplay shortcuts. */
6389 XBUFFER (w->contents)->prevent_redisplay_optimizations_p = 1; 6364 XBUFFER (w->contents)->prevent_redisplay_optimizations_p = 1;
diff --git a/src/window.h b/src/window.h
index de77dcabc85..f5ae81149b3 100644
--- a/src/window.h
+++ b/src/window.h
@@ -236,6 +236,9 @@ struct window
236 /* Where the cursor actually is. */ 236 /* Where the cursor actually is. */
237 struct cursor_pos phys_cursor; 237 struct cursor_pos phys_cursor;
238 238
239 /* Internally used for redisplay purposes. */
240 struct cursor_pos output_cursor;
241
239 /* Vertical cursor position as of last update that completed 242 /* Vertical cursor position as of last update that completed
240 without pause. This is the position of last_point. */ 243 without pause. This is the position of last_point. */
241 int last_cursor_vpos; 244 int last_cursor_vpos;
@@ -261,6 +264,12 @@ struct window
261 A value of -1 means use frame values. */ 264 A value of -1 means use frame values. */
262 int scroll_bar_width; 265 int scroll_bar_width;
263 266
267 /* Effective height of the mode line, or -1 if not known. */
268 int mode_line_height;
269
270 /* Effective height of the header line, or -1 if not known. */
271 int header_line_height;
272
264 /* Z - the buffer position of the last glyph in the current 273 /* Z - the buffer position of the last glyph in the current
265 matrix of W. Only valid if window_end_valid is nonzero. */ 274 matrix of W. Only valid if window_end_valid is nonzero. */
266 ptrdiff_t window_end_pos; 275 ptrdiff_t window_end_pos;
@@ -856,14 +865,6 @@ extern Lisp_Object minibuf_window;
856 865
857extern Lisp_Object minibuf_selected_window; 866extern Lisp_Object minibuf_selected_window;
858 867
859/* Window that the mouse is over (nil if no mouse support). */
860
861extern Lisp_Object Vmouse_window;
862
863/* Last mouse-click event (nil if no mouse support). */
864
865extern Lisp_Object Vmouse_event;
866
867extern Lisp_Object make_window (void); 868extern Lisp_Object make_window (void);
868extern Lisp_Object window_from_coordinates (struct frame *, int, int, 869extern Lisp_Object window_from_coordinates (struct frame *, int, int,
869 enum window_part *, bool); 870 enum window_part *, bool);
@@ -956,6 +957,22 @@ extern void init_window (void);
956extern void syms_of_window (void); 957extern void syms_of_window (void);
957extern void keys_of_window (void); 958extern void keys_of_window (void);
958 959
960/* Move cursor to row/column position VPOS/HPOS, pixel coordinates
961 Y/X. HPOS/VPOS are window-relative row and column numbers and X/Y
962 are window-relative pixel positions. This is always done during
963 window update, so the position is the future output cursor position
964 for currently updated window W. */
965
966WINDOW_INLINE void
967output_cursor_to (struct window *w, int vpos, int hpos, int y, int x)
968{
969 eassert (w);
970 w->output_cursor.hpos = hpos;
971 w->output_cursor.vpos = vpos;
972 w->output_cursor.x = x;
973 w->output_cursor.y = y;
974}
975
959INLINE_HEADER_END 976INLINE_HEADER_END
960 977
961#endif /* not WINDOW_H_INCLUDED */ 978#endif /* not WINDOW_H_INCLUDED */
diff --git a/src/xdisp.c b/src/xdisp.c
index e3a6eca387f..b9a16ffcc43 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -299,19 +299,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
299#include "font.h" 299#include "font.h"
300#include "fontset.h" 300#include "fontset.h"
301#include "blockinput.h" 301#include "blockinput.h"
302 302#ifdef HAVE_WINDOW_SYSTEM
303#ifdef HAVE_X_WINDOWS 303#include TERM_HEADER
304#include "xterm.h" 304#endif /* HAVE_WINDOW_SYSTEM */
305#endif
306#ifdef HAVE_NTGUI
307#include "w32term.h"
308#endif
309#ifdef HAVE_NS
310#include "nsterm.h"
311#endif
312#ifdef USE_GTK
313#include "gtkutil.h"
314#endif
315 305
316#include "font.h" 306#include "font.h"
317#ifdef HAVE_XWIDGETS 307#ifdef HAVE_XWIDGETS
@@ -526,10 +516,6 @@ int update_mode_lines;
526 516
527int windows_or_buffers_changed; 517int windows_or_buffers_changed;
528 518
529/* Nonzero means a frame's cursor type has been changed. */
530
531static int cursor_type_changed;
532
533/* Nonzero after display_mode_line if %l was used and it displayed a 519/* Nonzero after display_mode_line if %l was used and it displayed a
534 line number. */ 520 line number. */
535 521
@@ -587,12 +573,6 @@ static int last_height;
587 573
588int help_echo_showing_p; 574int help_echo_showing_p;
589 575
590/* If >= 0, computed, exact values of mode-line and header-line height
591 to use in the macros CURRENT_MODE_LINE_HEIGHT and
592 CURRENT_HEADER_LINE_HEIGHT. */
593
594int current_mode_line_height, current_header_line_height;
595
596/* The maximum distance to look ahead for text properties. Values 576/* The maximum distance to look ahead for text properties. Values
597 that are too small let us call compute_char_face and similar 577 that are too small let us call compute_char_face and similar
598 functions too often which is expensive. Values that are too large 578 functions too often which is expensive. Values that are too large
@@ -764,6 +744,8 @@ Lisp_Object previous_help_echo_string;
764 744
765/* Platform-independent portion of hourglass implementation. */ 745/* Platform-independent portion of hourglass implementation. */
766 746
747#ifdef HAVE_WINDOW_SYSTEM
748
767/* Non-zero means an hourglass cursor is currently shown. */ 749/* Non-zero means an hourglass cursor is currently shown. */
768int hourglass_shown_p; 750int hourglass_shown_p;
769 751
@@ -771,6 +753,8 @@ int hourglass_shown_p;
771 an hourglass cursor on all frames. */ 753 an hourglass cursor on all frames. */
772struct atimer *hourglass_atimer; 754struct atimer *hourglass_atimer;
773 755
756#endif /* HAVE_WINDOW_SYSTEM */
757
774/* Name of the face used to display glyphless characters. */ 758/* Name of the face used to display glyphless characters. */
775Lisp_Object Qglyphless_char; 759Lisp_Object Qglyphless_char;
776 760
@@ -780,14 +764,17 @@ static Lisp_Object Qglyphless_char_display;
780/* Method symbols for Vglyphless_char_display. */ 764/* Method symbols for Vglyphless_char_display. */
781static Lisp_Object Qhex_code, Qempty_box, Qthin_space, Qzero_width; 765static Lisp_Object Qhex_code, Qempty_box, Qthin_space, Qzero_width;
782 766
783/* Default pixel width of `thin-space' display method. */
784#define THIN_SPACE_WIDTH 1
785
786/* Default number of seconds to wait before displaying an hourglass 767/* Default number of seconds to wait before displaying an hourglass
787 cursor. */ 768 cursor. */
788#define DEFAULT_HOURGLASS_DELAY 1 769#define DEFAULT_HOURGLASS_DELAY 1
789 770
790 771#ifdef HAVE_WINDOW_SYSTEM
772
773/* Default pixel width of `thin-space' display method. */
774#define THIN_SPACE_WIDTH 1
775
776#endif /* HAVE_WINDOW_SYSTEM */
777
791/* Function prototypes. */ 778/* Function prototypes. */
792 779
793static void setup_for_ellipsis (struct it *, int); 780static void setup_for_ellipsis (struct it *, int);
@@ -973,12 +960,12 @@ window_text_bottom_y (struct window *w)
973 return height; 960 return height;
974} 961}
975 962
976/* Return the pixel width of display area AREA of window W. AREA < 0 963/* Return the pixel width of display area AREA of window W.
977 means return the total width of W, not including fringes to 964 ANY_AREA means return the total width of W, not including
978 the left and right of the window. */ 965 fringes to the left and right of the window. */
979 966
980int 967int
981window_box_width (struct window *w, int area) 968window_box_width (struct window *w, enum glyph_row_area area)
982{ 969{
983 int cols = w->total_cols; 970 int cols = w->total_cols;
984 int pixels = 0; 971 int pixels = 0;
@@ -1056,11 +1043,11 @@ window_box_height (struct window *w)
1056} 1043}
1057 1044
1058/* Return the window-relative coordinate of the left edge of display 1045/* Return the window-relative coordinate of the left edge of display
1059 area AREA of window W. AREA < 0 means return the left edge of the 1046 area AREA of window W. ANY_AREA means return the left edge of the
1060 whole window, to the right of the left fringe of W. */ 1047 whole window, to the right of the left fringe of W. */
1061 1048
1062int 1049int
1063window_box_left_offset (struct window *w, int area) 1050window_box_left_offset (struct window *w, enum glyph_row_area area)
1064{ 1051{
1065 int x; 1052 int x;
1066 1053
@@ -1088,21 +1075,21 @@ window_box_left_offset (struct window *w, int area)
1088 1075
1089 1076
1090/* Return the window-relative coordinate of the right edge of display 1077/* Return the window-relative coordinate of the right edge of display
1091 area AREA of window W. AREA < 0 means return the right edge of the 1078 area AREA of window W. ANY_AREA means return the right edge of the
1092 whole window, to the left of the right fringe of W. */ 1079 whole window, to the left of the right fringe of W. */
1093 1080
1094int 1081int
1095window_box_right_offset (struct window *w, int area) 1082window_box_right_offset (struct window *w, enum glyph_row_area area)
1096{ 1083{
1097 return window_box_left_offset (w, area) + window_box_width (w, area); 1084 return window_box_left_offset (w, area) + window_box_width (w, area);
1098} 1085}
1099 1086
1100/* Return the frame-relative coordinate of the left edge of display 1087/* Return the frame-relative coordinate of the left edge of display
1101 area AREA of window W. AREA < 0 means return the left edge of the 1088 area AREA of window W. ANY_AREA means return the left edge of the
1102 whole window, to the right of the left fringe of W. */ 1089 whole window, to the right of the left fringe of W. */
1103 1090
1104int 1091int
1105window_box_left (struct window *w, int area) 1092window_box_left (struct window *w, enum glyph_row_area area)
1106{ 1093{
1107 struct frame *f = XFRAME (w->frame); 1094 struct frame *f = XFRAME (w->frame);
1108 int x; 1095 int x;
@@ -1118,25 +1105,25 @@ window_box_left (struct window *w, int area)
1118 1105
1119 1106
1120/* Return the frame-relative coordinate of the right edge of display 1107/* Return the frame-relative coordinate of the right edge of display
1121 area AREA of window W. AREA < 0 means return the right edge of the 1108 area AREA of window W. ANY_AREA means return the right edge of the
1122 whole window, to the left of the right fringe of W. */ 1109 whole window, to the left of the right fringe of W. */
1123 1110
1124int 1111int
1125window_box_right (struct window *w, int area) 1112window_box_right (struct window *w, enum glyph_row_area area)
1126{ 1113{
1127 return window_box_left (w, area) + window_box_width (w, area); 1114 return window_box_left (w, area) + window_box_width (w, area);
1128} 1115}
1129 1116
1130/* Get the bounding box of the display area AREA of window W, without 1117/* Get the bounding box of the display area AREA of window W, without
1131 mode lines, in frame-relative coordinates. AREA < 0 means the 1118 mode lines, in frame-relative coordinates. ANY_AREA means the
1132 whole window, not including the left and right fringes of 1119 whole window, not including the left and right fringes of
1133 the window. Return in *BOX_X and *BOX_Y the frame-relative pixel 1120 the window. Return in *BOX_X and *BOX_Y the frame-relative pixel
1134 coordinates of the upper-left corner of the box. Return in 1121 coordinates of the upper-left corner of the box. Return in
1135 *BOX_WIDTH, and *BOX_HEIGHT the pixel width and height of the box. */ 1122 *BOX_WIDTH, and *BOX_HEIGHT the pixel width and height of the box. */
1136 1123
1137void 1124void
1138window_box (struct window *w, int area, int *box_x, int *box_y, 1125window_box (struct window *w, enum glyph_row_area area, int *box_x,
1139 int *box_width, int *box_height) 1126 int *box_y, int *box_width, int *box_height)
1140{ 1127{
1141 if (box_width) 1128 if (box_width)
1142 *box_width = window_box_width (w, area); 1129 *box_width = window_box_width (w, area);
@@ -1152,27 +1139,27 @@ window_box (struct window *w, int area, int *box_x, int *box_y,
1152 } 1139 }
1153} 1140}
1154 1141
1142#ifdef HAVE_WINDOW_SYSTEM
1155 1143
1156/* Get the bounding box of the display area AREA of window W, without 1144/* Get the bounding box of the display area AREA of window W, without
1157 mode lines. AREA < 0 means the whole window, not including the 1145 mode lines and both fringes of the window. Return in *TOP_LEFT_X
1158 left and right fringe of the window. Return in *TOP_LEFT_X
1159 and TOP_LEFT_Y the frame-relative pixel coordinates of the 1146 and TOP_LEFT_Y the frame-relative pixel coordinates of the
1160 upper-left corner of the box. Return in *BOTTOM_RIGHT_X, and 1147 upper-left corner of the box. Return in *BOTTOM_RIGHT_X, and
1161 *BOTTOM_RIGHT_Y the coordinates of the bottom-right corner of the 1148 *BOTTOM_RIGHT_Y the coordinates of the bottom-right corner of the
1162 box. */ 1149 box. */
1163 1150
1164static void 1151static void
1165window_box_edges (struct window *w, int area, int *top_left_x, int *top_left_y, 1152window_box_edges (struct window *w, int *top_left_x, int *top_left_y,
1166 int *bottom_right_x, int *bottom_right_y) 1153 int *bottom_right_x, int *bottom_right_y)
1167{ 1154{
1168 window_box (w, area, top_left_x, top_left_y, bottom_right_x, 1155 window_box (w, ANY_AREA, top_left_x, top_left_y,
1169 bottom_right_y); 1156 bottom_right_x, bottom_right_y);
1170 *bottom_right_x += *top_left_x; 1157 *bottom_right_x += *top_left_x;
1171 *bottom_right_y += *top_left_y; 1158 *bottom_right_y += *top_left_y;
1172} 1159}
1173 1160
1161#endif /* HAVE_WINDOW_SYSTEM */
1174 1162
1175
1176/*********************************************************************** 1163/***********************************************************************
1177 Utilities 1164 Utilities
1178 ***********************************************************************/ 1165 ***********************************************************************/
@@ -1359,12 +1346,12 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
1359 1346
1360 /* Compute exact mode line heights. */ 1347 /* Compute exact mode line heights. */
1361 if (WINDOW_WANTS_MODELINE_P (w)) 1348 if (WINDOW_WANTS_MODELINE_P (w))
1362 current_mode_line_height 1349 w->mode_line_height
1363 = display_mode_line (w, CURRENT_MODE_LINE_FACE_ID (w), 1350 = display_mode_line (w, CURRENT_MODE_LINE_FACE_ID (w),
1364 BVAR (current_buffer, mode_line_format)); 1351 BVAR (current_buffer, mode_line_format));
1365 1352
1366 if (WINDOW_WANTS_HEADER_LINE_P (w)) 1353 if (WINDOW_WANTS_HEADER_LINE_P (w))
1367 current_header_line_height 1354 w->header_line_height
1368 = display_mode_line (w, HEADER_LINE_FACE_ID, 1355 = display_mode_line (w, HEADER_LINE_FACE_ID,
1369 BVAR (current_buffer, header_line_format)); 1356 BVAR (current_buffer, header_line_format));
1370 1357
@@ -1657,8 +1644,6 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
1657 if (old_buffer) 1644 if (old_buffer)
1658 set_buffer_internal_1 (old_buffer); 1645 set_buffer_internal_1 (old_buffer);
1659 1646
1660 current_header_line_height = current_mode_line_height = -1;
1661
1662 if (visible_p && w->hscroll > 0) 1647 if (visible_p && w->hscroll > 0)
1663 *x -= 1648 *x -=
1664 window_hscroll_limited (w, WINDOW_XFRAME (w)) 1649 window_hscroll_limited (w, WINDOW_XFRAME (w))
@@ -6721,17 +6706,59 @@ lookup_glyphless_char_display (int c, struct it *it)
6721 return glyphless_method; 6706 return glyphless_method;
6722} 6707}
6723 6708
6724/* Load IT's display element fields with information about the next 6709/* Merge escape glyph face and cache the result. */
6725 display element from the current position of IT. Value is zero if
6726 end of buffer (or C string) is reached. */
6727 6710
6728static struct frame *last_escape_glyph_frame = NULL; 6711static struct frame *last_escape_glyph_frame = NULL;
6729static int last_escape_glyph_face_id = (1 << FACE_ID_BITS); 6712static int last_escape_glyph_face_id = (1 << FACE_ID_BITS);
6730static int last_escape_glyph_merged_face_id = 0; 6713static int last_escape_glyph_merged_face_id = 0;
6731 6714
6732struct frame *last_glyphless_glyph_frame = NULL; 6715static int
6733int last_glyphless_glyph_face_id = (1 << FACE_ID_BITS); 6716merge_escape_glyph_face (struct it *it)
6734int last_glyphless_glyph_merged_face_id = 0; 6717{
6718 int face_id;
6719
6720 if (it->f == last_escape_glyph_frame
6721 && it->face_id == last_escape_glyph_face_id)
6722 face_id = last_escape_glyph_merged_face_id;
6723 else
6724 {
6725 /* Merge the `escape-glyph' face into the current face. */
6726 face_id = merge_faces (it->f, Qescape_glyph, 0, it->face_id);
6727 last_escape_glyph_frame = it->f;
6728 last_escape_glyph_face_id = it->face_id;
6729 last_escape_glyph_merged_face_id = face_id;
6730 }
6731 return face_id;
6732}
6733
6734/* Likewise for glyphless glyph face. */
6735
6736static struct frame *last_glyphless_glyph_frame = NULL;
6737static int last_glyphless_glyph_face_id = (1 << FACE_ID_BITS);
6738static int last_glyphless_glyph_merged_face_id = 0;
6739
6740int
6741merge_glyphless_glyph_face (struct it *it)
6742{
6743 int face_id;
6744
6745 if (it->f == last_glyphless_glyph_frame
6746 && it->face_id == last_glyphless_glyph_face_id)
6747 face_id = last_glyphless_glyph_merged_face_id;
6748 else
6749 {
6750 /* Merge the `glyphless-char' face into the current face. */
6751 face_id = merge_faces (it->f, Qglyphless_char, 0, it->face_id);
6752 last_glyphless_glyph_frame = it->f;
6753 last_glyphless_glyph_face_id = it->face_id;
6754 last_glyphless_glyph_merged_face_id = face_id;
6755 }
6756 return face_id;
6757}
6758
6759/* Load IT's display element fields with information about the next
6760 display element from the current position of IT. Value is zero if
6761 end of buffer (or C string) is reached. */
6735 6762
6736static int 6763static int
6737get_next_display_element (struct it *it) 6764get_next_display_element (struct it *it)
@@ -6879,24 +6906,10 @@ get_next_display_element (struct it *it)
6879 g = GLYPH_CODE_CHAR (gc); 6906 g = GLYPH_CODE_CHAR (gc);
6880 lface_id = GLYPH_CODE_FACE (gc); 6907 lface_id = GLYPH_CODE_FACE (gc);
6881 } 6908 }
6882 if (lface_id) 6909
6883 { 6910 face_id = (lface_id
6884 face_id = merge_faces (it->f, Qt, lface_id, it->face_id); 6911 ? merge_faces (it->f, Qt, lface_id, it->face_id)
6885 } 6912 : merge_escape_glyph_face (it));
6886 else if (it->f == last_escape_glyph_frame
6887 && it->face_id == last_escape_glyph_face_id)
6888 {
6889 face_id = last_escape_glyph_merged_face_id;
6890 }
6891 else
6892 {
6893 /* Merge the escape-glyph face into the current face. */
6894 face_id = merge_faces (it->f, Qescape_glyph, 0,
6895 it->face_id);
6896 last_escape_glyph_frame = it->f;
6897 last_escape_glyph_face_id = it->face_id;
6898 last_escape_glyph_merged_face_id = face_id;
6899 }
6900 6913
6901 XSETINT (it->ctl_chars[0], g); 6914 XSETINT (it->ctl_chars[0], g);
6902 XSETINT (it->ctl_chars[1], c ^ 0100); 6915 XSETINT (it->ctl_chars[1], c ^ 0100);
@@ -6928,27 +6941,10 @@ get_next_display_element (struct it *it)
6928 escape_glyph = GLYPH_CODE_CHAR (gc); 6941 escape_glyph = GLYPH_CODE_CHAR (gc);
6929 lface_id = GLYPH_CODE_FACE (gc); 6942 lface_id = GLYPH_CODE_FACE (gc);
6930 } 6943 }
6931 if (lface_id) 6944
6932 { 6945 face_id = (lface_id
6933 /* The display table specified a face. 6946 ? merge_faces (it->f, Qt, lface_id, it->face_id)
6934 Merge it into face_id and also into escape_glyph. */ 6947 : merge_escape_glyph_face (it));
6935 face_id = merge_faces (it->f, Qt, lface_id,
6936 it->face_id);
6937 }
6938 else if (it->f == last_escape_glyph_frame
6939 && it->face_id == last_escape_glyph_face_id)
6940 {
6941 face_id = last_escape_glyph_merged_face_id;
6942 }
6943 else
6944 {
6945 /* Merge the escape-glyph face into the current face. */
6946 face_id = merge_faces (it->f, Qescape_glyph, 0,
6947 it->face_id);
6948 last_escape_glyph_frame = it->f;
6949 last_escape_glyph_face_id = it->face_id;
6950 last_escape_glyph_merged_face_id = face_id;
6951 }
6952 6948
6953 /* Draw non-ASCII hyphen with just highlighting: */ 6949 /* Draw non-ASCII hyphen with just highlighting: */
6954 6950
@@ -10827,11 +10823,9 @@ clear_garbaged_frames (void)
10827 if (FRAME_VISIBLE_P (f) && FRAME_GARBAGED_P (f)) 10823 if (FRAME_VISIBLE_P (f) && FRAME_GARBAGED_P (f))
10828 { 10824 {
10829 if (f->resized_p) 10825 if (f->resized_p)
10830 { 10826 redraw_frame (f);
10831 redraw_frame (f); 10827 else
10832 f->force_flush_display_p = 1; 10828 clear_current_matrices (f);
10833 }
10834 clear_current_matrices (f);
10835 changed_count++; 10829 changed_count++;
10836 f->garbaged = 0; 10830 f->garbaged = 0;
10837 f->resized_p = 0; 10831 f->resized_p = 0;
@@ -10919,7 +10913,7 @@ echo_area_display (int update_frame_p)
10919 Can do with a display update of the echo area, 10913 Can do with a display update of the echo area,
10920 unless we displayed some mode lines. */ 10914 unless we displayed some mode lines. */
10921 update_single_window (w, 1); 10915 update_single_window (w, 1);
10922 FRAME_RIF (f)->flush_display (f); 10916 flush_frame (f);
10923 } 10917 }
10924 else 10918 else
10925 update_frame (f, 1, 1); 10919 update_frame (f, 1, 1);
@@ -11501,62 +11495,6 @@ update_menu_bar (struct frame *f, int save_match_data, int hooks_run)
11501 return hooks_run; 11495 return hooks_run;
11502} 11496}
11503 11497
11504
11505
11506/***********************************************************************
11507 Output Cursor
11508 ***********************************************************************/
11509
11510#ifdef HAVE_WINDOW_SYSTEM
11511
11512/* EXPORT:
11513 Nominal cursor position -- where to draw output.
11514 HPOS and VPOS are window relative glyph matrix coordinates.
11515 X and Y are window relative pixel coordinates. */
11516
11517struct cursor_pos output_cursor;
11518
11519
11520/* EXPORT:
11521 Set the global variable output_cursor to CURSOR. All cursor
11522 positions are relative to currently updated window. */
11523
11524void
11525set_output_cursor (struct cursor_pos *cursor)
11526{
11527 output_cursor.hpos = cursor->hpos;
11528 output_cursor.vpos = cursor->vpos;
11529 output_cursor.x = cursor->x;
11530 output_cursor.y = cursor->y;
11531}
11532
11533
11534/* EXPORT for RIF:
11535 Set a nominal cursor position.
11536
11537 HPOS and VPOS are column/row positions in a window glyph matrix.
11538 X and Y are window text area relative pixel positions.
11539
11540 This is always done during window update, so the position is the
11541 future output cursor position for currently updated window W.
11542 NOTE: W is used only to check whether this function is called
11543 in a consistent manner via the redisplay interface. */
11544
11545void
11546x_cursor_to (struct window *w, int vpos, int hpos, int y, int x)
11547{
11548 eassert (w);
11549
11550 /* Set the output cursor. */
11551 output_cursor.hpos = hpos;
11552 output_cursor.vpos = vpos;
11553 output_cursor.x = x;
11554 output_cursor.y = y;
11555}
11556
11557#endif /* HAVE_WINDOW_SYSTEM */
11558
11559
11560/*********************************************************************** 11498/***********************************************************************
11561 Tool-bars 11499 Tool-bars
11562 ***********************************************************************/ 11500 ***********************************************************************/
@@ -12108,7 +12046,7 @@ redisplay_tool_bar (struct frame *f)
12108 if (WINDOW_TOTAL_LINES (w) != old_height) 12046 if (WINDOW_TOTAL_LINES (w) != old_height)
12109 { 12047 {
12110 clear_glyph_matrix (w->desired_matrix); 12048 clear_glyph_matrix (w->desired_matrix);
12111 fonts_changed_p = 1; 12049 f->fonts_changed = 1;
12112 return 1; 12050 return 1;
12113 } 12051 }
12114 } 12052 }
@@ -12209,7 +12147,7 @@ redisplay_tool_bar (struct frame *f)
12209 { 12147 {
12210 clear_glyph_matrix (w->desired_matrix); 12148 clear_glyph_matrix (w->desired_matrix);
12211 f->n_tool_bar_rows = nrows; 12149 f->n_tool_bar_rows = nrows;
12212 fonts_changed_p = 1; 12150 f->fonts_changed = 1;
12213 return 1; 12151 return 1;
12214 } 12152 }
12215 } 12153 }
@@ -13095,15 +13033,6 @@ redisplay_internal (void)
13095 last_glyphless_glyph_frame = NULL; 13033 last_glyphless_glyph_frame = NULL;
13096 last_glyphless_glyph_face_id = (1 << FACE_ID_BITS); 13034 last_glyphless_glyph_face_id = (1 << FACE_ID_BITS);
13097 13035
13098 /* If new fonts have been loaded that make a glyph matrix adjustment
13099 necessary, do it. */
13100 if (fonts_changed_p)
13101 {
13102 adjust_glyphs (NULL);
13103 ++windows_or_buffers_changed;
13104 fonts_changed_p = 0;
13105 }
13106
13107 /* If face_change_count is non-zero, init_iterator will free all 13036 /* If face_change_count is non-zero, init_iterator will free all
13108 realized faces, which includes the faces referenced from current 13037 realized faces, which includes the faces referenced from current
13109 matrices. So, we can't reuse current matrices in this case. */ 13038 matrices. So, we can't reuse current matrices in this case. */
@@ -13134,7 +13063,19 @@ redisplay_internal (void)
13134 struct frame *f = XFRAME (frame); 13063 struct frame *f = XFRAME (frame);
13135 13064
13136 if (FRAME_VISIBLE_P (f)) 13065 if (FRAME_VISIBLE_P (f))
13137 ++number_of_visible_frames; 13066 {
13067 ++number_of_visible_frames;
13068 /* Adjust matrices for visible frames only. */
13069 if (f->fonts_changed)
13070 {
13071 adjust_frame_glyphs (f);
13072 f->fonts_changed = 0;
13073 }
13074 /* If cursor type has been changed on the frame
13075 other than selected, consider all frames. */
13076 if (f != sf && f->cursor_type_changed)
13077 update_mode_lines++;
13078 }
13138 clear_desired_matrices (f); 13079 clear_desired_matrices (f);
13139 } 13080 }
13140 13081
@@ -13183,8 +13124,7 @@ redisplay_internal (void)
13183 } 13124 }
13184 13125
13185 consider_all_windows_p = (update_mode_lines 13126 consider_all_windows_p = (update_mode_lines
13186 || buffer_shared_and_changed () 13127 || buffer_shared_and_changed ());
13187 || cursor_type_changed);
13188 13128
13189 /* If specs for an arrow have changed, do thorough redisplay 13129 /* If specs for an arrow have changed, do thorough redisplay
13190 to ensure we remove any arrow that should no longer exist. */ 13130 to ensure we remove any arrow that should no longer exist. */
@@ -13218,9 +13158,7 @@ redisplay_internal (void)
13218 if (!display_last_displayed_message_p) 13158 if (!display_last_displayed_message_p)
13219 message_cleared_p = 0; 13159 message_cleared_p = 0;
13220 13160
13221 if (fonts_changed_p) 13161 if (window_height_changed_p)
13222 goto retry;
13223 else if (window_height_changed_p)
13224 { 13162 {
13225 consider_all_windows_p = 1; 13163 consider_all_windows_p = 1;
13226 ++update_mode_lines; 13164 ++update_mode_lines;
@@ -13277,6 +13215,7 @@ redisplay_internal (void)
13277 && !current_buffer->prevent_redisplay_optimizations_p 13215 && !current_buffer->prevent_redisplay_optimizations_p
13278 && FRAME_VISIBLE_P (XFRAME (w->frame)) 13216 && FRAME_VISIBLE_P (XFRAME (w->frame))
13279 && !FRAME_OBSCURED_P (XFRAME (w->frame)) 13217 && !FRAME_OBSCURED_P (XFRAME (w->frame))
13218 && !XFRAME (w->frame)->cursor_type_changed
13280 /* Make sure recorded data applies to current buffer, etc. */ 13219 /* Make sure recorded data applies to current buffer, etc. */
13281 && this_line_buffer == current_buffer 13220 && this_line_buffer == current_buffer
13282 && match_p 13221 && match_p
@@ -13502,6 +13441,8 @@ redisplay_internal (void)
13502 && !EQ (FRAME_TTY (f)->top_frame, frame)) 13441 && !EQ (FRAME_TTY (f)->top_frame, frame))
13503 continue; 13442 continue;
13504 13443
13444 retry_frame:
13445
13505 if (FRAME_WINDOW_P (f) || FRAME_TERMCAP_P (f) || f == sf) 13446 if (FRAME_WINDOW_P (f) || FRAME_TERMCAP_P (f) || f == sf)
13506 { 13447 {
13507 /* Mark all the scroll bars to be removed; we'll redeem 13448 /* Mark all the scroll bars to be removed; we'll redeem
@@ -13521,20 +13462,22 @@ redisplay_internal (void)
13521 if (FRAME_TERMINAL (f)->judge_scroll_bars_hook) 13462 if (FRAME_TERMINAL (f)->judge_scroll_bars_hook)
13522 FRAME_TERMINAL (f)->judge_scroll_bars_hook (f); 13463 FRAME_TERMINAL (f)->judge_scroll_bars_hook (f);
13523 13464
13524 /* If fonts changed, display again. */
13525 /* ??? rms: I suspect it is a mistake to jump all the way
13526 back to retry here. It should just retry this frame. */
13527 if (fonts_changed_p)
13528 goto retry;
13529
13530 if (FRAME_VISIBLE_P (f) && !FRAME_OBSCURED_P (f)) 13465 if (FRAME_VISIBLE_P (f) && !FRAME_OBSCURED_P (f))
13531 { 13466 {
13467 /* If fonts changed on visible frame, display again. */
13468 if (f->fonts_changed)
13469 {
13470 adjust_frame_glyphs (f);
13471 f->fonts_changed = 0;
13472 goto retry_frame;
13473 }
13474
13532 /* See if we have to hscroll. */ 13475 /* See if we have to hscroll. */
13533 if (!f->already_hscrolled_p) 13476 if (!f->already_hscrolled_p)
13534 { 13477 {
13535 f->already_hscrolled_p = 1; 13478 f->already_hscrolled_p = 1;
13536 if (hscroll_windows (f->root_window)) 13479 if (hscroll_windows (f->root_window))
13537 goto retry; 13480 goto retry_frame;
13538 } 13481 }
13539 13482
13540 /* Prevent various kinds of signals during display 13483 /* Prevent various kinds of signals during display
@@ -13548,6 +13491,7 @@ redisplay_internal (void)
13548 /* Update the display. */ 13491 /* Update the display. */
13549 set_window_update_flags (XWINDOW (f->root_window), 1); 13492 set_window_update_flags (XWINDOW (f->root_window), 1);
13550 pending |= update_frame (f, 0, 0); 13493 pending |= update_frame (f, 0, 0);
13494 f->cursor_type_changed = 0;
13551 f->updated_p = 1; 13495 f->updated_p = 1;
13552 } 13496 }
13553 } 13497 }
@@ -13592,7 +13536,7 @@ redisplay_internal (void)
13592 13536
13593 update: 13537 update:
13594 /* If fonts changed, display again. */ 13538 /* If fonts changed, display again. */
13595 if (fonts_changed_p) 13539 if (sf->fonts_changed)
13596 goto retry; 13540 goto retry;
13597 13541
13598 /* Prevent various kinds of signals during display update. 13542 /* Prevent various kinds of signals during display update.
@@ -13609,6 +13553,7 @@ redisplay_internal (void)
13609 13553
13610 XWINDOW (selected_window)->must_be_updated_p = 1; 13554 XWINDOW (selected_window)->must_be_updated_p = 1;
13611 pending = update_frame (sf, 0, 0); 13555 pending = update_frame (sf, 0, 0);
13556 sf->cursor_type_changed = 0;
13612 } 13557 }
13613 13558
13614 /* We may have called echo_area_display at the top of this 13559 /* We may have called echo_area_display at the top of this
@@ -13623,6 +13568,7 @@ redisplay_internal (void)
13623 { 13568 {
13624 XWINDOW (mini_window)->must_be_updated_p = 1; 13569 XWINDOW (mini_window)->must_be_updated_p = 1;
13625 pending |= update_frame (mini_frame, 0, 0); 13570 pending |= update_frame (mini_frame, 0, 0);
13571 mini_frame->cursor_type_changed = 0;
13626 if (!pending && hscroll_windows (mini_window)) 13572 if (!pending && hscroll_windows (mini_window))
13627 goto retry; 13573 goto retry;
13628 } 13574 }
@@ -13663,7 +13609,6 @@ redisplay_internal (void)
13663 13609
13664 update_mode_lines = 0; 13610 update_mode_lines = 0;
13665 windows_or_buffers_changed = 0; 13611 windows_or_buffers_changed = 0;
13666 cursor_type_changed = 0;
13667 } 13612 }
13668 13613
13669 /* Start SIGIO interrupts coming again. Having them off during the 13614 /* Start SIGIO interrupts coming again. Having them off during the
@@ -13761,9 +13706,7 @@ redisplay_preserve_echo_area (int from_where)
13761 else 13706 else
13762 redisplay_internal (); 13707 redisplay_internal ();
13763 13708
13764 if (FRAME_RIF (SELECTED_FRAME ()) != NULL 13709 flush_frame (SELECTED_FRAME ());
13765 && FRAME_RIF (SELECTED_FRAME ())->flush_display_optional)
13766 FRAME_RIF (SELECTED_FRAME ())->flush_display_optional (NULL);
13767} 13710}
13768 13711
13769 13712
@@ -15105,7 +15048,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste
15105 cases. */ 15048 cases. */
15106 && !update_mode_lines 15049 && !update_mode_lines
15107 && !windows_or_buffers_changed 15050 && !windows_or_buffers_changed
15108 && !cursor_type_changed 15051 && !f->cursor_type_changed
15109 /* Can't use this case if highlighting a region. When a 15052 /* Can't use this case if highlighting a region. When a
15110 region exists, cursor movement has to do more than just 15053 region exists, cursor movement has to do more than just
15111 set the cursor. */ 15054 set the cursor. */
@@ -15452,9 +15395,8 @@ set_vertical_scroll_bar (struct window *w)
15452/* Redisplay leaf window WINDOW. JUST_THIS_ONE_P non-zero means only 15395/* Redisplay leaf window WINDOW. JUST_THIS_ONE_P non-zero means only
15453 selected_window is redisplayed. 15396 selected_window is redisplayed.
15454 15397
15455 We can return without actually redisplaying the window if 15398 We can return without actually redisplaying the window if fonts has been
15456 fonts_changed_p. In that case, redisplay_internal will 15399 changed on window's frame. In that case, redisplay_internal will retry. */
15457 retry. */
15458 15400
15459static void 15401static void
15460redisplay_window (Lisp_Object window, int just_this_one_p) 15402redisplay_window (Lisp_Object window, int just_this_one_p)
@@ -15839,7 +15781,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
15839 debug_method_add (w, "try_window_id %d", tem); 15781 debug_method_add (w, "try_window_id %d", tem);
15840#endif 15782#endif
15841 15783
15842 if (fonts_changed_p) 15784 if (f->fonts_changed)
15843 goto need_larger_matrices; 15785 goto need_larger_matrices;
15844 if (tem > 0) 15786 if (tem > 0)
15845 goto done; 15787 goto done;
@@ -15909,12 +15851,12 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
15909 IF_DEBUG (debug_method_add (w, "1")); 15851 IF_DEBUG (debug_method_add (w, "1"));
15910 if (try_window (window, startp, TRY_WINDOW_CHECK_MARGINS) < 0) 15852 if (try_window (window, startp, TRY_WINDOW_CHECK_MARGINS) < 0)
15911 /* -1 means we need to scroll. 15853 /* -1 means we need to scroll.
15912 0 means we need new matrices, but fonts_changed_p 15854 0 means we need new matrices, but fonts_changed
15913 is set in that case, so we will detect it below. */ 15855 is set in that case, so we will detect it below. */
15914 goto try_to_scroll; 15856 goto try_to_scroll;
15915 } 15857 }
15916 15858
15917 if (fonts_changed_p) 15859 if (f->fonts_changed)
15918 goto need_larger_matrices; 15860 goto need_larger_matrices;
15919 15861
15920 if (w->cursor.vpos >= 0) 15862 if (w->cursor.vpos >= 0)
@@ -16102,7 +16044,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
16102 /* Redisplay the window. */ 16044 /* Redisplay the window. */
16103 if (!current_matrix_up_to_date_p 16045 if (!current_matrix_up_to_date_p
16104 || windows_or_buffers_changed 16046 || windows_or_buffers_changed
16105 || cursor_type_changed 16047 || f->cursor_type_changed
16106 /* Don't use try_window_reusing_current_matrix in this case 16048 /* Don't use try_window_reusing_current_matrix in this case
16107 because it can have changed the buffer. */ 16049 because it can have changed the buffer. */
16108 || !NILP (Vwindow_scroll_functions) 16050 || !NILP (Vwindow_scroll_functions)
@@ -16115,7 +16057,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
16115 /* If new fonts have been loaded (due to fontsets), give up. We 16057 /* If new fonts have been loaded (due to fontsets), give up. We
16116 have to start a new redisplay since we need to re-adjust glyph 16058 have to start a new redisplay since we need to re-adjust glyph
16117 matrices. */ 16059 matrices. */
16118 if (fonts_changed_p) 16060 if (f->fonts_changed)
16119 goto need_larger_matrices; 16061 goto need_larger_matrices;
16120 16062
16121 /* If cursor did not appear assume that the middle of the window is 16063 /* If cursor did not appear assume that the middle of the window is
@@ -16228,7 +16170,8 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
16228 if (WINDOW_WANTS_MODELINE_P (w) 16170 if (WINDOW_WANTS_MODELINE_P (w)
16229 && CURRENT_MODE_LINE_HEIGHT (w) != DESIRED_MODE_LINE_HEIGHT (w)) 16171 && CURRENT_MODE_LINE_HEIGHT (w) != DESIRED_MODE_LINE_HEIGHT (w))
16230 { 16172 {
16231 fonts_changed_p = 1; 16173 f->fonts_changed = 1;
16174 w->mode_line_height = -1;
16232 MATRIX_MODE_LINE_ROW (w->current_matrix)->height 16175 MATRIX_MODE_LINE_ROW (w->current_matrix)->height
16233 = DESIRED_MODE_LINE_HEIGHT (w); 16176 = DESIRED_MODE_LINE_HEIGHT (w);
16234 } 16177 }
@@ -16238,12 +16181,13 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
16238 if (WINDOW_WANTS_HEADER_LINE_P (w) 16181 if (WINDOW_WANTS_HEADER_LINE_P (w)
16239 && CURRENT_HEADER_LINE_HEIGHT (w) != DESIRED_HEADER_LINE_HEIGHT (w)) 16182 && CURRENT_HEADER_LINE_HEIGHT (w) != DESIRED_HEADER_LINE_HEIGHT (w))
16240 { 16183 {
16241 fonts_changed_p = 1; 16184 f->fonts_changed = 1;
16185 w->header_line_height = -1;
16242 MATRIX_HEADER_LINE_ROW (w->current_matrix)->height 16186 MATRIX_HEADER_LINE_ROW (w->current_matrix)->height
16243 = DESIRED_HEADER_LINE_HEIGHT (w); 16187 = DESIRED_HEADER_LINE_HEIGHT (w);
16244 } 16188 }
16245 16189
16246 if (fonts_changed_p) 16190 if (f->fonts_changed)
16247 goto need_larger_matrices; 16191 goto need_larger_matrices;
16248 } 16192 }
16249 16193
@@ -16308,8 +16252,8 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
16308 } 16252 }
16309#endif /* HAVE_WINDOW_SYSTEM */ 16253#endif /* HAVE_WINDOW_SYSTEM */
16310 16254
16311 /* We go to this label, with fonts_changed_p set, 16255 /* We go to this label, with fonts_changed set, if it is
16312 if it is necessary to try again using larger glyph matrices. 16256 necessary to try again using larger glyph matrices.
16313 We have to redeem the scroll bar even in this case, 16257 We have to redeem the scroll bar even in this case,
16314 because the loop in redisplay_internal expects that. */ 16258 because the loop in redisplay_internal expects that. */
16315 need_larger_matrices: 16259 need_larger_matrices:
@@ -16383,7 +16327,7 @@ try_window (Lisp_Object window, struct text_pos pos, int flags)
16383 { 16327 {
16384 if (display_line (&it)) 16328 if (display_line (&it))
16385 last_text_row = it.glyph_row - 1; 16329 last_text_row = it.glyph_row - 1;
16386 if (fonts_changed_p && !(flags & TRY_WINDOW_IGNORE_FONTS_CHANGE)) 16330 if (f->fonts_changed && !(flags & TRY_WINDOW_IGNORE_FONTS_CHANGE))
16387 return 0; 16331 return 0;
16388 } 16332 }
16389#ifdef HAVE_XWIDGETS_xxx 16333#ifdef HAVE_XWIDGETS_xxx
@@ -16493,7 +16437,7 @@ try_window_reusing_current_matrix (struct window *w)
16493 /* Don't try to reuse the display if windows have been split 16437 /* Don't try to reuse the display if windows have been split
16494 or such. */ 16438 or such. */
16495 || windows_or_buffers_changed 16439 || windows_or_buffers_changed
16496 || cursor_type_changed) 16440 || f->cursor_type_changed)
16497 return 0; 16441 return 0;
16498 16442
16499 /* Can't do this if region may have changed. */ 16443 /* Can't do this if region may have changed. */
@@ -16541,8 +16485,7 @@ try_window_reusing_current_matrix (struct window *w)
16541 w->cursor.vpos = -1; 16485 w->cursor.vpos = -1;
16542 last_text_row = last_reused_text_row = NULL; 16486 last_text_row = last_reused_text_row = NULL;
16543 16487
16544 while (it.current_y < it.last_visible_y 16488 while (it.current_y < it.last_visible_y && !f->fonts_changed)
16545 && !fonts_changed_p)
16546 { 16489 {
16547 /* If we have reached into the characters in the START row, 16490 /* If we have reached into the characters in the START row,
16548 that means the line boundaries have changed. So we 16491 that means the line boundaries have changed. So we
@@ -16753,7 +16696,7 @@ try_window_reusing_current_matrix (struct window *w)
16753 if (pt_row == NULL) 16696 if (pt_row == NULL)
16754 w->cursor.vpos = -1; 16697 w->cursor.vpos = -1;
16755 last_text_row = NULL; 16698 last_text_row = NULL;
16756 while (it.current_y < it.last_visible_y && !fonts_changed_p) 16699 while (it.current_y < it.last_visible_y && !f->fonts_changed)
16757 if (display_line (&it)) 16700 if (display_line (&it))
16758 last_text_row = it.glyph_row - 1; 16701 last_text_row = it.glyph_row - 1;
16759 16702
@@ -17272,7 +17215,7 @@ try_window_id (struct window *w)
17272 GIVE_UP (1); 17215 GIVE_UP (1);
17273 17216
17274 /* This flag is used to prevent redisplay optimizations. */ 17217 /* This flag is used to prevent redisplay optimizations. */
17275 if (windows_or_buffers_changed || cursor_type_changed) 17218 if (windows_or_buffers_changed || f->cursor_type_changed)
17276 GIVE_UP (2); 17219 GIVE_UP (2);
17277 17220
17278 /* Verify that narrowing has not changed. 17221 /* Verify that narrowing has not changed.
@@ -17603,7 +17546,7 @@ try_window_id (struct window *w)
17603 last_text_row = NULL; 17546 last_text_row = NULL;
17604 overlay_arrow_seen = 0; 17547 overlay_arrow_seen = 0;
17605 while (it.current_y < it.last_visible_y 17548 while (it.current_y < it.last_visible_y
17606 && !fonts_changed_p 17549 && !f->fonts_changed
17607 && (first_unchanged_at_end_row == NULL 17550 && (first_unchanged_at_end_row == NULL
17608 || IT_CHARPOS (it) < stop_pos)) 17551 || IT_CHARPOS (it) < stop_pos))
17609 { 17552 {
@@ -17611,7 +17554,7 @@ try_window_id (struct window *w)
17611 last_text_row = it.glyph_row - 1; 17554 last_text_row = it.glyph_row - 1;
17612 } 17555 }
17613 17556
17614 if (fonts_changed_p) 17557 if (f->fonts_changed)
17615 return -1; 17558 return -1;
17616 17559
17617 17560
@@ -17858,8 +17801,7 @@ try_window_id (struct window *w)
17858 17801
17859 /* Display the rest of the lines at the window end. */ 17802 /* Display the rest of the lines at the window end. */
17860 it.glyph_row = MATRIX_ROW (desired_matrix, it.vpos); 17803 it.glyph_row = MATRIX_ROW (desired_matrix, it.vpos);
17861 while (it.current_y < it.last_visible_y 17804 while (it.current_y < it.last_visible_y && !f->fonts_changed)
17862 && !fonts_changed_p)
17863 { 17805 {
17864 /* Is it always sure that the display agrees with lines in 17806 /* Is it always sure that the display agrees with lines in
17865 the current matrix? I don't think so, so we mark rows 17807 the current matrix? I don't think so, so we mark rows
@@ -19418,7 +19360,7 @@ display_line (struct it *it)
19418 >= it->w->desired_matrix->nrows) 19360 >= it->w->desired_matrix->nrows)
19419 { 19361 {
19420 it->w->nrows_scale_factor++; 19362 it->w->nrows_scale_factor++;
19421 fonts_changed_p = 1; 19363 it->f->fonts_changed = 1;
19422 return 0; 19364 return 0;
19423 } 19365 }
19424 19366
@@ -20770,13 +20712,8 @@ redisplay_mode_lines (Lisp_Object window, int force)
20770 { 20712 {
20771 struct text_pos pt; 20713 struct text_pos pt;
20772 20714
20773 SET_TEXT_POS_FROM_MARKER (pt, w->pointm); 20715 CLIP_TEXT_POS_FROM_MARKER (pt, w->pointm);
20774 if (CHARPOS (pt) < BEGV) 20716 TEMP_SET_PT_BOTH (CHARPOS (pt), BYTEPOS (pt));
20775 TEMP_SET_PT_BOTH (BEGV, BEGV_BYTE);
20776 else if (CHARPOS (pt) > (ZV - 1))
20777 TEMP_SET_PT_BOTH (ZV, ZV_BYTE);
20778 else
20779 TEMP_SET_PT_BOTH (CHARPOS (pt), BYTEPOS (pt));
20780 } 20717 }
20781 20718
20782 /* Display mode lines. */ 20719 /* Display mode lines. */
@@ -24205,12 +24142,12 @@ draw_glyphs (struct window *w, int x, struct glyph_row *row,
24205 24142
24206#define IT_EXPAND_MATRIX_WIDTH(it, area) \ 24143#define IT_EXPAND_MATRIX_WIDTH(it, area) \
24207 { \ 24144 { \
24208 if (!fonts_changed_p \ 24145 if (!it->f->fonts_changed \
24209 && (it->glyph_row->glyphs[area] \ 24146 && (it->glyph_row->glyphs[area] \
24210 < it->glyph_row->glyphs[area + 1])) \ 24147 < it->glyph_row->glyphs[area + 1])) \
24211 { \ 24148 { \
24212 it->w->ncols_scale_factor++; \ 24149 it->w->ncols_scale_factor++; \
24213 fonts_changed_p = 1; \ 24150 it->f->fonts_changed = 1; \
24214 } \ 24151 } \
24215 } 24152 }
24216 24153
@@ -25209,21 +25146,7 @@ produce_glyphless_glyph (struct it *it, int for_no_font, Lisp_Object acronym)
25209 base_height = it->ascent + it->descent; 25146 base_height = it->ascent + it->descent;
25210 base_width = font->average_width; 25147 base_width = font->average_width;
25211 25148
25212 /* Get a face ID for the glyph by utilizing a cache (the same way as 25149 face_id = merge_glyphless_glyph_face (it);
25213 done for `escape-glyph' in get_next_display_element). */
25214 if (it->f == last_glyphless_glyph_frame
25215 && it->face_id == last_glyphless_glyph_face_id)
25216 {
25217 face_id = last_glyphless_glyph_merged_face_id;
25218 }
25219 else
25220 {
25221 /* Merge the `glyphless-char' face into the current face. */
25222 face_id = merge_faces (it->f, Qglyphless_char, 0, it->face_id);
25223 last_glyphless_glyph_frame = it->f;
25224 last_glyphless_glyph_face_id = it->face_id;
25225 last_glyphless_glyph_merged_face_id = face_id;
25226 }
25227 25150
25228 if (it->glyphless_method == GLYPHLESS_DISPLAY_THIN_SPACE) 25151 if (it->glyphless_method == GLYPHLESS_DISPLAY_THIN_SPACE)
25229 { 25152 {
@@ -26037,7 +25960,7 @@ x_write_glyphs (struct window *w, struct glyph_row *updated_row,
26037 /* Write glyphs. */ 25960 /* Write glyphs. */
26038 25961
26039 hpos = start - updated_row->glyphs[updated_area]; 25962 hpos = start - updated_row->glyphs[updated_area];
26040 x = draw_glyphs (w, output_cursor.x, 25963 x = draw_glyphs (w, w->output_cursor.x,
26041 updated_row, updated_area, 25964 updated_row, updated_area,
26042 hpos, hpos + len, 25965 hpos, hpos + len,
26043 DRAW_NORMAL_TEXT, 0); 25966 DRAW_NORMAL_TEXT, 0);
@@ -26045,7 +25968,7 @@ x_write_glyphs (struct window *w, struct glyph_row *updated_row,
26045 /* Invalidate old phys cursor if the glyph at its hpos is redrawn. */ 25968 /* Invalidate old phys cursor if the glyph at its hpos is redrawn. */
26046 if (updated_area == TEXT_AREA 25969 if (updated_area == TEXT_AREA
26047 && w->phys_cursor_on_p 25970 && w->phys_cursor_on_p
26048 && w->phys_cursor.vpos == output_cursor.vpos 25971 && w->phys_cursor.vpos == w->output_cursor.vpos
26049 && chpos >= hpos 25972 && chpos >= hpos
26050 && chpos < hpos + len) 25973 && chpos < hpos + len)
26051 w->phys_cursor_on_p = 0; 25974 w->phys_cursor_on_p = 0;
@@ -26053,8 +25976,8 @@ x_write_glyphs (struct window *w, struct glyph_row *updated_row,
26053 unblock_input (); 25976 unblock_input ();
26054 25977
26055 /* Advance the output cursor. */ 25978 /* Advance the output cursor. */
26056 output_cursor.hpos += len; 25979 w->output_cursor.hpos += len;
26057 output_cursor.x = x; 25980 w->output_cursor.x = x;
26058} 25981}
26059 25982
26060 25983
@@ -26087,25 +26010,25 @@ x_insert_glyphs (struct window *w, struct glyph_row *updated_row,
26087 26010
26088 /* Get the width of the region to shift right. */ 26011 /* Get the width of the region to shift right. */
26089 shifted_region_width = (window_box_width (w, updated_area) 26012 shifted_region_width = (window_box_width (w, updated_area)
26090 - output_cursor.x 26013 - w->output_cursor.x
26091 - shift_by_width); 26014 - shift_by_width);
26092 26015
26093 /* Shift right. */ 26016 /* Shift right. */
26094 frame_x = window_box_left (w, updated_area) + output_cursor.x; 26017 frame_x = window_box_left (w, updated_area) + w->output_cursor.x;
26095 frame_y = WINDOW_TO_FRAME_PIXEL_Y (w, output_cursor.y); 26018 frame_y = WINDOW_TO_FRAME_PIXEL_Y (w, w->output_cursor.y);
26096 26019
26097 FRAME_RIF (f)->shift_glyphs_for_insert (f, frame_x, frame_y, shifted_region_width, 26020 FRAME_RIF (f)->shift_glyphs_for_insert (f, frame_x, frame_y, shifted_region_width,
26098 line_height, shift_by_width); 26021 line_height, shift_by_width);
26099 26022
26100 /* Write the glyphs. */ 26023 /* Write the glyphs. */
26101 hpos = start - row->glyphs[updated_area]; 26024 hpos = start - row->glyphs[updated_area];
26102 draw_glyphs (w, output_cursor.x, row, updated_area, 26025 draw_glyphs (w, w->output_cursor.x, row, updated_area,
26103 hpos, hpos + len, 26026 hpos, hpos + len,
26104 DRAW_NORMAL_TEXT, 0); 26027 DRAW_NORMAL_TEXT, 0);
26105 26028
26106 /* Advance the output cursor. */ 26029 /* Advance the output cursor. */
26107 output_cursor.hpos += len; 26030 w->output_cursor.hpos += len;
26108 output_cursor.x += shift_by_width; 26031 w->output_cursor.x += shift_by_width;
26109 unblock_input (); 26032 unblock_input ();
26110} 26033}
26111 26034
@@ -26144,16 +26067,16 @@ x_clear_end_of_line (struct window *w, struct glyph_row *updated_row,
26144 else 26067 else
26145 to_x = min (to_x, max_x); 26068 to_x = min (to_x, max_x);
26146 26069
26147 to_y = min (max_y, output_cursor.y + updated_row->height); 26070 to_y = min (max_y, w->output_cursor.y + updated_row->height);
26148 26071
26149 /* Notice if the cursor will be cleared by this operation. */ 26072 /* Notice if the cursor will be cleared by this operation. */
26150 if (!updated_row->full_width_p) 26073 if (!updated_row->full_width_p)
26151 notice_overwritten_cursor (w, updated_area, 26074 notice_overwritten_cursor (w, updated_area,
26152 output_cursor.x, -1, 26075 w->output_cursor.x, -1,
26153 updated_row->y, 26076 updated_row->y,
26154 MATRIX_ROW_BOTTOM_Y (updated_row)); 26077 MATRIX_ROW_BOTTOM_Y (updated_row));
26155 26078
26156 from_x = output_cursor.x; 26079 from_x = w->output_cursor.x;
26157 26080
26158 /* Translate to frame coordinates. */ 26081 /* Translate to frame coordinates. */
26159 if (updated_row->full_width_p) 26082 if (updated_row->full_width_p)
@@ -26169,7 +26092,7 @@ x_clear_end_of_line (struct window *w, struct glyph_row *updated_row,
26169 } 26092 }
26170 26093
26171 min_y = WINDOW_HEADER_LINE_HEIGHT (w); 26094 min_y = WINDOW_HEADER_LINE_HEIGHT (w);
26172 from_y = WINDOW_TO_FRAME_PIXEL_Y (w, max (min_y, output_cursor.y)); 26095 from_y = WINDOW_TO_FRAME_PIXEL_Y (w, max (min_y, w->output_cursor.y));
26173 to_y = WINDOW_TO_FRAME_PIXEL_Y (w, to_y); 26096 to_y = WINDOW_TO_FRAME_PIXEL_Y (w, to_y);
26174 26097
26175 /* Prevent inadvertently clearing to end of the X window. */ 26098 /* Prevent inadvertently clearing to end of the X window. */
@@ -26267,7 +26190,7 @@ set_frame_cursor_types (struct frame *f, Lisp_Object arg)
26267 FRAME_BLINK_OFF_CURSOR (f) = DEFAULT_CURSOR; 26190 FRAME_BLINK_OFF_CURSOR (f) = DEFAULT_CURSOR;
26268 26191
26269 /* Make sure the cursor gets redrawn. */ 26192 /* Make sure the cursor gets redrawn. */
26270 cursor_type_changed = 1; 26193 f->cursor_type_changed = 1;
26271} 26194}
26272 26195
26273 26196
@@ -29037,7 +28960,7 @@ x_draw_vertical_border (struct window *w)
29037 { 28960 {
29038 int x0, x1, y0, y1; 28961 int x0, x1, y0, y1;
29039 28962
29040 window_box_edges (w, -1, &x0, &y0, &x1, &y1); 28963 window_box_edges (w, &x0, &y0, &x1, &y1);
29041 y1 -= 1; 28964 y1 -= 1;
29042 28965
29043 if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0) 28966 if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0)
@@ -29050,7 +28973,7 @@ x_draw_vertical_border (struct window *w)
29050 { 28973 {
29051 int x0, x1, y0, y1; 28974 int x0, x1, y0, y1;
29052 28975
29053 window_box_edges (w, -1, &x0, &y0, &x1, &y1); 28976 window_box_edges (w, &x0, &y0, &x1, &y1);
29054 y1 -= 1; 28977 y1 -= 1;
29055 28978
29056 if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0) 28979 if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0)
@@ -29959,8 +29882,10 @@ cursor shapes. */);
29959 doc: /* Seconds to wait before displaying an hourglass pointer when Emacs is busy. */); 29882 doc: /* Seconds to wait before displaying an hourglass pointer when Emacs is busy. */);
29960 Vhourglass_delay = make_number (DEFAULT_HOURGLASS_DELAY); 29883 Vhourglass_delay = make_number (DEFAULT_HOURGLASS_DELAY);
29961 29884
29885#ifdef HAVE_WINDOW_SYSTEM
29962 hourglass_atimer = NULL; 29886 hourglass_atimer = NULL;
29963 hourglass_shown_p = 0; 29887 hourglass_shown_p = 0;
29888#endif /* HAVE_WINDOW_SYSTEM */
29964 29889
29965 DEFSYM (Qglyphless_char, "glyphless-char"); 29890 DEFSYM (Qglyphless_char, "glyphless-char");
29966 DEFSYM (Qhex_code, "hex-code"); 29891 DEFSYM (Qhex_code, "hex-code");
@@ -30002,8 +29927,6 @@ Its value should be an ASCII acronym string, `hex-code', `empty-box', or
30002void 29927void
30003init_xdisp (void) 29928init_xdisp (void)
30004{ 29929{
30005 current_header_line_height = current_mode_line_height = -1;
30006
30007 CHARPOS (this_line_start_pos) = 0; 29930 CHARPOS (this_line_start_pos) = 0;
30008 29931
30009 if (!noninteractive) 29932 if (!noninteractive)
@@ -30047,13 +29970,14 @@ init_xdisp (void)
30047 help_echo_showing_p = 0; 29970 help_echo_showing_p = 0;
30048} 29971}
30049 29972
29973#ifdef HAVE_WINDOW_SYSTEM
29974
30050/* Platform-independent portion of hourglass implementation. */ 29975/* Platform-independent portion of hourglass implementation. */
30051 29976
30052/* Cancel a currently active hourglass timer, and start a new one. */ 29977/* Cancel a currently active hourglass timer, and start a new one. */
30053void 29978void
30054start_hourglass (void) 29979start_hourglass (void)
30055{ 29980{
30056#if defined (HAVE_WINDOW_SYSTEM)
30057 struct timespec delay; 29981 struct timespec delay;
30058 29982
30059 cancel_hourglass (); 29983 cancel_hourglass ();
@@ -30078,7 +30002,6 @@ start_hourglass (void)
30078 30002
30079 hourglass_atimer = start_atimer (ATIMER_RELATIVE, delay, 30003 hourglass_atimer = start_atimer (ATIMER_RELATIVE, delay,
30080 show_hourglass, NULL); 30004 show_hourglass, NULL);
30081#endif
30082} 30005}
30083 30006
30084 30007
@@ -30087,7 +30010,6 @@ start_hourglass (void)
30087void 30010void
30088cancel_hourglass (void) 30011cancel_hourglass (void)
30089{ 30012{
30090#if defined (HAVE_WINDOW_SYSTEM)
30091 if (hourglass_atimer) 30013 if (hourglass_atimer)
30092 { 30014 {
30093 cancel_atimer (hourglass_atimer); 30015 cancel_atimer (hourglass_atimer);
@@ -30096,5 +30018,6 @@ cancel_hourglass (void)
30096 30018
30097 if (hourglass_shown_p) 30019 if (hourglass_shown_p)
30098 hide_hourglass (); 30020 hide_hourglass ();
30099#endif
30100} 30021}
30022
30023#endif /* HAVE_WINDOW_SYSTEM */
diff --git a/src/xfaces.c b/src/xfaces.c
index a55ac90086d..e8cb7a70322 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -211,13 +211,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
211#include "frame.h" 211#include "frame.h"
212#include "termhooks.h" 212#include "termhooks.h"
213 213
214#ifdef HAVE_X_WINDOWS
215#include "xterm.h"
216#ifdef USE_MOTIF 214#ifdef USE_MOTIF
217#include <Xm/Xm.h> 215#include <Xm/Xm.h>
218#include <Xm/XmStrDefs.h> 216#include <Xm/XmStrDefs.h>
219#endif /* USE_MOTIF */ 217#endif /* USE_MOTIF */
220#endif /* HAVE_X_WINDOWS */
221 218
222#ifdef MSDOS 219#ifdef MSDOS
223#include "dosfns.h" 220#include "dosfns.h"
@@ -238,6 +235,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
238#define FRAME_X_DISPLAY_INFO FRAME_NS_DISPLAY_INFO 235#define FRAME_X_DISPLAY_INFO FRAME_NS_DISPLAY_INFO
239#define GCGraphicsExposures 0 236#define GCGraphicsExposures 0
240#endif /* HAVE_NS */ 237#endif /* HAVE_NS */
238
239/* Number of pt per inch (from the TeXbook). */
240
241#define PT_PER_INCH 72.27
242
241#endif /* HAVE_WINDOW_SYSTEM */ 243#endif /* HAVE_WINDOW_SYSTEM */
242 244
243#include "buffer.h" 245#include "buffer.h"
@@ -272,10 +274,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
272 274
273#include <c-ctype.h> 275#include <c-ctype.h>
274 276
275/* Number of pt per inch (from the TeXbook). */
276
277#define PT_PER_INCH 72.27
278
279/* Non-zero if face attribute ATTR is unspecified. */ 277/* Non-zero if face attribute ATTR is unspecified. */
280 278
281#define UNSPECIFIEDP(ATTR) EQ ((ATTR), Qunspecified) 279#define UNSPECIFIEDP(ATTR) EQ ((ATTR), Qunspecified)
@@ -396,6 +394,8 @@ static Lisp_Object Qtty_color_desc, Qtty_color_by_index, Qtty_color_standard_val
396 394
397static Lisp_Object Qtty_color_alist; 395static Lisp_Object Qtty_color_alist;
398 396
397#ifdef HAVE_WINDOW_SYSTEM
398
399/* Counter for calls to clear_face_cache. If this counter reaches 399/* Counter for calls to clear_face_cache. If this counter reaches
400 CLEAR_FONT_TABLE_COUNT, and a frame has more than 400 CLEAR_FONT_TABLE_COUNT, and a frame has more than
401 CLEAR_FONT_TABLE_NFONTS load, unused fonts are freed. */ 401 CLEAR_FONT_TABLE_NFONTS load, unused fonts are freed. */
@@ -404,6 +404,8 @@ static int clear_font_table_count;
404#define CLEAR_FONT_TABLE_COUNT 100 404#define CLEAR_FONT_TABLE_COUNT 100
405#define CLEAR_FONT_TABLE_NFONTS 10 405#define CLEAR_FONT_TABLE_NFONTS 10
406 406
407#endif /* HAVE_WINDOW_SYSTEM */
408
407/* Non-zero means face attributes have been changed since the last 409/* Non-zero means face attributes have been changed since the last
408 redisplay. Used in redisplay_internal. */ 410 redisplay. Used in redisplay_internal. */
409 411
@@ -434,29 +436,27 @@ static int ngcs;
434 436
435static int menu_face_changed_default; 437static int menu_face_changed_default;
436 438
437
438/* Function prototypes. */
439
440struct table_entry;
441struct named_merge_point; 439struct named_merge_point;
442 440
443static void set_font_frame_param (Lisp_Object, Lisp_Object);
444static struct face *realize_face (struct face_cache *, Lisp_Object *, 441static struct face *realize_face (struct face_cache *, Lisp_Object *,
445 int); 442 int);
446static struct face *realize_non_ascii_face (struct frame *, Lisp_Object,
447 struct face *);
448static struct face *realize_x_face (struct face_cache *, Lisp_Object *); 443static struct face *realize_x_face (struct face_cache *, Lisp_Object *);
449static struct face *realize_tty_face (struct face_cache *, Lisp_Object *); 444static struct face *realize_tty_face (struct face_cache *, Lisp_Object *);
450static bool realize_basic_faces (struct frame *); 445static bool realize_basic_faces (struct frame *);
451static bool realize_default_face (struct frame *); 446static bool realize_default_face (struct frame *);
452static void realize_named_face (struct frame *, Lisp_Object, int); 447static void realize_named_face (struct frame *, Lisp_Object, int);
453static struct face_cache *make_face_cache (struct frame *); 448static struct face_cache *make_face_cache (struct frame *);
454static void clear_face_gcs (struct face_cache *);
455static void free_face_cache (struct face_cache *); 449static void free_face_cache (struct face_cache *);
456static int merge_face_ref (struct frame *, Lisp_Object, Lisp_Object *, 450static int merge_face_ref (struct frame *, Lisp_Object, Lisp_Object *,
457 int, struct named_merge_point *); 451 int, struct named_merge_point *);
458 452
459 453#ifdef HAVE_WINDOW_SYSTEM
454static void set_font_frame_param (Lisp_Object, Lisp_Object);
455static void clear_face_gcs (struct face_cache *);
456static struct face *realize_non_ascii_face (struct frame *, Lisp_Object,
457 struct face *);
458#endif /* HAVE_WINDOW_SYSTEM */
459
460/*********************************************************************** 460/***********************************************************************
461 Utilities 461 Utilities
462 ***********************************************************************/ 462 ***********************************************************************/
@@ -3983,6 +3983,7 @@ lface_hash (Lisp_Object *v)
3983 ^ XHASH (v[LFACE_HEIGHT_INDEX])); 3983 ^ XHASH (v[LFACE_HEIGHT_INDEX]));
3984} 3984}
3985 3985
3986#ifdef HAVE_WINDOW_SYSTEM
3986 3987
3987/* Return non-zero if LFACE1 and LFACE2 specify the same font (without 3988/* Return non-zero if LFACE1 and LFACE2 specify the same font (without
3988 considering charsets/registries). They do if they specify the same 3989 considering charsets/registries). They do if they specify the same
@@ -4011,8 +4012,8 @@ lface_same_font_attributes_p (Lisp_Object *lface1, Lisp_Object *lface2)
4011 ); 4012 );
4012} 4013}
4013 4014
4015#endif /* HAVE_WINDOW_SYSTEM */
4014 4016
4015
4016/*********************************************************************** 4017/***********************************************************************
4017 Realized Faces 4018 Realized Faces
4018 ***********************************************************************/ 4019 ***********************************************************************/
@@ -4171,6 +4172,7 @@ make_face_cache (struct frame *f)
4171 return c; 4172 return c;
4172} 4173}
4173 4174
4175#ifdef HAVE_WINDOW_SYSTEM
4174 4176
4175/* Clear out all graphics contexts for all realized faces, except for 4177/* Clear out all graphics contexts for all realized faces, except for
4176 the basic faces. This should be done from time to time just to avoid 4178 the basic faces. This should be done from time to time just to avoid
@@ -4181,7 +4183,6 @@ clear_face_gcs (struct face_cache *c)
4181{ 4183{
4182 if (c && FRAME_WINDOW_P (c->f)) 4184 if (c && FRAME_WINDOW_P (c->f))
4183 { 4185 {
4184#ifdef HAVE_WINDOW_SYSTEM
4185 int i; 4186 int i;
4186 for (i = BASIC_FACE_ID_SENTINEL; i < c->used; ++i) 4187 for (i = BASIC_FACE_ID_SENTINEL; i < c->used; ++i)
4187 { 4188 {
@@ -4196,10 +4197,10 @@ clear_face_gcs (struct face_cache *c)
4196 unblock_input (); 4197 unblock_input ();
4197 } 4198 }
4198 } 4199 }
4199#endif /* HAVE_WINDOW_SYSTEM */
4200 } 4200 }
4201} 4201}
4202 4202
4203#endif /* HAVE_WINDOW_SYSTEM */
4203 4204
4204/* Free all realized faces in face cache C, including basic faces. 4205/* Free all realized faces in face cache C, including basic faces.
4205 C may be null. If faces are freed, make sure the frame's current 4206 C may be null. If faces are freed, make sure the frame's current
diff --git a/src/xfns.c b/src/xfns.c
index 0c91e298ec8..4e8442dd3a3 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -22,10 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
22#include <math.h> 22#include <math.h>
23#include <unistd.h> 23#include <unistd.h>
24 24
25/* This makes the fields of a Display accessible, in Xlib header files. */
26
27#define XLIB_ILLEGAL_ACCESS
28
29#include "lisp.h" 25#include "lisp.h"
30#include "xterm.h" 26#include "xterm.h"
31#include "frame.h" 27#include "frame.h"
@@ -1186,7 +1182,7 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
1186 1182
1187 block_input (); 1183 block_input ();
1188 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 1184 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
1189 0, y, width, height, False); 1185 0, y, width, height);
1190 unblock_input (); 1186 unblock_input ();
1191 } 1187 }
1192 1188
@@ -1197,7 +1193,7 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
1197 1193
1198 block_input (); 1194 block_input ();
1199 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 1195 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
1200 0, y, width, height, False); 1196 0, y, width, height);
1201 unblock_input (); 1197 unblock_input ();
1202 } 1198 }
1203 1199
@@ -1205,7 +1201,7 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
1205 clear_glyph_matrix (XWINDOW (f->menu_bar_window)->current_matrix); 1201 clear_glyph_matrix (XWINDOW (f->menu_bar_window)->current_matrix);
1206 } 1202 }
1207#endif /* not USE_X_TOOLKIT && not USE_GTK */ 1203#endif /* not USE_X_TOOLKIT && not USE_GTK */
1208 adjust_glyphs (f); 1204 adjust_frame_glyphs (f);
1209 run_window_configuration_change_hook (f); 1205 run_window_configuration_change_hook (f);
1210} 1206}
1211 1207
@@ -1268,7 +1264,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
1268 1264
1269 FRAME_TOOL_BAR_LINES (f) = nlines; 1265 FRAME_TOOL_BAR_LINES (f) = nlines;
1270 resize_frame_windows (f, FRAME_LINES (f), 0); 1266 resize_frame_windows (f, FRAME_LINES (f), 0);
1271 adjust_glyphs (f); 1267 adjust_frame_glyphs (f);
1272 1268
1273 /* We also have to make sure that the internal border at the top of 1269 /* We also have to make sure that the internal border at the top of
1274 the frame, below the menu bar or tool bar, is redrawn when the 1270 the frame, below the menu bar or tool bar, is redrawn when the
@@ -1295,8 +1291,8 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
1295 if (height > 0 && width > 0) 1291 if (height > 0 && width > 0)
1296 { 1292 {
1297 block_input (); 1293 block_input ();
1298 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 1294 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
1299 0, y, width, height, False); 1295 0, y, width, height);
1300 unblock_input (); 1296 unblock_input ();
1301 } 1297 }
1302 1298
@@ -5490,7 +5486,7 @@ Text larger than the specified size is clipped. */)
5490 } 5486 }
5491 5487
5492 FRAME_TOTAL_COLS (f) = w->total_cols; 5488 FRAME_TOTAL_COLS (f) = w->total_cols;
5493 adjust_glyphs (f); 5489 adjust_frame_glyphs (f);
5494 w->pseudo_window_p = 1; 5490 w->pseudo_window_p = 1;
5495 5491
5496 /* Display the tooltip text in a temporary buffer. */ 5492 /* Display the tooltip text in a temporary buffer. */
@@ -5558,7 +5554,7 @@ Text larger than the specified size is clipped. */)
5558 width /= WINDOW_FRAME_COLUMN_WIDTH (w); 5554 width /= WINDOW_FRAME_COLUMN_WIDTH (w);
5559 w->total_cols = width; 5555 w->total_cols = width;
5560 FRAME_TOTAL_COLS (f) = width; 5556 FRAME_TOTAL_COLS (f) = width;
5561 adjust_glyphs (f); 5557 adjust_frame_glyphs (f);
5562 clear_glyph_matrix (w->desired_matrix); 5558 clear_glyph_matrix (w->desired_matrix);
5563 clear_glyph_matrix (w->current_matrix); 5559 clear_glyph_matrix (w->current_matrix);
5564 try_window (FRAME_ROOT_WINDOW (f), pos, 0); 5560 try_window (FRAME_ROOT_WINDOW (f), pos, 0);
diff --git a/src/xgselect.c b/src/xgselect.c
index 45a34f2e0a5..7a754bd75c0 100644
--- a/src/xgselect.c
+++ b/src/xgselect.c
@@ -29,10 +29,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
29#include "frame.h" 29#include "frame.h"
30 30
31int 31int
32xg_select (int fds_lim, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, 32xg_select (int fds_lim, fd_set *rfds, fd_set *wfds, fd_set *efds,
33 struct timespec const *timeout, sigset_t const *sigmask) 33 struct timespec const *timeout, sigset_t const *sigmask)
34{ 34{
35 SELECT_TYPE all_rfds, all_wfds; 35 fd_set all_rfds, all_wfds;
36 struct timespec tmo; 36 struct timespec tmo;
37 struct timespec const *tmop = timeout; 37 struct timespec const *tmop = timeout;
38 38
diff --git a/src/xgselect.h b/src/xgselect.h
index f85c17f7190..1f8555591d0 100644
--- a/src/xgselect.h
+++ b/src/xgselect.h
@@ -25,9 +25,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
25#include "sysselect.h" 25#include "sysselect.h"
26 26
27extern int xg_select (int max_fds, 27extern int xg_select (int max_fds,
28 SELECT_TYPE *rfds, 28 fd_set *rfds, fd_set *wfds, fd_set *efds,
29 SELECT_TYPE *wfds,
30 SELECT_TYPE *efds,
31 struct timespec const *timeout, 29 struct timespec const *timeout,
32 sigset_t const *sigmask); 30 sigset_t const *sigmask);
33 31
diff --git a/src/xmenu.c b/src/xmenu.c
index 98473939373..823c63bfc6f 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -378,7 +378,7 @@ x_menu_wait_for_event (void *data)
378 ) 378 )
379 { 379 {
380 struct timespec next_time = timer_check (), *ntp; 380 struct timespec next_time = timer_check (), *ntp;
381 SELECT_TYPE read_fds; 381 fd_set read_fds;
382 struct x_display_info *dpyinfo; 382 struct x_display_info *dpyinfo;
383 int n = 0; 383 int n = 0;
384 384
diff --git a/src/xterm.c b/src/xterm.c
index 548975c635a..3e05ba6fed2 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -143,16 +143,11 @@ int use_xim = 1;
143int use_xim = 0; /* configure --without-xim */ 143int use_xim = 0; /* configure --without-xim */
144#endif 144#endif
145 145
146
147
148/* Non-zero means that a HELP_EVENT has been generated since Emacs 146/* Non-zero means that a HELP_EVENT has been generated since Emacs
149 start. */ 147 start. */
150 148
151static bool any_help_event_p; 149static bool any_help_event_p;
152 150
153/* Last window where we saw the mouse. Used by mouse-autoselect-window. */
154static Lisp_Object last_window;
155
156/* This is a chain of structures for all the X displays currently in 151/* This is a chain of structures for all the X displays currently in
157 use. */ 152 use. */
158 153
@@ -300,8 +295,6 @@ static struct terminal *x_create_terminal (struct x_display_info *);
300void x_delete_terminal (struct terminal *); 295void x_delete_terminal (struct terminal *);
301static void x_update_end (struct frame *); 296static void x_update_end (struct frame *);
302static void XTframe_up_to_date (struct frame *); 297static void XTframe_up_to_date (struct frame *);
303static void XTset_terminal_modes (struct terminal *);
304static void XTreset_terminal_modes (struct terminal *);
305static void x_clear_frame (struct frame *); 298static void x_clear_frame (struct frame *);
306static _Noreturn void x_ins_del_lines (struct frame *, int, int); 299static _Noreturn void x_ins_del_lines (struct frame *, int, int);
307static void frame_highlight (struct frame *); 300static void frame_highlight (struct frame *);
@@ -317,7 +310,8 @@ static void x_draw_hollow_cursor (struct window *, struct glyph_row *);
317static void x_draw_bar_cursor (struct window *, struct glyph_row *, int, 310static void x_draw_bar_cursor (struct window *, struct glyph_row *, int,
318 enum text_cursor_kinds); 311 enum text_cursor_kinds);
319 312
320static void x_clip_to_row (struct window *, struct glyph_row *, int, GC); 313static void x_clip_to_row (struct window *, struct glyph_row *,
314 enum glyph_row_area, GC);
321static void x_flush (struct frame *f); 315static void x_flush (struct frame *f);
322static void x_update_begin (struct frame *); 316static void x_update_begin (struct frame *);
323static void x_update_window_begin (struct window *); 317static void x_update_window_begin (struct window *);
@@ -343,29 +337,19 @@ static void x_wm_set_icon_pixmap (struct frame *, ptrdiff_t);
343static void x_initialize (void); 337static void x_initialize (void);
344 338
345 339
346/* Flush display of frame F, or of all frames if F is null. */ 340/* Flush display of frame F. */
347 341
348static void 342static void
349x_flush (struct frame *f) 343x_flush (struct frame *f)
350{ 344{
345 eassert (f && FRAME_X_P (f));
351 /* Don't call XFlush when it is not safe to redisplay; the X 346 /* Don't call XFlush when it is not safe to redisplay; the X
352 connection may be broken. */ 347 connection may be broken. */
353 if (!NILP (Vinhibit_redisplay)) 348 if (!NILP (Vinhibit_redisplay))
354 return; 349 return;
355 350
356 block_input (); 351 block_input ();
357 if (f) 352 XFlush (FRAME_X_DISPLAY (f));
358 {
359 eassert (FRAME_X_P (f));
360 XFlush (FRAME_X_DISPLAY (f));
361 }
362 else
363 {
364 /* Flush all displays and so all frames on them. */
365 struct x_display_info *xdi;
366 for (xdi = x_display_list; xdi; xdi = xdi->next)
367 XFlush (xdi->display);
368 }
369 unblock_input (); 353 unblock_input ();
370} 354}
371 355
@@ -554,8 +538,7 @@ x_update_begin (struct frame *f)
554} 538}
555 539
556 540
557/* Start update of window W. Set output_cursor to the cursor 541/* Start update of window W. */
558 position of W. */
559 542
560static void 543static void
561x_update_window_begin (struct window *w) 544x_update_window_begin (struct window *w)
@@ -563,7 +546,7 @@ x_update_window_begin (struct window *w)
563 struct frame *f = XFRAME (WINDOW_FRAME (w)); 546 struct frame *f = XFRAME (WINDOW_FRAME (w));
564 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); 547 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
565 548
566 set_output_cursor (&w->cursor); 549 w->output_cursor = w->cursor;
567 550
568 block_input (); 551 block_input ();
569 552
@@ -621,9 +604,9 @@ x_update_window_end (struct window *w, bool cursor_on_p,
621 block_input (); 604 block_input ();
622 605
623 if (cursor_on_p) 606 if (cursor_on_p)
624 display_and_set_cursor (w, 1, output_cursor.hpos, 607 display_and_set_cursor (w, 1,
625 output_cursor.vpos, 608 w->output_cursor.hpos, w->output_cursor.vpos,
626 output_cursor.x, output_cursor.y); 609 w->output_cursor.x, w->output_cursor.y);
627 610
628 if (draw_window_fringes (w, 1)) 611 if (draw_window_fringes (w, 1))
629 x_draw_vertical_border (w); 612 x_draw_vertical_border (w);
@@ -701,10 +684,10 @@ x_after_update_window_line (struct window *w, struct glyph_row *desired_row)
701 684
702 block_input (); 685 block_input ();
703 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 686 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
704 0, y, width, height, False); 687 0, y, width, height);
705 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 688 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
706 FRAME_PIXEL_WIDTH (f) - width, 689 FRAME_PIXEL_WIDTH (f) - width,
707 y, width, height, False); 690 y, width, height);
708 unblock_input (); 691 unblock_input ();
709 } 692 }
710} 693}
@@ -719,7 +702,7 @@ x_draw_fringe_bitmap (struct window *w, struct glyph_row *row, struct draw_fring
719 struct face *face = p->face; 702 struct face *face = p->face;
720 703
721 /* Must clip because of partially visible lines. */ 704 /* Must clip because of partially visible lines. */
722 x_clip_to_row (w, row, -1, gc); 705 x_clip_to_row (w, row, ANY_AREA, gc);
723 706
724 if (!p->overlay_p) 707 if (!p->overlay_p)
725 { 708 {
@@ -836,27 +819,6 @@ x_draw_fringe_bitmap (struct window *w, struct glyph_row *row, struct draw_fring
836 XSetClipMask (display, gc, None); 819 XSetClipMask (display, gc, None);
837} 820}
838 821
839
840
841/* This is called when starting Emacs and when restarting after
842 suspend. When starting Emacs, no X window is mapped. And nothing
843 must be done to Emacs's own window if it is suspended (though that
844 rarely happens). */
845
846static void
847XTset_terminal_modes (struct terminal *terminal)
848{
849}
850
851/* This is called when exiting or suspending Emacs. Exiting will make
852 the X-windows go away, and suspending requires no action. */
853
854static void
855XTreset_terminal_modes (struct terminal *terminal)
856{
857}
858
859
860/*********************************************************************** 822/***********************************************************************
861 Glyph display 823 Glyph display
862 ***********************************************************************/ 824 ***********************************************************************/
@@ -2977,10 +2939,10 @@ x_delete_glyphs (struct frame *f, register int n)
2977 If they are <= 0, this is probably an error. */ 2939 If they are <= 0, this is probably an error. */
2978 2940
2979void 2941void
2980x_clear_area (Display *dpy, Window window, int x, int y, int width, int height, int exposures) 2942x_clear_area (Display *dpy, Window window, int x, int y, int width, int height)
2981{ 2943{
2982 eassert (width > 0 && height > 0); 2944 eassert (width > 0 && height > 0);
2983 XClearArea (dpy, window, x, y, width, height, exposures); 2945 XClearArea (dpy, window, x, y, width, height, False);
2984} 2946}
2985 2947
2986 2948
@@ -2992,11 +2954,7 @@ x_clear_frame (struct frame *f)
2992 /* Clearing the frame will erase any cursor, so mark them all as no 2954 /* Clearing the frame will erase any cursor, so mark them all as no
2993 longer visible. */ 2955 longer visible. */
2994 mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f))); 2956 mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f)));
2995 output_cursor.hpos = output_cursor.vpos = 0;
2996 output_cursor.x = -1;
2997 2957
2998 /* We don't set the output cursor here because there will always
2999 follow an explicit cursor_to. */
3000 block_input (); 2958 block_input ();
3001 2959
3002 XClearWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f)); 2960 XClearWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
@@ -3222,20 +3180,6 @@ XTring_bell (struct frame *f)
3222 } 3180 }
3223} 3181}
3224 3182
3225
3226/* Specify how many text lines, from the top of the window,
3227 should be affected by insert-lines and delete-lines operations.
3228 This, and those operations, are used only within an update
3229 that is bounded by calls to x_update_begin and x_update_end. */
3230
3231static void
3232XTset_terminal_window (struct frame *f, int n)
3233{
3234 /* This function intentionally left blank. */
3235}
3236
3237
3238
3239/*********************************************************************** 3183/***********************************************************************
3240 Line Dance 3184 Line Dance
3241 ***********************************************************************/ 3185 ***********************************************************************/
@@ -3261,7 +3205,7 @@ x_scroll_run (struct window *w, struct run *run)
3261 /* Get frame-relative bounding box of the text display area of W, 3205 /* Get frame-relative bounding box of the text display area of W,
3262 without mode lines. Include in this box the left and right 3206 without mode lines. Include in this box the left and right
3263 fringe of W. */ 3207 fringe of W. */
3264 window_box (w, -1, &x, &y, &width, &height); 3208 window_box (w, ANY_AREA, &x, &y, &width, &height);
3265 3209
3266#ifdef USE_TOOLKIT_SCROLL_BARS 3210#ifdef USE_TOOLKIT_SCROLL_BARS
3267 /* If the fringe is adjacent to the left (right) scroll bar of a 3211 /* If the fringe is adjacent to the left (right) scroll bar of a
@@ -3777,7 +3721,6 @@ construct_mouse_click (struct input_event *result, XButtonEvent *event, struct f
3777 return Qnil; 3721 return Qnil;
3778} 3722}
3779 3723
3780
3781/* Function to report a mouse movement to the mainstream Emacs code. 3724/* Function to report a mouse movement to the mainstream Emacs code.
3782 The input handler calls this. 3725 The input handler calls this.
3783 3726
@@ -4197,9 +4140,9 @@ xt_action_hook (Widget widget, XtPointer client_data, String action_name,
4197 scroll_bar_end_scroll, 0, 0); 4140 scroll_bar_end_scroll, 0, 0);
4198 w = XWINDOW (window_being_scrolled); 4141 w = XWINDOW (window_being_scrolled);
4199 4142
4200 if (!NILP (XSCROLL_BAR (w->vertical_scroll_bar)->dragging)) 4143 if (XSCROLL_BAR (w->vertical_scroll_bar)->dragging != -1)
4201 { 4144 {
4202 XSCROLL_BAR (w->vertical_scroll_bar)->dragging = Qnil; 4145 XSCROLL_BAR (w->vertical_scroll_bar)->dragging = -1;
4203 /* The thumb size is incorrect while dragging: fix it. */ 4146 /* The thumb size is incorrect while dragging: fix it. */
4204 set_vertical_scroll_bar (w); 4147 set_vertical_scroll_bar (w);
4205 } 4148 }
@@ -4337,32 +4280,32 @@ xm_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data)
4337 switch (cs->reason) 4280 switch (cs->reason)
4338 { 4281 {
4339 case XmCR_DECREMENT: 4282 case XmCR_DECREMENT:
4340 bar->dragging = Qnil; 4283 bar->dragging = -1;
4341 part = scroll_bar_up_arrow; 4284 part = scroll_bar_up_arrow;
4342 break; 4285 break;
4343 4286
4344 case XmCR_INCREMENT: 4287 case XmCR_INCREMENT:
4345 bar->dragging = Qnil; 4288 bar->dragging = -1;
4346 part = scroll_bar_down_arrow; 4289 part = scroll_bar_down_arrow;
4347 break; 4290 break;
4348 4291
4349 case XmCR_PAGE_DECREMENT: 4292 case XmCR_PAGE_DECREMENT:
4350 bar->dragging = Qnil; 4293 bar->dragging = -1;
4351 part = scroll_bar_above_handle; 4294 part = scroll_bar_above_handle;
4352 break; 4295 break;
4353 4296
4354 case XmCR_PAGE_INCREMENT: 4297 case XmCR_PAGE_INCREMENT:
4355 bar->dragging = Qnil; 4298 bar->dragging = -1;
4356 part = scroll_bar_below_handle; 4299 part = scroll_bar_below_handle;
4357 break; 4300 break;
4358 4301
4359 case XmCR_TO_TOP: 4302 case XmCR_TO_TOP:
4360 bar->dragging = Qnil; 4303 bar->dragging = -1;
4361 part = scroll_bar_to_top; 4304 part = scroll_bar_to_top;
4362 break; 4305 break;
4363 4306
4364 case XmCR_TO_BOTTOM: 4307 case XmCR_TO_BOTTOM:
4365 bar->dragging = Qnil; 4308 bar->dragging = -1;
4366 part = scroll_bar_to_bottom; 4309 part = scroll_bar_to_bottom;
4367 break; 4310 break;
4368 4311
@@ -4378,7 +4321,7 @@ xm_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data)
4378 whole = XM_SB_MAX - slider_size; 4321 whole = XM_SB_MAX - slider_size;
4379 portion = min (cs->value, whole); 4322 portion = min (cs->value, whole);
4380 part = scroll_bar_handle; 4323 part = scroll_bar_handle;
4381 bar->dragging = make_number (cs->value); 4324 bar->dragging = cs->value;
4382 } 4325 }
4383 break; 4326 break;
4384 4327
@@ -4426,24 +4369,24 @@ xg_scroll_callback (GtkRange *range,
4426 whole = gtk_adjustment_get_upper (adj) - 4369 whole = gtk_adjustment_get_upper (adj) -
4427 gtk_adjustment_get_page_size (adj); 4370 gtk_adjustment_get_page_size (adj);
4428 portion = min ((int)position, whole); 4371 portion = min ((int)position, whole);
4429 bar->dragging = make_number ((int)portion); 4372 bar->dragging = portion;
4430 } 4373 }
4431 break; 4374 break;
4432 case GTK_SCROLL_STEP_BACKWARD: 4375 case GTK_SCROLL_STEP_BACKWARD:
4433 part = scroll_bar_up_arrow; 4376 part = scroll_bar_up_arrow;
4434 bar->dragging = Qnil; 4377 bar->dragging = -1;
4435 break; 4378 break;
4436 case GTK_SCROLL_STEP_FORWARD: 4379 case GTK_SCROLL_STEP_FORWARD:
4437 part = scroll_bar_down_arrow; 4380 part = scroll_bar_down_arrow;
4438 bar->dragging = Qnil; 4381 bar->dragging = -1;
4439 break; 4382 break;
4440 case GTK_SCROLL_PAGE_BACKWARD: 4383 case GTK_SCROLL_PAGE_BACKWARD:
4441 part = scroll_bar_above_handle; 4384 part = scroll_bar_above_handle;
4442 bar->dragging = Qnil; 4385 bar->dragging = -1;
4443 break; 4386 break;
4444 case GTK_SCROLL_PAGE_FORWARD: 4387 case GTK_SCROLL_PAGE_FORWARD:
4445 part = scroll_bar_below_handle; 4388 part = scroll_bar_below_handle;
4446 bar->dragging = Qnil; 4389 bar->dragging = -1;
4447 break; 4390 break;
4448 } 4391 }
4449 4392
@@ -4457,7 +4400,7 @@ xg_scroll_callback (GtkRange *range,
4457 return FALSE; 4400 return FALSE;
4458} 4401}
4459 4402
4460/* Callback for button release. Sets dragging to Qnil when dragging is done. */ 4403/* Callback for button release. Sets dragging to -1 when dragging is done. */
4461 4404
4462static gboolean 4405static gboolean
4463xg_end_scroll_callback (GtkWidget *widget, 4406xg_end_scroll_callback (GtkWidget *widget,
@@ -4465,7 +4408,7 @@ xg_end_scroll_callback (GtkWidget *widget,
4465 gpointer user_data) 4408 gpointer user_data)
4466{ 4409{
4467 struct scroll_bar *bar = user_data; 4410 struct scroll_bar *bar = user_data;
4468 bar->dragging = Qnil; 4411 bar->dragging = -1;
4469 if (WINDOWP (window_being_scrolled)) 4412 if (WINDOWP (window_being_scrolled))
4470 { 4413 {
4471 x_send_scroll_bar_event (window_being_scrolled, 4414 x_send_scroll_bar_event (window_being_scrolled,
@@ -4513,7 +4456,7 @@ xaw_jump_callback (Widget widget, XtPointer client_data, XtPointer call_data)
4513 part = scroll_bar_handle; 4456 part = scroll_bar_handle;
4514 4457
4515 window_being_scrolled = bar->window; 4458 window_being_scrolled = bar->window;
4516 bar->dragging = make_number (portion); 4459 bar->dragging = portion;
4517 last_scroll_bar_part = part; 4460 last_scroll_bar_part = part;
4518 x_send_scroll_bar_event (bar->window, part, portion, whole); 4461 x_send_scroll_bar_event (bar->window, part, portion, whole);
4519} 4462}
@@ -4552,7 +4495,7 @@ xaw_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data)
4552 part = scroll_bar_move_ratio; 4495 part = scroll_bar_move_ratio;
4553 4496
4554 window_being_scrolled = bar->window; 4497 window_being_scrolled = bar->window;
4555 bar->dragging = Qnil; 4498 bar->dragging = -1;
4556 last_scroll_bar_part = part; 4499 last_scroll_bar_part = part;
4557 x_send_scroll_bar_event (bar->window, part, position, height); 4500 x_send_scroll_bar_event (bar->window, part, position, height);
4558} 4501}
@@ -4828,7 +4771,7 @@ x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int positio
4828 shown = (float) portion / whole; 4771 shown = (float) portion / whole;
4829 } 4772 }
4830 4773
4831 if (NILP (bar->dragging)) 4774 if (bar->dragging == -1)
4832 { 4775 {
4833 int size, value; 4776 int size, value;
4834 4777
@@ -4863,7 +4806,7 @@ x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int positio
4863 NULL); 4806 NULL);
4864 4807
4865 /* Massage the top+shown values. */ 4808 /* Massage the top+shown values. */
4866 if (NILP (bar->dragging) || last_scroll_bar_part == scroll_bar_down_arrow) 4809 if (bar->dragging == -1 || last_scroll_bar_part == scroll_bar_down_arrow)
4867 top = max (0, min (1, top)); 4810 top = max (0, min (1, top));
4868 else 4811 else
4869 top = old_top; 4812 top = old_top;
@@ -4875,7 +4818,7 @@ x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int positio
4875 for `NARROWPROTO'. See s/freebsd.h for an example. */ 4818 for `NARROWPROTO'. See s/freebsd.h for an example. */
4876 if (top != old_top || shown != old_shown) 4819 if (top != old_top || shown != old_shown)
4877 { 4820 {
4878 if (NILP (bar->dragging)) 4821 if (bar->dragging == -1)
4879 XawScrollbarSetThumb (widget, top, shown); 4822 XawScrollbarSetThumb (widget, top, shown);
4880 else 4823 else
4881 { 4824 {
@@ -4940,8 +4883,7 @@ x_scroll_bar_create (struct window *w, int top, int left, int width, int height)
4940 this case, no clear_frame is generated to reduce flickering. */ 4883 this case, no clear_frame is generated to reduce flickering. */
4941 if (width > 0 && height > 0) 4884 if (width > 0 && height > 0)
4942 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 4885 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
4943 left, top, width, 4886 left, top, width, window_box_height (w));
4944 window_box_height (w), False);
4945 4887
4946 window = XCreateWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 4888 window = XCreateWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
4947 /* Position and size of scroll bar. */ 4889 /* Position and size of scroll bar. */
@@ -4967,7 +4909,7 @@ x_scroll_bar_create (struct window *w, int top, int left, int width, int height)
4967 bar->height = height; 4909 bar->height = height;
4968 bar->start = 0; 4910 bar->start = 0;
4969 bar->end = 0; 4911 bar->end = 0;
4970 bar->dragging = Qnil; 4912 bar->dragging = -1;
4971 bar->fringe_extended_p = 0; 4913 bar->fringe_extended_p = 0;
4972 4914
4973 /* Add bar to its frame's list of scroll bars. */ 4915 /* Add bar to its frame's list of scroll bars. */
@@ -5025,7 +4967,7 @@ x_scroll_bar_create (struct window *w, int top, int left, int width, int height)
5025static void 4967static void
5026x_scroll_bar_set_handle (struct scroll_bar *bar, int start, int end, int rebuild) 4968x_scroll_bar_set_handle (struct scroll_bar *bar, int start, int end, int rebuild)
5027{ 4969{
5028 int dragging = ! NILP (bar->dragging); 4970 bool dragging = bar->dragging != -1;
5029 Window w = bar->x_window; 4971 Window w = bar->x_window;
5030 struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); 4972 struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
5031 GC gc = f->output_data.x->normal_gc; 4973 GC gc = f->output_data.x->normal_gc;
@@ -5077,11 +5019,9 @@ x_scroll_bar_set_handle (struct scroll_bar *bar, int start, int end, int rebuild
5077 zero-height areas; that means "clear to end of window." */ 5019 zero-height areas; that means "clear to end of window." */
5078 if (start > 0) 5020 if (start > 0)
5079 x_clear_area (FRAME_X_DISPLAY (f), w, 5021 x_clear_area (FRAME_X_DISPLAY (f), w,
5080 /* x, y, width, height, and exposures. */
5081 VERTICAL_SCROLL_BAR_LEFT_BORDER, 5022 VERTICAL_SCROLL_BAR_LEFT_BORDER,
5082 VERTICAL_SCROLL_BAR_TOP_BORDER, 5023 VERTICAL_SCROLL_BAR_TOP_BORDER,
5083 inside_width, start, 5024 inside_width, start);
5084 False);
5085 5025
5086 /* Change to proper foreground color if one is specified. */ 5026 /* Change to proper foreground color if one is specified. */
5087 if (f->output_data.x->scroll_bar_foreground_pixel != -1) 5027 if (f->output_data.x->scroll_bar_foreground_pixel != -1)
@@ -5104,12 +5044,9 @@ x_scroll_bar_set_handle (struct scroll_bar *bar, int start, int end, int rebuild
5104 clear zero-height areas; that means "clear to end of window." */ 5044 clear zero-height areas; that means "clear to end of window." */
5105 if (end < inside_height) 5045 if (end < inside_height)
5106 x_clear_area (FRAME_X_DISPLAY (f), w, 5046 x_clear_area (FRAME_X_DISPLAY (f), w,
5107 /* x, y, width, height, and exposures. */
5108 VERTICAL_SCROLL_BAR_LEFT_BORDER, 5047 VERTICAL_SCROLL_BAR_LEFT_BORDER,
5109 VERTICAL_SCROLL_BAR_TOP_BORDER + end, 5048 VERTICAL_SCROLL_BAR_TOP_BORDER + end,
5110 inside_width, inside_height - end, 5049 inside_width, inside_height - end);
5111 False);
5112
5113 } 5050 }
5114 5051
5115 unblock_input (); 5052 unblock_input ();
@@ -5161,7 +5098,7 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio
5161#endif 5098#endif
5162 5099
5163 /* Get window dimensions. */ 5100 /* Get window dimensions. */
5164 window_box (w, -1, 0, &window_y, 0, &window_height); 5101 window_box (w, ANY_AREA, 0, &window_y, 0, &window_height);
5165 top = window_y; 5102 top = window_y;
5166 width = WINDOW_CONFIG_SCROLL_BAR_COLS (w) * FRAME_COLUMN_WIDTH (f); 5103 width = WINDOW_CONFIG_SCROLL_BAR_COLS (w) * FRAME_COLUMN_WIDTH (f);
5167 height = window_height; 5104 height = window_height;
@@ -5202,11 +5139,11 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio
5202#ifdef USE_TOOLKIT_SCROLL_BARS 5139#ifdef USE_TOOLKIT_SCROLL_BARS
5203 if (fringe_extended_p) 5140 if (fringe_extended_p)
5204 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 5141 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
5205 sb_left, top, sb_width, height, False); 5142 sb_left, top, sb_width, height);
5206 else 5143 else
5207#endif 5144#endif
5208 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 5145 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
5209 left, top, width, height, False); 5146 left, top, width, height);
5210 unblock_input (); 5147 unblock_input ();
5211 } 5148 }
5212 5149
@@ -5241,10 +5178,10 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio
5241 { 5178 {
5242 if (fringe_extended_p) 5179 if (fringe_extended_p)
5243 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 5180 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
5244 sb_left, top, sb_width, height, False); 5181 sb_left, top, sb_width, height);
5245 else 5182 else
5246 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 5183 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
5247 left, top, width, height, False); 5184 left, top, width, height);
5248 } 5185 }
5249#ifdef USE_GTK 5186#ifdef USE_GTK
5250 xg_update_scrollbar_pos (f, 5187 xg_update_scrollbar_pos (f,
@@ -5268,12 +5205,10 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio
5268 if (VERTICAL_SCROLL_BAR_WIDTH_TRIM) 5205 if (VERTICAL_SCROLL_BAR_WIDTH_TRIM)
5269 { 5206 {
5270 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 5207 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
5271 left, top, VERTICAL_SCROLL_BAR_WIDTH_TRIM, 5208 left, top, VERTICAL_SCROLL_BAR_WIDTH_TRIM, height);
5272 height, False);
5273 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 5209 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
5274 left + width - VERTICAL_SCROLL_BAR_WIDTH_TRIM, 5210 left + width - VERTICAL_SCROLL_BAR_WIDTH_TRIM,
5275 top, VERTICAL_SCROLL_BAR_WIDTH_TRIM, 5211 top, VERTICAL_SCROLL_BAR_WIDTH_TRIM, height);
5276 height, False);
5277 } 5212 }
5278 5213
5279 /* Clear areas not covered by the scroll bar because it's not as 5214 /* Clear areas not covered by the scroll bar because it's not as
@@ -5287,11 +5222,10 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio
5287 { 5222 {
5288 if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)) 5223 if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w))
5289 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 5224 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
5290 left + area_width - rest, top, 5225 left + area_width - rest, top, rest, height);
5291 rest, height, False);
5292 else 5226 else
5293 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 5227 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
5294 left, top, rest, height, False); 5228 left, top, rest, height);
5295 } 5229 }
5296 } 5230 }
5297 5231
@@ -5326,7 +5260,7 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio
5326#else /* not USE_TOOLKIT_SCROLL_BARS */ 5260#else /* not USE_TOOLKIT_SCROLL_BARS */
5327 /* Set the scroll bar's current state, unless we're currently being 5261 /* Set the scroll bar's current state, unless we're currently being
5328 dragged. */ 5262 dragged. */
5329 if (NILP (bar->dragging)) 5263 if (bar->dragging == -1)
5330 { 5264 {
5331 int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, height); 5265 int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, height);
5332 5266
@@ -5536,14 +5470,13 @@ x_scroll_bar_handle_click (struct scroll_bar *bar, XEvent *event, struct input_e
5536 5470
5537#ifndef USE_TOOLKIT_SCROLL_BARS 5471#ifndef USE_TOOLKIT_SCROLL_BARS
5538 /* If the user has released the handle, set it to its final position. */ 5472 /* If the user has released the handle, set it to its final position. */
5539 if (event->type == ButtonRelease 5473 if (event->type == ButtonRelease && bar->dragging != -1)
5540 && ! NILP (bar->dragging))
5541 { 5474 {
5542 int new_start = y - XINT (bar->dragging); 5475 int new_start = y - bar->dragging;
5543 int new_end = new_start + bar->end - bar->start; 5476 int new_end = new_start + bar->end - bar->start;
5544 5477
5545 x_scroll_bar_set_handle (bar, new_start, new_end, 0); 5478 x_scroll_bar_set_handle (bar, new_start, new_end, 0);
5546 bar->dragging = Qnil; 5479 bar->dragging = -1;
5547 } 5480 }
5548#endif 5481#endif
5549 5482
@@ -5560,20 +5493,20 @@ x_scroll_bar_handle_click (struct scroll_bar *bar, XEvent *event, struct input_e
5560 mark bits. */ 5493 mark bits. */
5561 5494
5562static void 5495static void
5563x_scroll_bar_note_movement (struct scroll_bar *bar, XEvent *event) 5496x_scroll_bar_note_movement (struct scroll_bar *bar, XMotionEvent *event)
5564{ 5497{
5565 struct frame *f = XFRAME (XWINDOW (bar->window)->frame); 5498 struct frame *f = XFRAME (XWINDOW (bar->window)->frame);
5566 5499
5567 last_mouse_movement_time = event->xmotion.time; 5500 last_mouse_movement_time = event->time;
5568 5501
5569 f->mouse_moved = 1; 5502 f->mouse_moved = 1;
5570 XSETVECTOR (last_mouse_scroll_bar, bar); 5503 XSETVECTOR (last_mouse_scroll_bar, bar);
5571 5504
5572 /* If we're dragging the bar, display it. */ 5505 /* If we're dragging the bar, display it. */
5573 if (! NILP (bar->dragging)) 5506 if (bar->dragging != -1)
5574 { 5507 {
5575 /* Where should the handle be now? */ 5508 /* Where should the handle be now? */
5576 int new_start = event->xmotion.y - XINT (bar->dragging); 5509 int new_start = event->y - bar->dragging;
5577 5510
5578 if (new_start != bar->start) 5511 if (new_start != bar->start)
5579 { 5512 {
@@ -5625,8 +5558,8 @@ x_scroll_bar_report_motion (struct frame **fp, Lisp_Object *bar_window,
5625 5558
5626 win_y -= VERTICAL_SCROLL_BAR_TOP_BORDER; 5559 win_y -= VERTICAL_SCROLL_BAR_TOP_BORDER;
5627 5560
5628 if (! NILP (bar->dragging)) 5561 if (bar->dragging != -1)
5629 win_y -= XINT (bar->dragging); 5562 win_y -= bar->dragging;
5630 5563
5631 if (win_y < 0) 5564 if (win_y < 0)
5632 win_y = 0; 5565 win_y = 0;
@@ -5636,7 +5569,7 @@ x_scroll_bar_report_motion (struct frame **fp, Lisp_Object *bar_window,
5636 *fp = f; 5569 *fp = f;
5637 *bar_window = bar->window; 5570 *bar_window = bar->window;
5638 5571
5639 if (! NILP (bar->dragging)) 5572 if (bar->dragging != -1)
5640 *part = scroll_bar_handle; 5573 *part = scroll_bar_handle;
5641 else if (win_y < bar->start) 5574 else if (win_y < bar->start)
5642 *part = scroll_bar_above_handle; 5575 *part = scroll_bar_above_handle;
@@ -5681,18 +5614,7 @@ x_scroll_bar_clear (struct frame *f)
5681#endif /* not USE_TOOLKIT_SCROLL_BARS */ 5614#endif /* not USE_TOOLKIT_SCROLL_BARS */
5682} 5615}
5683 5616
5684 5617#ifdef ENABLE_CHECKING
5685/* The main X event-reading loop - XTread_socket. */
5686
5687/* This holds the state XLookupString needs to implement dead keys
5688 and other tricks known as "compose processing". _X Window System_
5689 says that a portable program can't use this, but Stephen Gildea assures
5690 me that letting the compiler initialize it to zeros will work okay.
5691
5692 This must be defined outside of XTread_socket, for the same reasons
5693 given for enter_timestamp, above. */
5694
5695static XComposeStatus compose_status;
5696 5618
5697/* Record the last 100 characters stored 5619/* Record the last 100 characters stored
5698 to help debug the loss-of-chars-during-GC problem. */ 5620 to help debug the loss-of-chars-during-GC problem. */
@@ -5705,6 +5627,12 @@ static short temp_buffer[100];
5705 temp_index = 0; \ 5627 temp_index = 0; \
5706 temp_buffer[temp_index++] = (keysym) 5628 temp_buffer[temp_index++] = (keysym)
5707 5629
5630#else /* not ENABLE_CHECKING */
5631
5632#define STORE_KEYSYM_FOR_DEBUG(keysym) ((void)0)
5633
5634#endif /* ENABLE_CHECKING */
5635
5708/* Set this to nonzero to fake an "X I/O error" 5636/* Set this to nonzero to fake an "X I/O error"
5709 on a particular display. */ 5637 on a particular display. */
5710 5638
@@ -5842,6 +5770,12 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
5842 struct coding_system coding; 5770 struct coding_system coding;
5843 XEvent event = *eventptr; 5771 XEvent event = *eventptr;
5844 Mouse_HLInfo *hlinfo = &dpyinfo->mouse_highlight; 5772 Mouse_HLInfo *hlinfo = &dpyinfo->mouse_highlight;
5773 /* This holds the state XLookupString needs to implement dead keys
5774 and other tricks known as "compose processing". _X Window System_
5775 says that a portable program can't use this, but Stephen Gildea assures
5776 me that letting the compiler initialize it to zeros will work okay. */
5777 static XComposeStatus compose_status;
5778
5845 USE_SAFE_ALLOCA; 5779 USE_SAFE_ALLOCA;
5846 5780
5847 *finish = X_EVENT_NORMAL; 5781 *finish = X_EVENT_NORMAL;
@@ -6135,11 +6069,10 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
6135 { 6069 {
6136#ifdef USE_GTK 6070#ifdef USE_GTK
6137 /* This seems to be needed for GTK 2.6. */ 6071 /* This seems to be needed for GTK 2.6. */
6138 x_clear_area (event.xexpose.display, 6072 x_clear_area (event.xexpose.display,
6139 event.xexpose.window, 6073 event.xexpose.window,
6140 event.xexpose.x, event.xexpose.y, 6074 event.xexpose.x, event.xexpose.y,
6141 event.xexpose.width, event.xexpose.height, 6075 event.xexpose.width, event.xexpose.height);
6142 FALSE);
6143#endif 6076#endif
6144 if (!FRAME_VISIBLE_P (f)) 6077 if (!FRAME_VISIBLE_P (f))
6145 { 6078 {
@@ -6211,7 +6144,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
6211 6144
6212 case UnmapNotify: 6145 case UnmapNotify:
6213 /* Redo the mouse-highlight after the tooltip has gone. */ 6146 /* Redo the mouse-highlight after the tooltip has gone. */
6214 if (event.xmap.window == tip_window) 6147 if (event.xunmap.window == tip_window)
6215 { 6148 {
6216 tip_window = 0; 6149 tip_window = 0;
6217 redo_mouse_highlight (); 6150 redo_mouse_highlight ();
@@ -6715,18 +6648,16 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
6715 /* Generate SELECT_WINDOW_EVENTs when needed. 6648 /* Generate SELECT_WINDOW_EVENTs when needed.
6716 Don't let popup menus influence things (bug#1261). */ 6649 Don't let popup menus influence things (bug#1261). */
6717 if (!NILP (Vmouse_autoselect_window) && !popup_activated ()) 6650 if (!NILP (Vmouse_autoselect_window) && !popup_activated ())
6718 { 6651 {
6719 Lisp_Object window; 6652 static Lisp_Object last_mouse_window;
6720 6653 Lisp_Object window = window_from_coordinates
6721 window = window_from_coordinates (f, 6654 (f, event.xmotion.x, event.xmotion.y, 0, 0);
6722 event.xmotion.x, event.xmotion.y, 6655
6723 0, 0); 6656 /* Window will be selected only when it is not selected now and
6724 6657 last mouse movement event was not in it. Minibuffer window
6725 /* Window will be selected only when it is not selected now and 6658 will be selected only when it is active. */
6726 last mouse movement event was not in it. Minibuffer window 6659 if (WINDOWP (window)
6727 will be selected only when it is active. */ 6660 && !EQ (window, last_mouse_window)
6728 if (WINDOWP (window)
6729 && !EQ (window, last_window)
6730 && !EQ (window, selected_window) 6661 && !EQ (window, selected_window)
6731 /* For click-to-focus window managers 6662 /* For click-to-focus window managers
6732 create event iff we don't leave the 6663 create event iff we don't leave the
@@ -6734,13 +6665,13 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
6734 && (focus_follows_mouse 6665 && (focus_follows_mouse
6735 || (EQ (XWINDOW (window)->frame, 6666 || (EQ (XWINDOW (window)->frame,
6736 XWINDOW (selected_window)->frame)))) 6667 XWINDOW (selected_window)->frame))))
6737 { 6668 {
6738 inev.ie.kind = SELECT_WINDOW_EVENT; 6669 inev.ie.kind = SELECT_WINDOW_EVENT;
6739 inev.ie.frame_or_window = window; 6670 inev.ie.frame_or_window = window;
6740 } 6671 }
6741 6672 /* Remember the last window where we saw the mouse. */
6742 last_window=window; 6673 last_mouse_window = window;
6743 } 6674 }
6744 if (!note_mouse_movement (f, &event.xmotion)) 6675 if (!note_mouse_movement (f, &event.xmotion))
6745 help_echo_string = previous_help_echo_string; 6676 help_echo_string = previous_help_echo_string;
6746 } 6677 }
@@ -6752,7 +6683,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
6752 event.xmotion.window); 6683 event.xmotion.window);
6753 6684
6754 if (bar) 6685 if (bar)
6755 x_scroll_bar_note_movement (bar, &event); 6686 x_scroll_bar_note_movement (bar, &event.xmotion);
6756#endif /* USE_TOOLKIT_SCROLL_BARS */ 6687#endif /* USE_TOOLKIT_SCROLL_BARS */
6757 6688
6758 /* If we move outside the frame, then we're 6689 /* If we move outside the frame, then we're
@@ -7184,7 +7115,8 @@ XTread_socket (struct terminal *terminal, struct input_event *hold_quit)
7184 mode lines must be clipped to the whole window. */ 7115 mode lines must be clipped to the whole window. */
7185 7116
7186static void 7117static void
7187x_clip_to_row (struct window *w, struct glyph_row *row, int area, GC gc) 7118x_clip_to_row (struct window *w, struct glyph_row *row,
7119 enum glyph_row_area area, GC gc)
7188{ 7120{
7189 struct frame *f = XFRAME (WINDOW_FRAME (w)); 7121 struct frame *f = XFRAME (WINDOW_FRAME (w));
7190 XRectangle clip_rect; 7122 XRectangle clip_rect;
@@ -7366,8 +7298,7 @@ x_define_frame_cursor (struct frame *f, Cursor cursor)
7366static void 7298static void
7367x_clear_frame_area (struct frame *f, int x, int y, int width, int height) 7299x_clear_frame_area (struct frame *f, int x, int y, int width, int height)
7368{ 7300{
7369 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 7301 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), x, y, width, height);
7370 x, y, width, height, False);
7371#ifdef USE_GTK 7302#ifdef USE_GTK
7372 /* Must queue a redraw, because scroll bars might have been cleared. */ 7303 /* Must queue a redraw, because scroll bars might have been cleared. */
7373 if (FRAME_GTK_WIDGET (f)) 7304 if (FRAME_GTK_WIDGET (f))
@@ -7434,9 +7365,7 @@ x_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, int x,
7434#endif 7365#endif
7435 } 7366 }
7436 7367
7437#ifndef XFlush
7438 XFlush (FRAME_X_DISPLAY (f)); 7368 XFlush (FRAME_X_DISPLAY (f));
7439#endif
7440} 7369}
7441 7370
7442 7371
@@ -8189,9 +8118,6 @@ x_set_offset (struct frame *f, register int xoff, register int yoff, int change_
8189 8118
8190 if (change_gravity > 0) 8119 if (change_gravity > 0)
8191 { 8120 {
8192 FRAME_X_OUTPUT (f)->left_before_move = f->left_pos;
8193 FRAME_X_OUTPUT (f)->top_before_move = f->top_pos;
8194
8195 f->top_pos = yoff; 8121 f->top_pos = yoff;
8196 f->left_pos = xoff; 8122 f->left_pos = xoff;
8197 f->size_hint_flags &= ~ (XNegative | YNegative); 8123 f->size_hint_flags &= ~ (XNegative | YNegative);
@@ -8690,7 +8616,7 @@ x_wait_for_event (struct frame *f, int eventtype)
8690{ 8616{
8691 int level = interrupt_input_blocked; 8617 int level = interrupt_input_blocked;
8692 8618
8693 SELECT_TYPE fds; 8619 fd_set fds;
8694 struct timespec tmo, tmo_at, time_now; 8620 struct timespec tmo, tmo_at, time_now;
8695 int fd = ConnectionNumber (FRAME_X_DISPLAY (f)); 8621 int fd = ConnectionNumber (FRAME_X_DISPLAY (f));
8696 8622
@@ -10250,9 +10176,6 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
10250 dpyinfo->x_dnd_atoms_size = 8; 10176 dpyinfo->x_dnd_atoms_size = 8;
10251 dpyinfo->x_dnd_atoms = xmalloc (sizeof *dpyinfo->x_dnd_atoms 10177 dpyinfo->x_dnd_atoms = xmalloc (sizeof *dpyinfo->x_dnd_atoms
10252 * dpyinfo->x_dnd_atoms_size); 10178 * dpyinfo->x_dnd_atoms_size);
10253
10254 connection = ConnectionNumber (dpyinfo->display);
10255 dpyinfo->connection = connection;
10256 dpyinfo->gray 10179 dpyinfo->gray
10257 = XCreatePixmapFromBitmapData (dpyinfo->display, dpyinfo->root_window, 10180 = XCreatePixmapFromBitmapData (dpyinfo->display, dpyinfo->root_window,
10258 gray_bits, gray_width, gray_height, 10181 gray_bits, gray_width, gray_height,
@@ -10264,6 +10187,8 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
10264 10187
10265 xsettings_initialize (dpyinfo); 10188 xsettings_initialize (dpyinfo);
10266 10189
10190 connection = ConnectionNumber (dpyinfo->display);
10191
10267 /* This is only needed for distinguishing keyboard and process input. */ 10192 /* This is only needed for distinguishing keyboard and process input. */
10268 if (connection != 0) 10193 if (connection != 0)
10269 add_keyboard_wait_descriptor (connection); 10194 add_keyboard_wait_descriptor (connection);
@@ -10364,8 +10289,6 @@ x_delete_display (struct x_display_info *dpyinfo)
10364 break; 10289 break;
10365 } 10290 }
10366 10291
10367 delete_keyboard_wait_descriptor (dpyinfo->connection);
10368
10369 /* Discard this display from x_display_name_list and x_display_list. 10292 /* Discard this display from x_display_name_list and x_display_list.
10370 We can't use Fdelq because that can quit. */ 10293 We can't use Fdelq because that can quit. */
10371 if (! NILP (x_display_name_list) 10294 if (! NILP (x_display_name_list)
@@ -10466,13 +10389,7 @@ static struct redisplay_interface x_redisplay_interface =
10466 x_after_update_window_line, 10389 x_after_update_window_line,
10467 x_update_window_begin, 10390 x_update_window_begin,
10468 x_update_window_end, 10391 x_update_window_end,
10469 x_cursor_to,
10470 x_flush,
10471#ifdef XFlush
10472 x_flush, 10392 x_flush,
10473#else
10474 0, /* flush_display_optional */
10475#endif
10476 x_clear_window_mouse_face, 10393 x_clear_window_mouse_face,
10477 x_get_glyph_overhangs, 10394 x_get_glyph_overhangs,
10478 x_fix_overlapping_area, 10395 x_fix_overlapping_area,
@@ -10494,6 +10411,7 @@ void
10494x_delete_terminal (struct terminal *terminal) 10411x_delete_terminal (struct terminal *terminal)
10495{ 10412{
10496 struct x_display_info *dpyinfo = terminal->display_info.x; 10413 struct x_display_info *dpyinfo = terminal->display_info.x;
10414 int connection = -1;
10497 10415
10498 /* Protect against recursive calls. delete_frame in 10416 /* Protect against recursive calls. delete_frame in
10499 delete_terminal calls us back when it deletes our last frame. */ 10417 delete_terminal calls us back when it deletes our last frame. */
@@ -10512,6 +10430,8 @@ x_delete_terminal (struct terminal *terminal)
10512 and dpyinfo->display was set to 0 to indicate that. */ 10430 and dpyinfo->display was set to 0 to indicate that. */
10513 if (dpyinfo->display) 10431 if (dpyinfo->display)
10514 { 10432 {
10433 connection = ConnectionNumber (dpyinfo->display);
10434
10515 x_destroy_all_bitmaps (dpyinfo); 10435 x_destroy_all_bitmaps (dpyinfo);
10516 XSetCloseDownMode (dpyinfo->display, DestroyAll); 10436 XSetCloseDownMode (dpyinfo->display, DestroyAll);
10517 10437
@@ -10552,6 +10472,10 @@ x_delete_terminal (struct terminal *terminal)
10552#endif /* ! USE_GTK */ 10472#endif /* ! USE_GTK */
10553 } 10473 }
10554 10474
10475 /* No more input on this descriptor. */
10476 if (connection != -1)
10477 delete_keyboard_wait_descriptor (connection);
10478
10555 /* Mark as dead. */ 10479 /* Mark as dead. */
10556 dpyinfo->display = NULL; 10480 dpyinfo->display = NULL;
10557 x_delete_display (dpyinfo); 10481 x_delete_display (dpyinfo);
@@ -10579,11 +10503,11 @@ x_create_terminal (struct x_display_info *dpyinfo)
10579 terminal->delete_glyphs_hook = x_delete_glyphs; 10503 terminal->delete_glyphs_hook = x_delete_glyphs;
10580 terminal->ring_bell_hook = XTring_bell; 10504 terminal->ring_bell_hook = XTring_bell;
10581 terminal->toggle_invisible_pointer_hook = XTtoggle_invisible_pointer; 10505 terminal->toggle_invisible_pointer_hook = XTtoggle_invisible_pointer;
10582 terminal->reset_terminal_modes_hook = XTreset_terminal_modes; 10506 terminal->reset_terminal_modes_hook = NULL;
10583 terminal->set_terminal_modes_hook = XTset_terminal_modes; 10507 terminal->set_terminal_modes_hook = NULL;
10584 terminal->update_begin_hook = x_update_begin; 10508 terminal->update_begin_hook = x_update_begin;
10585 terminal->update_end_hook = x_update_end; 10509 terminal->update_end_hook = x_update_end;
10586 terminal->set_terminal_window_hook = XTset_terminal_window; 10510 terminal->set_terminal_window_hook = NULL;
10587 terminal->read_socket_hook = XTread_socket; 10511 terminal->read_socket_hook = XTread_socket;
10588 terminal->frame_up_to_date_hook = XTframe_up_to_date; 10512 terminal->frame_up_to_date_hook = XTframe_up_to_date;
10589 terminal->mouse_position_hook = XTmouse_position; 10513 terminal->mouse_position_hook = XTmouse_position;
diff --git a/src/xterm.h b/src/xterm.h
index 723550c57c4..883a249629d 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -20,8 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20#ifndef XTERM_H 20#ifndef XTERM_H
21#define XTERM_H 21#define XTERM_H
22 22
23#include "dispextern.h"
24
25#include <X11/Xlib.h> 23#include <X11/Xlib.h>
26#include <X11/cursorfont.h> 24#include <X11/cursorfont.h>
27 25
@@ -73,14 +71,13 @@ typedef GtkWidget *xt_or_gtk_widget;
73#define USE_GTK_TOOLTIP 71#define USE_GTK_TOOLTIP
74#endif 72#endif
75 73
76
77/* Bookkeeping to distinguish X versions. */
78
79
80#ifdef HAVE_X_I18N 74#ifdef HAVE_X_I18N
81#include <X11/Xlocale.h> 75#include <X11/Xlocale.h>
82#endif 76#endif
83 77
78#include "dispextern.h"
79#include "termhooks.h"
80
84#define BLACK_PIX_DEFAULT(f) BlackPixel (FRAME_X_DISPLAY (f), \ 81#define BLACK_PIX_DEFAULT(f) BlackPixel (FRAME_X_DISPLAY (f), \
85 XScreenNumberOfScreen (FRAME_X_SCREEN (f))) 82 XScreenNumberOfScreen (FRAME_X_SCREEN (f)))
86#define WHITE_PIX_DEFAULT(f) WhitePixel (FRAME_X_DISPLAY (f), \ 83#define WHITE_PIX_DEFAULT(f) WhitePixel (FRAME_X_DISPLAY (f), \
@@ -141,9 +138,6 @@ struct x_display_info
141 /* The generic display parameters corresponding to this X display. */ 138 /* The generic display parameters corresponding to this X display. */
142 struct terminal *terminal; 139 struct terminal *terminal;
143 140
144 /* Connection number (normally a file descriptor number). */
145 int connection;
146
147 /* This says how to access this display in Xlib. */ 141 /* This says how to access this display in Xlib. */
148 Display *display; 142 Display *display;
149 143
@@ -409,9 +403,6 @@ extern bool x_display_ok (const char *);
409 403
410extern void select_visual (struct x_display_info *); 404extern void select_visual (struct x_display_info *);
411 405
412
413struct font;
414
415/* Each X frame object points to its own struct x_output object 406/* Each X frame object points to its own struct x_output object
416 in the output_data.x field. The x_output structure contains 407 in the output_data.x field. The x_output structure contains
417 the information that is specific to X windows. */ 408 the information that is specific to X windows. */
@@ -632,11 +623,6 @@ struct x_output
632 int move_offset_top; 623 int move_offset_top;
633 int move_offset_left; 624 int move_offset_left;
634 625
635 /* The frame's left/top offsets before we call XMoveWindow. See
636 x_check_expected_move. */
637 int left_before_move;
638 int top_before_move;
639
640 /* Non-zero if _NET_WM_STATE_HIDDEN is set for this frame. */ 626 /* Non-zero if _NET_WM_STATE_HIDDEN is set for this frame. */
641 unsigned net_wm_state_hidden_seen : 1; 627 unsigned net_wm_state_hidden_seen : 1;
642}; 628};
@@ -812,8 +798,8 @@ struct scroll_bar
812 /* If the scroll bar handle is currently being dragged by the user, 798 /* If the scroll bar handle is currently being dragged by the user,
813 this is the number of pixels from the top of the handle to the 799 this is the number of pixels from the top of the handle to the
814 place where the user grabbed it. If the handle isn't currently 800 place where the user grabbed it. If the handle isn't currently
815 being dragged, this is Qnil. */ 801 being dragged, this is -1. */
816 Lisp_Object dragging; 802 int dragging;
817 803
818 /* 1 if the background of the fringe that is adjacent to a scroll 804 /* 1 if the background of the fringe that is adjacent to a scroll
819 bar is extended to the gap between the fringe and the bar. */ 805 bar is extended to the gap between the fringe and the bar. */
@@ -919,14 +905,6 @@ struct selection_input_event
919#define SELECTION_EVENT_TIME(eventp) \ 905#define SELECTION_EVENT_TIME(eventp) \
920 (((struct selection_input_event *) (eventp))->time) 906 (((struct selection_input_event *) (eventp))->time)
921 907
922
923struct window;
924struct glyph_matrix;
925struct frame;
926struct input_event;
927struct face;
928struct image;
929
930/* From xselect.c. */ 908/* From xselect.c. */
931 909
932void x_handle_selection_notify (XSelectionEvent *); 910void x_handle_selection_notify (XSelectionEvent *);
@@ -968,7 +946,7 @@ extern bool x_alloc_lighter_color_for_widget (Widget, Display *, Colormap,
968#endif 946#endif
969extern bool x_alloc_nearest_color (struct frame *, Colormap, XColor *); 947extern bool x_alloc_nearest_color (struct frame *, Colormap, XColor *);
970extern void x_query_color (struct frame *f, XColor *); 948extern void x_query_color (struct frame *f, XColor *);
971extern void x_clear_area (Display *, Window, int, int, int, int, int); 949extern void x_clear_area (Display *, Window, int, int, int, int);
972#if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK 950#if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK
973extern void x_mouse_leave (struct x_display_info *); 951extern void x_mouse_leave (struct x_display_info *);
974#endif 952#endif
diff --git a/test/ChangeLog b/test/ChangeLog
index 969bc3c4939..7b39097d3b5 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,14 @@
12013-09-01 Glenn Morris <rgm@gnu.org>
2
3 * automated/Makefile.in (setwins): Avoid leading space in $wins.
4 Otherwise the sed command used by eg compile-main ends up
5 containing "/*.el". (Bug#15170)
6
72013-08-28 Paul Eggert <eggert@cs.ucla.edu>
8
9 * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
10 for portability to hosts where /bin/sh has problems.
11
12013-08-21 David Engster <deng@randomsample.de> 122013-08-21 David Engster <deng@randomsample.de>
2 13
3 * automated/eieio-tests.el, automated/eieio-test-persist.el: 14 * automated/eieio-tests.el, automated/eieio-test-persist.el:
diff --git a/test/automated/Makefile.in b/test/automated/Makefile.in
index d4bfcc12130..bf8e62f77cd 100644
--- a/test/automated/Makefile.in
+++ b/test/automated/Makefile.in
@@ -17,7 +17,7 @@
17# You should have received a copy of the GNU General Public License 17# You should have received a copy of the GNU General Public License
18# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. 18# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
19 19
20SHELL = /bin/sh 20SHELL = @SHELL@
21 21
22srcdir = @srcdir@ 22srcdir = @srcdir@
23top_srcdir = @top_srcdir@ 23top_srcdir = @top_srcdir@
@@ -52,7 +52,7 @@ emacs = EMACSLOADPATH=$(lispsrc):$(test) LC_ALL=C $(EMACS) $(EMACSOPT)
52setwins=subdirs=`find . -type d -print`; \ 52setwins=subdirs=`find . -type d -print`; \
53 for file in $$subdirs; do \ 53 for file in $$subdirs; do \
54 case $$file in */.* | */.*/* | */=* | ./data* ) ;; \ 54 case $$file in */.* | */.*/* | */=* | ./data* ) ;; \
55 *) wins="$$wins $$file" ;; \ 55 *) wins="$$wins$${wins:+ }$$file" ;; \
56 esac; \ 56 esac; \
57 done 57 done
58 58
diff --git a/test/automated/eieio-test-methodinvoke.el b/test/automated/eieio-test-methodinvoke.el
index 76a28919f21..db8618c811e 100644
--- a/test/automated/eieio-test-methodinvoke.el
+++ b/test/automated/eieio-test-methodinvoke.el
@@ -1,4 +1,4 @@
1;;; eieio-testsinvoke.el -- eieio tests for method invokation 1;;; eieio-testsinvoke.el -- eieio tests for method invocation
2 2
3;; Copyright (C) 2005, 2008, 2010, 2013 Free Software Foundation, Inc. 3;; Copyright (C) 2005, 2008, 2010, 2013 Free Software Foundation, Inc.
4 4
@@ -136,7 +136,7 @@
136 (setq eieio-test-method-order-list (nreverse eieio-test-method-order-list)) 136 (setq eieio-test-method-order-list (nreverse eieio-test-method-order-list))
137 (eieio-test-match ans))) 137 (eieio-test-match ans)))
138 138
139;;; Test static invokation 139;;; Test static invocation
140;; 140;;
141(defmethod eitest-H :STATIC ((class eitest-A)) 141(defmethod eitest-H :STATIC ((class eitest-A))
142 "No need to do work in here." 142 "No need to do work in here."
diff --git a/test/automated/eieio-tests.el b/test/automated/eieio-tests.el
index 2d8ae4c7d43..144f0bc919d 100644
--- a/test/automated/eieio-tests.el
+++ b/test/automated/eieio-tests.el
@@ -21,7 +21,7 @@
21;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. 21;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
22 22
23;;; Commentary: 23;;; Commentary:
24;; 24;;
25;; Test the various features of EIEIO. 25;; Test the various features of EIEIO.
26 26
27(require 'ert) 27(require 'ert)
@@ -66,7 +66,7 @@
66 :initform moose 66 :initform moose
67 :type symbol 67 :type symbol
68 :allocation :instance 68 :allocation :instance
69 :documentation "Fisrt slot testing slot arguments." 69 :documentation "First slot testing slot arguments."
70 :custom symbol 70 :custom symbol
71 :label "Wild Animal" 71 :label "Wild Animal"
72 :group borg 72 :group borg
@@ -166,7 +166,7 @@
166 (defun anormalfunction () "A plain function for error testing." nil) 166 (defun anormalfunction () "A plain function for error testing." nil)
167 (should-error 167 (should-error
168 (progn 168 (progn
169 (defgeneric anormalfunction () 169 (defgeneric anormalfunction ()
170 "Attempt to turn it into a generic."))) 170 "Attempt to turn it into a generic.")))
171 171
172 ;; Check that generic-p works 172 ;; Check that generic-p works
@@ -589,7 +589,7 @@ METHOD is the method that was attempting to be called."
589 ;;; HACK ALERT: The new value of a class slot is inherited by the 589 ;;; HACK ALERT: The new value of a class slot is inherited by the
590 ;; subclass! This is probably a bug. We should either share the slot 590 ;; subclass! This is probably a bug. We should either share the slot
591 ;; so sets on the baseclass change the subclass, or we should inherit 591 ;; so sets on the baseclass change the subclass, or we should inherit
592 ;; the original value. 592 ;; the original value.
593;; (should (eq (get-slot-3 eitest-t2) 'emu)) 593;; (should (eq (get-slot-3 eitest-t2) 'emu))
594;; (should (eq (get-slot-3 class-subc) 'emu)) 594;; (should (eq (get-slot-3 class-subc) 'emu))
595;; (setf (get-slot-3 eitest-t2) 'setf-emu) 595;; (setf (get-slot-3 eitest-t2) 'setf-emu)
@@ -604,7 +604,7 @@ METHOD is the method that was attempting to be called."
604 "Try to access slot-2 from this class which doesn't have it. 604 "Try to access slot-2 from this class which doesn't have it.
605The object S2 passed in will be of class prot-1, which does have 605The object S2 passed in will be of class prot-1, which does have
606the slot. This could be allowed, and currently is in EIEIO. 606the slot. This could be allowed, and currently is in EIEIO.
607Needed by the eieio persistant base class." 607Needed by the eieio persistent base class."
608 (oref s2 slot-2)) 608 (oref s2 slot-2))
609 609
610(defclass prot-1 (prot-0) 610(defclass prot-1 (prot-0)
@@ -662,7 +662,7 @@ Do not override for `prot-2'."
662 (prot0-slot-2 eitest-p1) 662 (prot0-slot-2 eitest-p1)
663 ;; Accessing private slot out of context must fail 663 ;; Accessing private slot out of context must fail
664 (should-error (oref eitest-p1 slot-3) :type 'invalid-slot-name) 664 (should-error (oref eitest-p1 slot-3) :type 'invalid-slot-name)
665 ;; Access private slot in ethod 665 ;; Access private slot in method
666 (prot1-slot-3 eitest-p1) 666 (prot1-slot-3 eitest-p1)
667 ;; Access private slot in subclass method must fail 667 ;; Access private slot in subclass method must fail
668 (should-error (prot1-slot-3 eitest-p2) :type 'invalid-slot-name) 668 (should-error (prot1-slot-3 eitest-p2) :type 'invalid-slot-name)
@@ -713,7 +713,7 @@ Do not override for `prot-2'."
713Subclasses to override slot attributes.") 713Subclasses to override slot attributes.")
714 714
715(defclass slotattr-ok (slotattr-base) 715(defclass slotattr-ok (slotattr-base)
716 ((initform :initform no-init) 716 ((initform :initform no-init)
717 (initarg :initarg :initblarg) 717 (initarg :initarg :initblarg)
718 (custom :custom string 718 (custom :custom string
719 :label "One String" 719 :label "One String"
@@ -767,7 +767,7 @@ Subclasses to override slot attributes.")
767Subclasses to override slot attributes.") 767Subclasses to override slot attributes.")
768 768
769(defclass slotattr-class-ok (slotattr-class-base) 769(defclass slotattr-class-ok (slotattr-class-base)
770 ((initform :initform no-init) 770 ((initform :initform no-init)
771 (initarg :initarg :initblarg) 771 (initarg :initarg :initblarg)
772 (custom :custom string 772 (custom :custom string
773 :label "One String" 773 :label "One String"
diff --git a/test/indent/ruby.rb b/test/indent/ruby.rb
index 853f4dbf992..af1bbb9d8ab 100644
--- a/test/indent/ruby.rb
+++ b/test/indent/ruby.rb
@@ -66,3 +66,8 @@ end
66Given /toto/ do 66Given /toto/ do
67 print "hello" 67 print "hello"
68end 68end
69
70# Bug#15208
71if something == :==
72 do_something
73end