aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog14
-rw-r--r--Makefile.in20
-rw-r--r--admin/ChangeLog4
-rw-r--r--admin/charsets/Makefile16
-rw-r--r--doc/emacs/ChangeLog16
-rw-r--r--doc/emacs/maintaining.texi2
-rw-r--r--doc/emacs/mini.texi4
-rw-r--r--doc/emacs/search.texi13
-rw-r--r--doc/lispintro/ChangeLog5
-rw-r--r--doc/lispintro/emacs-lisp-intro.texi4
-rw-r--r--doc/lispref/ChangeLog11
-rw-r--r--doc/lispref/functions.texi81
-rw-r--r--doc/lispref/macros.texi47
-rw-r--r--etc/ChangeLog4
-rw-r--r--etc/NEWS40
-rw-r--r--etc/charsets/JISC6226.map7
-rw-r--r--lisp/ChangeLog30
-rw-r--r--lisp/cedet/ChangeLog30
-rw-r--r--lisp/cedet/cedet.el2
-rw-r--r--lisp/cedet/semantic.el37
-rw-r--r--lisp/cedet/semantic/analyze/complete.el33
-rw-r--r--lisp/cedet/semantic/complete.el5
-rw-r--r--lisp/cedet/semantic/senator.el3
-rw-r--r--lisp/cedet/semantic/wisent/python.el27
-rw-r--r--lisp/emacs-lisp/byte-run.el3
-rw-r--r--lisp/erc/ChangeLog17
-rw-r--r--lisp/erc/erc-backend.el2
-rw-r--r--lisp/erc/erc.el18
-rw-r--r--lisp/gnus/ChangeLog4
-rw-r--r--lisp/gnus/starttls.el2
-rw-r--r--lisp/replace.el8
-rw-r--r--lisp/wdired.el16
-rw-r--r--lisp/window.el22
-rw-r--r--nt/ChangeLog29
-rw-r--r--nt/config.nt2
-rwxr-xr-xnt/configure.bat2
-rw-r--r--nt/gmake.defs2
-rw-r--r--nt/inc/grp.h5
-rw-r--r--nt/inc/ms-w32.h56
-rw-r--r--nt/inc/pwd.h7
-rw-r--r--src/ChangeLog199
-rw-r--r--src/alloc.c2
-rw-r--r--src/buffer.c38
-rw-r--r--src/buffer.h16
-rw-r--r--src/cygw32.c4
-rw-r--r--src/dbusbind.c8
-rw-r--r--src/dispnew.c4
-rw-r--r--src/editfns.c9
-rw-r--r--src/fileio.c1
-rw-r--r--src/image.c6
-rw-r--r--src/indent.c6
-rw-r--r--src/lisp.h1
-rw-r--r--src/makefile.w32-in7
-rw-r--r--src/nsterm.m5
-rw-r--r--src/print.c2
-rw-r--r--src/process.c5
-rw-r--r--src/term.c1
-rw-r--r--src/unexw32.c2
-rw-r--r--src/vm-limit.c2
-rw-r--r--src/w32.c12
-rw-r--r--src/w32.h22
-rw-r--r--src/w32fns.c4
-rw-r--r--src/w32proc.c3
-rw-r--r--src/w32term.h4
-rw-r--r--src/window.c8
-rw-r--r--src/xdisp.c2
-rw-r--r--src/xrdb.c12
67 files changed, 720 insertions, 315 deletions
diff --git a/ChangeLog b/ChangeLog
index 9c839658429..b8c7adb8708 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
12012-10-15 Glenn Morris <rgm@gnu.org>
2
3 * Makefile.in (install-man, install-etc):
4 Apply $TRANSFORM. (Bug#12536#34)
5 (clean): Delete etc/emacs.tmpdesktop.
6
12012-10-11 Kenichi Handa <handa@gnu.org> 72012-10-11 Kenichi Handa <handa@gnu.org>
2 8
3 * .bzrignore: Add several files under admin/charsets. 9 * .bzrignore: Add several files under admin/charsets.
@@ -758,7 +764,7 @@
758 764
7592012-06-28 Dmitry Antipov <dmantipov@yandex.ru> 7652012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
760 766
761 * configure.in: Fix previous change. Remove --enable-asserts. 767 * configure.in: Fix previous change. Remove --enable-asserts.
762 (CPPFLAGS): Remove conditional -DXASSERTS=1. 768 (CPPFLAGS): Remove conditional -DXASSERTS=1.
763 Add --enable-link-time-optimization. 769 Add --enable-link-time-optimization.
764 * INSTALL: Mention this. 770 * INSTALL: Mention this.
@@ -936,7 +942,7 @@
936 942
9372012-06-03 Ulrich Müller <ulm@gentoo.org> 9432012-06-03 Ulrich Müller <ulm@gentoo.org>
938 944
939 * configure.in (PAXCTL): Check for paxctl. (Bug#11398) 945 * configure.in (PAXCTL): Check for paxctl. (Bug#11398)
940 946
9412012-06-01 Paul Eggert <eggert@cs.ucla.edu> 9472012-06-01 Paul Eggert <eggert@cs.ucla.edu>
942 948
@@ -1388,7 +1394,7 @@
13882012-04-17 Dmitry Antipov <dmantipov@yandex.ru> 13942012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
1389 1395
1390 * configure.in (AC_CHECK_FUNCS): 1396 * configure.in (AC_CHECK_FUNCS):
1391 Add getpwent, endpwent, getgrent, endgrent. (Bug#7900) 1397 Add getpwent, endpwent, getgrent, endgrent. (Bug#7900)
1392 1398
13932012-04-16 Glenn Morris <rgm@gnu.org> 13992012-04-16 Glenn Morris <rgm@gnu.org>
1394 1400
@@ -1565,7 +1571,7 @@
1565 1571
15662011-11-04 Glenn Morris <rgm@gnu.org> 15722011-11-04 Glenn Morris <rgm@gnu.org>
1567 1573
1568 * configure.in: Increase minimum GnuTLS version to 2.6.6. (Bug#9929) 1574 * configure.in: Increase minimum GnuTLS version to 2.6.6. (Bug#9929)
1569 Do not include GnuTLS version info in final summary message. 1575 Do not include GnuTLS version info in final summary message.
1570 1576
15712011-10-31 Eli Zaretskii <eliz@gnu.org> 15772011-10-31 Eli Zaretskii <eliz@gnu.org>
diff --git a/Makefile.in b/Makefile.in
index 571013e3244..d929160c597 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -622,18 +622,24 @@ install-man:
622 thisdir=`/bin/pwd`; \ 622 thisdir=`/bin/pwd`; \
623 cd ${mansrcdir}; \ 623 cd ${mansrcdir}; \
624 for page in *.1; do \ 624 for page in *.1; do \
625 dest=`echo "$${page}" | sed '$(TRANSFORM)'`; \
625 (cd $${thisdir}; \ 626 (cd $${thisdir}; \
626 ${INSTALL_DATA} ${mansrcdir}/$${page} $(DESTDIR)${man1dir}/$${page}); \ 627 ${INSTALL_DATA} ${mansrcdir}/$${page} $(DESTDIR)${man1dir}/$${dest}); \
627 ( [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ] ) || continue ; \ 628 ( [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ] ) || continue ; \
628 rm -f $(DESTDIR)${man1dir}/$${page}.gz; \ 629 rm -f $(DESTDIR)${man1dir}/$${dest}.gz; \
629 ${GZIP_PROG} -9n $(DESTDIR)${man1dir}/$${page}; \ 630 ${GZIP_PROG} -9n $(DESTDIR)${man1dir}/$${dest}; \
630 done 631 done
631 632
632## Install those items from etc/ that need to end up elsewhere. 633## Install those items from etc/ that need to end up elsewhere.
633install-etc: 634install-etc:
634 umask 022; ${MKDIR_P} $(DESTDIR)${desktopdir} 635 umask 022; ${MKDIR_P} $(DESTDIR)${desktopdir}
635 ${INSTALL_DATA} ${srcdir}/etc/emacs.desktop \ 636 dest=`echo emacs | sed '$(TRANSFORM)'`; \
636 $(DESTDIR)${desktopdir}/emacs.desktop 637 tmp=etc/emacs.tmpdesktop; rm -f $${tmp}; \
638 sed -e "/^Exec=emacs/ s/emacs/$${dest}/" \
639 -e "/^Icon=emacs/ s/emacs/$${dest}/" \
640 ${srcdir}/etc/emacs.desktop > $${tmp}; \
641 ${INSTALL_DATA} $${tmp} $(DESTDIR)${desktopdir}/$${dest}.desktop; \
642 rm -f $${tmp}
637 thisdir=`/bin/pwd`; \ 643 thisdir=`/bin/pwd`; \
638 cd ${iconsrcdir} || exit 1; umask 022 ; \ 644 cd ${iconsrcdir} || exit 1; umask 022 ; \
639 for dir in */*/apps */*/mimetypes; do \ 645 for dir in */*/apps */*/mimetypes; do \
@@ -641,8 +647,9 @@ install-etc:
641 ( cd $${thisdir}; ${MKDIR_P} $(DESTDIR)${icondir}/$${dir} ) ; \ 647 ( cd $${thisdir}; ${MKDIR_P} $(DESTDIR)${icondir}/$${dir} ) ; \
642 for icon in $${dir}/*.*; do \ 648 for icon in $${dir}/*.*; do \
643 [ -r $${icon} ] || continue ; \ 649 [ -r $${icon} ] || continue ; \
650 dest=`echo "$${icon}" | sed -e 's|.*/||' -e '$(TRANSFORM)'` ; \
644 ( cd $${thisdir}; \ 651 ( cd $${thisdir}; \
645 ${INSTALL_DATA} ${iconsrcdir}/$${icon} $(DESTDIR)${icondir}/$${icon} ) \ 652 ${INSTALL_DATA} ${iconsrcdir}/$${icon} $(DESTDIR)${icondir}/$${dir}/$${dest} ) \
646 || exit 1; \ 653 || exit 1; \
647 done ; \ 654 done ; \
648 done 655 done
@@ -729,6 +736,7 @@ mostlyclean: FRC
729### 736###
730### Delete `.dvi' files here if they are not part of the distribution. 737### Delete `.dvi' files here if they are not part of the distribution.
731clean: FRC 738clean: FRC
739 -rm -f etc/emacs.tmpdesktop
732 (cd src; $(MAKE) $(MFLAGS) clean) 740 (cd src; $(MAKE) $(MFLAGS) clean)
733 (cd oldXMenu; $(MAKE) $(MFLAGS) clean) 741 (cd oldXMenu; $(MAKE) $(MFLAGS) clean)
734 (cd lwlib; $(MAKE) $(MFLAGS) clean) 742 (cd lwlib; $(MAKE) $(MFLAGS) clean)
diff --git a/admin/ChangeLog b/admin/ChangeLog
index ca2ebbdfa06..e21293d618d 100644
--- a/admin/ChangeLog
+++ b/admin/ChangeLog
@@ -1,3 +1,7 @@
12012-10-12 Kenichi Handa <handa@gnu.org>
2
3 * charsets/Makefile (JISC6226.map): Add missing mappings.
4
12012-10-11 Kenichi Handa <handa@gnu.org> 52012-10-11 Kenichi Handa <handa@gnu.org>
2 6
3 * charsets/mapconv: Adjusted for the change of mapfiles/*.gz to 7 * charsets/mapconv: Adjusted for the change of mapfiles/*.gz to
diff --git a/admin/charsets/Makefile b/admin/charsets/Makefile
index 91f541979da..e5cf2508d85 100644
--- a/admin/charsets/Makefile
+++ b/admin/charsets/Makefile
@@ -197,9 +197,19 @@ cp51932.el: CP932-2BYTE.map cp51932.awk
197eucjp-ms.el: ${GLIBC_CHARMAPS}/EUC-JP-MS.gz eucjp-ms.awk 197eucjp-ms.el: ${GLIBC_CHARMAPS}/EUC-JP-MS.gz eucjp-ms.awk
198 @zcat $< | $(AWK) -f eucjp-ms.awk > $@ 198 @zcat $< | $(AWK) -f eucjp-ms.awk > $@
199 199
200JISC6226.map : mapfiles/Uni2JIS mapconv kuten.awk 200JISC6226.map: mapfiles/Uni2JIS mapconv kuten.awk
201 # Generating $@... 201 # Generating $@...
202 @./mapconv $< '/^[^#].*0-/' YASUOKA kuten.awk > $@ 202# As Uni2JIS doesn't contain mappings of characters added to Unicode
203# recently, we add them manually here (including one correction for
204# U+005C vs U+FF3C). These changes are based on bogytech's blog at
205# http://bogytech.blogspot.jp/search/label/emacs.
206 @./mapconv $< '/^[^#].*0-/' YASUOKA kuten.awk \
207 | sed -e '/0x2140/s/005C/FF3C/' \
208 -e '$$ a 0x3442 0x3D4E' \
209 -e '$$ a 0x374E 0x25874' \
210 -e '$$ a 0x3764 0x28EF6' \
211 -e '$$ a 0x513D 0x2F80F' \
212 -e '$$ a 0x7045 0x9724' > $@
203 213
204KSC5601.map: ${GLIBC_CHARMAPS}/EUC-KR.gz mapconv compact.awk 214KSC5601.map: ${GLIBC_CHARMAPS}/EUC-KR.gz mapconv compact.awk
205 # Generating $@... 215 # Generating $@...
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 47a4c8da522..873681ad0d4 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,19 @@
12012-10-17 Glenn Morris <rgm@gnu.org>
2
3 * mini.texi (Repetition): Further copyedit.
4
52012-10-17 Dani Moncayo <dmoncayo@gmail.com>
6
7 * mini.texi (Repetition): Copyedit.
8
92012-10-16 Juri Linkov <juri@jurta.org>
10
11 * search.texi (Query Replace): Document multi-buffer replacement
12 keys. (Bug#12655)
13
14 * maintaining.texi (Tags Search): Change link "Replace" to
15 "Query Replace".
16
12012-10-13 Chong Yidong <cyd@gnu.org> 172012-10-13 Chong Yidong <cyd@gnu.org>
2 18
3 * files.texi (File Conveniences): ImageMagick enabled by default. 19 * files.texi (File Conveniences): ImageMagick enabled by default.
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
index d21e3af83dd..67214bde22c 100644
--- a/doc/emacs/maintaining.texi
+++ b/doc/emacs/maintaining.texi
@@ -2221,7 +2221,7 @@ the current buffer, followed by the remaining files of the tags table.
2221reads a regexp to search for and a string to replace with, just like 2221reads a regexp to search for and a string to replace with, just like
2222ordinary @kbd{M-x query-replace-regexp}. It searches much like @kbd{M-x 2222ordinary @kbd{M-x query-replace-regexp}. It searches much like @kbd{M-x
2223tags-search}, but repeatedly, processing matches according to your 2223tags-search}, but repeatedly, processing matches according to your
2224input. @xref{Replace}, for more information on query replace. 2224input. @xref{Query Replace}, for more information on query replace.
2225 2225
2226@vindex tags-case-fold-search 2226@vindex tags-case-fold-search
2227@cindex case-sensitivity and tags search 2227@cindex case-sensitivity and tags search
diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi
index cb47a966f64..0036b67f174 100644
--- a/doc/emacs/mini.texi
+++ b/doc/emacs/mini.texi
@@ -683,13 +683,13 @@ the text for that expression. Even if you don't know Lisp, it will
683probably be obvious which command is displayed for repetition. If you 683probably be obvious which command is displayed for repetition. If you
684type just @key{RET}, that repeats the command unchanged. You can also 684type just @key{RET}, that repeats the command unchanged. You can also
685change the command by editing the Lisp expression before you execute 685change the command by editing the Lisp expression before you execute
686it. The repeated command is added to the front of the command history 686it. The executed command is added to the front of the command history
687unless it is identical to the most recent item. 687unless it is identical to the most recent item.
688 688
689 Once inside the minibuffer for @kbd{C-x @key{ESC} @key{ESC}}, you 689 Once inside the minibuffer for @kbd{C-x @key{ESC} @key{ESC}}, you
690can use the usual minibuffer history commands (@pxref{Minibuffer 690can use the usual minibuffer history commands (@pxref{Minibuffer
691History}) to move through the history list. After finding the desired 691History}) to move through the history list. After finding the desired
692previous command, you can edit its expression as usual and then repeat 692previous command, you can edit its expression as usual and then execute
693it by typing @key{RET}. 693it by typing @key{RET}.
694 694
695@vindex isearch-resume-in-command-history 695@vindex isearch-resume-in-command-history
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi
index 21db02c8ab8..7e46e416219 100644
--- a/doc/emacs/search.texi
+++ b/doc/emacs/search.texi
@@ -1239,6 +1239,19 @@ occurrences.
1239@item ! 1239@item !
1240to replace all remaining occurrences without asking again. 1240to replace all remaining occurrences without asking again.
1241 1241
1242@item Y @r{(Upper-case)}
1243to replace all remaining occurrences in all remaining buffers in
1244multi-buffer replacements (like the Dired `Q' command which performs
1245query replace on selected files). It answers this question and all
1246subsequent questions in the series with "yes", without further
1247user interaction.
1248
1249@item N @r{(Upper-case)}
1250to skip to the next buffer in multi-buffer replacements without
1251replacing remaining occurrences in the current buffer. It answers
1252this question "no", gives up on the questions for the current buffer,
1253and continues to the next buffer in the sequence.
1254
1242@item ^ 1255@item ^
1243to go back to the position of the previous occurrence (or what used to 1256to go back to the position of the previous occurrence (or what used to
1244be an occurrence), in case you changed it by mistake or want to 1257be an occurrence), in case you changed it by mistake or want to
diff --git a/doc/lispintro/ChangeLog b/doc/lispintro/ChangeLog
index 11eacf25c96..6c524f5a0ae 100644
--- a/doc/lispintro/ChangeLog
+++ b/doc/lispintro/ChangeLog
@@ -1,3 +1,8 @@
12012-10-17 Gregor Zattler <grfz@gmx.de> (tiny change)
2
3 * emacs-lisp-intro.texi (Narrowing advantages):
4 Minor update for changed what-line implementation. (Bug#12629)
5
12012-06-21 Glenn Morris <rgm@gnu.org> 62012-06-21 Glenn Morris <rgm@gnu.org>
2 7
3 * Makefile.in: Rename infodir to buildinfodir throughout. (Bug#11737) 8 * Makefile.in: Rename infodir to buildinfodir throughout. (Bug#11737)
diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi
index 04e3e0c8649..55c3ef4e09e 100644
--- a/doc/lispintro/emacs-lisp-intro.texi
+++ b/doc/lispintro/emacs-lisp-intro.texi
@@ -6600,8 +6600,8 @@ buffer; or conversely, an Emacs Lisp function needs to work on all of a
6600buffer that has been narrowed. The @code{what-line} function, for 6600buffer that has been narrowed. The @code{what-line} function, for
6601example, removes the narrowing from a buffer, if it has any narrowing 6601example, removes the narrowing from a buffer, if it has any narrowing
6602and when it has finished its job, restores the narrowing to what it was. 6602and when it has finished its job, restores the narrowing to what it was.
6603On the other hand, the @code{count-lines} function, which is called by 6603On the other hand, the @code{count-lines} function
6604@code{what-line}, uses narrowing to restrict itself to just that portion 6604uses narrowing to restrict itself to just that portion
6605of the buffer in which it is interested and then restores the previous 6605of the buffer in which it is interested and then restores the previous
6606situation. 6606situation.
6607 6607
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 40c457ffe07..acf6f8a51ff 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,14 @@
12012-10-15 Chong Yidong <cyd@gnu.org>
2
3 * macros.texi (Defining Macros): defmacro is now a macro.
4 Explicitly list the docstring and declare arguments.
5
6 * functions.texi (Anonymous Functions): Explicitly list the
7 docstring, declare, and interactive arguments to lambda.
8 (Defining Functions): Likewise for defun.
9 (Inline Functions): Likewise for defsubst.
10 (Declare Form): Tweak description.
11
12012-10-13 Chong Yidong <cyd@gnu.org> 122012-10-13 Chong Yidong <cyd@gnu.org>
2 13
3 * display.texi (ImageMagick Images): ImageMagick enabled by default. 14 * display.texi (ImageMagick Images): ImageMagick enabled by default.
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 845561f91ec..c94e46dad18 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -522,21 +522,20 @@ Scheme.)
522is called @dfn{defining a function}, and it is done with the 522is called @dfn{defining a function}, and it is done with the
523@code{defun} special form. 523@code{defun} special form.
524 524
525@defmac defun name argument-list body-forms... 525@defmac defun name args [doc] [declare] [interactive] body@dots{}
526@code{defun} is the usual way to define new Lisp functions. It 526@code{defun} is the usual way to define new Lisp functions. It
527defines the symbol @var{name} as a function that looks like this: 527defines the symbol @var{name} as a function with argument list
528@var{args} and body forms given by @var{body}. Neither @var{name} nor
529@var{args} should be quoted.
528 530
529@example 531@var{doc}, if present, should be a string specifying the function's
530(lambda @var{argument-list} . @var{body-forms}) 532documentation string (@pxref{Function Documentation}). @var{declare},
531@end example 533if present, should be a @code{declare} form specifying function
534metadata (@pxref{Declare Form}). @var{interactive}, if present,
535should be an @code{interactive} form specifying how the function is to
536be called interactively (@pxref{Interactive Call}).
532 537
533@code{defun} stores this lambda expression in the function cell of 538The return value of @code{defun} is undefined.
534@var{name}. Its return value is @emph{undefined}.
535
536As described previously, @var{argument-list} is a list of argument
537names and may include the keywords @code{&optional} and @code{&rest}.
538Also, the first two of the @var{body-forms} may be a documentation
539string and an interactive declaration. @xref{Lambda Components}.
540 539
541Here are some examples: 540Here are some examples:
542 541
@@ -582,14 +581,14 @@ redefinition from unintentional redefinition.
582@end defmac 581@end defmac
583 582
584@cindex function aliases 583@cindex function aliases
585@defun defalias name definition &optional docstring 584@defun defalias name definition &optional doc
586@anchor{Definition of defalias} 585@anchor{Definition of defalias}
587This special form defines the symbol @var{name} as a function, with 586This special form defines the symbol @var{name} as a function, with
588definition @var{definition} (which can be any valid Lisp function). 587definition @var{definition} (which can be any valid Lisp function).
589Its return value is @emph{undefined}. 588Its return value is @emph{undefined}.
590 589
591If @var{docstring} is non-@code{nil}, it becomes the function 590If @var{doc} is non-@code{nil}, it becomes the function documentation
592documentation of @var{name}. Otherwise, any documentation provided by 591of @var{name}. Otherwise, any documentation provided by
593@var{definition} is used. 592@var{definition} is used.
594 593
595The proper place to use @code{defalias} is where a specific function 594The proper place to use @code{defalias} is where a specific function
@@ -902,11 +901,14 @@ function, you can in principle use any method to construct the list.
902But typically you should use the @code{lambda} macro, or the 901But typically you should use the @code{lambda} macro, or the
903@code{function} special form, or the @code{#'} read syntax: 902@code{function} special form, or the @code{#'} read syntax:
904 903
905@defmac lambda args body... 904@defmac lambda args [doc] [interactive] body@dots{}
906This macro returns an anonymous function with argument list @var{args} 905This macro returns an anonymous function with argument list
907and body forms given by @var{body}. In effect, this macro makes 906@var{args}, documentation string @var{doc} (if any), interactive spec
908@code{lambda} forms ``self-quoting'': evaluating a form whose @sc{car} 907@var{interactive} (if any), and body forms given by @var{body}.
909is @code{lambda} yields the form itself: 908
909In effect, this macro makes @code{lambda} forms ``self-quoting'':
910evaluating a form whose @sc{car} is @code{lambda} yields the form
911itself:
910 912
911@example 913@example
912(lambda (x) (* x x)) 914(lambda (x) (* x x))
@@ -1169,13 +1171,13 @@ If provided, @var{when} should be a string indicating when the function
1169was first made obsolete---for example, a date or a release number. 1171was first made obsolete---for example, a date or a release number.
1170@end defun 1172@end defun
1171 1173
1172@defmac define-obsolete-function-alias obsolete-name current-name &optional when docstring 1174@defmac define-obsolete-function-alias obsolete-name current-name &optional when doc
1173This convenience macro marks the function @var{obsolete-name} obsolete 1175This convenience macro marks the function @var{obsolete-name} obsolete
1174and also defines it as an alias for the function @var{current-name}. 1176and also defines it as an alias for the function @var{current-name}.
1175It is equivalent to the following: 1177It is equivalent to the following:
1176 1178
1177@example 1179@example
1178(defalias @var{obsolete-name} @var{current-name} @var{docstring}) 1180(defalias @var{obsolete-name} @var{current-name} @var{doc})
1179(make-obsolete @var{obsolete-name} @var{current-name} @var{when}) 1181(make-obsolete @var{obsolete-name} @var{current-name} @var{when})
1180@end example 1182@end example
1181@end defmac 1183@end defmac
@@ -1213,16 +1215,16 @@ this:
1213@section Inline Functions 1215@section Inline Functions
1214@cindex inline functions 1216@cindex inline functions
1215 1217
1216@defmac defsubst name argument-list body-forms... 1218 An @dfn{inline function} is a function that works just like an
1217Define an inline function. The syntax is exactly the same as 1219ordinary function, except for one thing: when you byte-compile a call
1218@code{defun} (@pxref{Defining Functions}).
1219@end defmac
1220
1221 You can define an @dfn{inline function} by using @code{defsubst}
1222instead of @code{defun}. An inline function works just like an
1223ordinary function except for one thing: when you byte-compile a call
1224to the function (@pxref{Byte Compilation}), the function's definition 1220to the function (@pxref{Byte Compilation}), the function's definition
1225is expanded into the caller. 1221is expanded into the caller. To define an inline function, use
1222@code{defsubst} instead of @code{defun}.
1223
1224@defmac defsubst name args [doc] [declare] [interactive] body@dots{}
1225This macro defines an inline function. Its syntax is exactly the same
1226as @code{defun} (@pxref{Defining Functions}).
1227@end defmac
1226 1228
1227 Making a function inline often makes its function calls run faster. 1229 Making a function inline often makes its function calls run faster.
1228But it also has disadvantages. For one thing, it reduces flexibility; 1230But it also has disadvantages. For one thing, it reduces flexibility;
@@ -1266,16 +1268,13 @@ convention in Emacs Lisp mode.
1266@anchor{Definition of declare} 1268@anchor{Definition of declare}
1267@defmac declare @var{specs}@dots{} 1269@defmac declare @var{specs}@dots{}
1268This macro ignores its arguments and evaluates to @code{nil}; it has 1270This macro ignores its arguments and evaluates to @code{nil}; it has
1269no run-time effect. However, when a @code{declare} form occurs as the 1271no run-time effect. However, when a @code{declare} form occurs in the
1270@emph{very first form} in the body of a @code{defun} function 1272@var{declare} argument of a @code{defun} or @code{defsubst} function
1271definition or a @code{defmacro} macro definition (@pxref{Defining 1273definition (@pxref{Defining Functions}) or a @code{defmacro} macro
1272Macros}, for a description of @code{defmacro}), it appends the 1274definition (@pxref{Defining Macros}), it appends the properties
1273properties specified by @var{specs} to the function or macro. This 1275specified by @var{specs} to the function or macro. This work is
1274work is specially performed by the @code{defun} and @code{defmacro} 1276specially performed by @code{defun}, @code{defsubst}, and
1275macros. 1277@code{defmacro}.
1276
1277Note that if you put a @code{declare} form in an interactive function,
1278it should go before the @code{interactive} form.
1279 1278
1280Each element in @var{specs} should have the form @code{(@var{property} 1279Each element in @var{specs} should have the form @code{(@var{property}
1281@var{args}@dots{})}, which should not be quoted. These have the 1280@var{args}@dots{})}, which should not be quoted. These have the
diff --git a/doc/lispref/macros.texi b/doc/lispref/macros.texi
index 0a5152a43a1..8be6a3fbcde 100644
--- a/doc/lispref/macros.texi
+++ b/doc/lispref/macros.texi
@@ -185,35 +185,38 @@ During Compile}).
185@node Defining Macros 185@node Defining Macros
186@section Defining Macros 186@section Defining Macros
187 187
188 A Lisp macro is a list whose @sc{car} is @code{macro}. Its @sc{cdr} should 188 A Lisp macro object is a list whose @sc{car} is @code{macro}, and
189be a function; expansion of the macro works by applying the function 189whose @sc{cdr} is a lambda expression. Expansion of the macro works
190(with @code{apply}) to the list of unevaluated argument-expressions 190by applying the lambda expression (with @code{apply}) to the list of
191from the macro call. 191@emph{unevaluated} arguments from the macro call.
192 192
193 It is possible to use an anonymous Lisp macro just like an anonymous 193 It is possible to use an anonymous Lisp macro just like an anonymous
194function, but this is never done, because it does not make sense to pass 194function, but this is never done, because it does not make sense to
195an anonymous macro to functionals such as @code{mapcar}. In practice, 195pass an anonymous macro to functionals such as @code{mapcar}. In
196all Lisp macros have names, and they are usually defined with the 196practice, all Lisp macros have names, and they are almost always
197special form @code{defmacro}. 197defined with the @code{defmacro} macro.
198 198
199@defspec defmacro name argument-list body-forms@dots{} 199@defmac defmacro name args [doc] [declare] body@dots{}
200@code{defmacro} defines the symbol @var{name} as a macro that looks 200@code{defmacro} defines the symbol @var{name} (which should not be
201like this: 201quoted) as a macro that looks like this:
202 202
203@example 203@example
204(macro lambda @var{argument-list} . @var{body-forms}) 204(macro lambda @var{args} . @var{body})
205@end example 205@end example
206 206
207(Note that the @sc{cdr} of this list is a function---a lambda expression.) 207(Note that the @sc{cdr} of this list is a lambda expression.) This
208This macro object is stored in the function cell of @var{name}. Its return 208macro object is stored in the function cell of @var{name}. The
209value is @emph{undefined}. 209meaning of @var{args} is the same as in a function, and the keywords
210 210@code{&rest} and @code{&optional} may be used (@pxref{Argument List}).
211The shape and meaning of @var{argument-list} is the same as in a 211Neither @var{name} nor @var{args} should be quoted. The return value
212function, and the keywords @code{&rest} and @code{&optional} may be used 212of @code{defmacro} is undefined.
213(@pxref{Argument List}). Macros may have a documentation string, but 213
214any @code{interactive} declaration is ignored since macros cannot be 214@var{doc}, if present, should be a string specifying the macro's
215called interactively. 215documentation string. @var{declare}, if present, should be a
216@end defspec 216@code{declare} form specifying metadata for the macro (@pxref{Declare
217Form}). Note that macros cannot have interactive declarations, since
218they cannot be called interactively.
219@end defmac
217 220
218 Macros often need to construct large list structures from a mixture 221 Macros often need to construct large list structures from a mixture
219of constants and nonconstant parts. To make this easier, use the 222of constants and nonconstant parts. To make this easier, use the
diff --git a/etc/ChangeLog b/etc/ChangeLog
index 0a1a5b8b8b7..4e1f15e913d 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,7 @@
12012-10-14 Kenichi Handa <handa@gnu.org>
2
3 * charsets/JISC6226.map: Re-generated.
4
12012-10-14 Eli Zaretskii <eliz@gnu.org> 52012-10-14 Eli Zaretskii <eliz@gnu.org>
2 6
3 * compilation.txt (msft): Add error messages in new Studio 2010 7 * compilation.txt (msft): Add error messages in new Studio 2010
diff --git a/etc/NEWS b/etc/NEWS
index 5a310d8f82c..00d5109aba6 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -47,7 +47,7 @@ no warnings; on older and on non-GNU systems the generated warnings
47may be useful. 47may be useful.
48 48
49--- 49---
50** The configuration option '--enable-use-lisp-union-type' has been 50** The configure option '--enable-use-lisp-union-type' has been
51renamed to '--enable-check-lisp-object-type', as the resulting 51renamed to '--enable-check-lisp-object-type', as the resulting
52Lisp_Object type no longer uses a union to implement the compile time 52Lisp_Object type no longer uses a union to implement the compile time
53check that this option enables. 53check that this option enables.
@@ -62,6 +62,13 @@ overwriting "emacs" in the installation bin/ directory with a link
62to emacs-VERSION. 62to emacs-VERSION.
63 63
64--- 64---
65** The configure options `--program-prefix', `--program-suffix', and
66`--program-transform-name' apply to more than just the installed
67binaries. Now they also affect the man pages, icons, and the
68etc/emacs.desktop file; but not the info pages, since this would break
69links between the various manuals.
70
71---
65** Emacs uses libtinfo in preference to libncurses, if available. 72** Emacs uses libtinfo in preference to libncurses, if available.
66 73
67--- 74---
@@ -203,7 +210,9 @@ The PCL-CVS commands are still available via the keyboard.
203--- 210---
204*** Fullscreen and frame parameter fullscreen is supported. 211*** Fullscreen and frame parameter fullscreen is supported.
205--- 212---
206*** A file dialog is used when open/saved is done from the menu/toolbar. 213*** A file dialog is used for open/save operations initiated from the
214menu/toolbar.
215
207 216
208* Editing Changes in Emacs 24.3 217* Editing Changes in Emacs 24.3
209 218
@@ -415,8 +424,8 @@ The global binding for `M-=', `count-words-region' is in effect.
415channel keys found, if any. 424channel keys found, if any.
416 425
417** Flymake uses fringe bitmaps to indicate errors and warnings. 426** Flymake uses fringe bitmaps to indicate errors and warnings.
418See flymake-fringe-indicator-position, flymake-error-bitmap and 427See `flymake-fringe-indicator-position', `flymake-error-bitmap' and
419flymake-warning-bitmap. 428`flymake-warning-bitmap'.
420 429
421** Follow mode 430** Follow mode
422 431
@@ -634,6 +643,10 @@ inefficiency, and not namespace-clean.
634 643
635 644
636* New Modes and Packages in Emacs 24.3 645* New Modes and Packages in Emacs 24.3
646
647FIXME? erc-desktop-notifications.el, gv.el, profiler.el,
648gnus-notifications.el, mm-archive.el
649
637 650
638* Incompatible Lisp Changes in Emacs 24.3 651* Incompatible Lisp Changes in Emacs 24.3
639 652
@@ -848,7 +861,7 @@ describing the cycle.
848** Miscellaneous new functions: 861** Miscellaneous new functions:
849 862
850*** `autoloadp' 863*** `autoloadp'
851*** `autoload-do-load'. 864*** `autoload-do-load'
852+++ 865+++
853*** `buffer-narrowed-p' tests if the buffer is narrowed. 866*** `buffer-narrowed-p' tests if the buffer is narrowed.
854*** `file-name-base' returns a file name sans directory and extension. 867*** `file-name-base' returns a file name sans directory and extension.
@@ -873,7 +886,7 @@ See the "Face Attributes" section of the Elisp manual.
873 886
874*** `automount-dir-prefix' 887*** `automount-dir-prefix'
875*** `buffer-has-markers-at' 888*** `buffer-has-markers-at'
876*** `macro-declaration-function' (use `macro-declarations-alist'). 889*** `macro-declaration-function' (use `macro-declarations-alist')
877*** `window-system-version' 890*** `window-system-version'
878*** `dired-pop-to-buffer' (use `dired-mark-pop-up') 891*** `dired-pop-to-buffer' (use `dired-mark-pop-up')
879*** `query-replace-interactive' 892*** `query-replace-interactive'
@@ -881,21 +894,20 @@ See the "Face Attributes" section of the Elisp manual.
881 894
882* Changes in Emacs 24.3 on non-free operating systems 895* Changes in Emacs 24.3 on non-free operating systems
883 896
884** New configure.bat options on MS-Windows: 897+++
885 898** On MS Windows, you can pass --without-libxml2 to configure.bat to omit
886*** --without-libxml2 omits support for libxml2, even if its presence 899support for libxml2, even if its presence is detected.
887is detected.
888 900
889** When invoked with the -nw switch to run on the Windows text-mode terminal, 901** When invoked with the -nw switch to run on the Windows text-mode terminal,
890Emacs now supports mouse highlight, help-echo (in the echo area), and 902Emacs now supports mouse highlight, help-echo (in the echo area), and
891mouse-autoselect-window. 903`mouse-autoselect-window'.
892 904
893** Two new functions are available in Cygwin builds of Emacs: 905** Two new functions are available in Cygwin builds:
894cygwin-convert-path-from-windows and cygwin-convert-path-to-windows. 906`cygwin-convert-path-from-windows' and `cygwin-convert-path-to-windows'.
895These functions allow Lisp code to access the Cygwin file-name mapping 907These functions allow Lisp code to access the Cygwin file-name mapping
896machinery to convert between Cygwin and Windows-native file names. 908machinery to convert between Cygwin and Windows-native file names.
897 909
898** On MS-Windows Vista and later Emacs now supports symbolic links. 910** On MS Windows Vista and later Emacs now supports symbolic links.
899 911
900* Changes in Emacs 24.2 912* Changes in Emacs 24.2
901 913
diff --git a/etc/charsets/JISC6226.map b/etc/charsets/JISC6226.map
index cba6df50b75..953867f72db 100644
--- a/etc/charsets/JISC6226.map
+++ b/etc/charsets/JISC6226.map
@@ -31,7 +31,7 @@
310x213D 0x2014 310x213D 0x2014
320x213E 0x2010 320x213E 0x2010
330x213F 0xFF0F 330x213F 0xFF0F
340x2140 0x005C 340x2140 0xFF3C
350x2141 0x301C 350x2141 0x301C
360x2142 0x2016 360x2142 0x2016
370x2143 0xFF5C 370x2143 0xFF5C
@@ -6797,3 +6797,8 @@
67970x737C 0x9F95 67970x737C 0x9F95
67980x737D 0x9F9C 67980x737D 0x9F9C
67990x737E 0x9FA0 67990x737E 0x9FA0
68000x3442 0x3D4E
68010x374E 0x25874
68020x3764 0x28EF6
68030x513D 0x2F80F
68040x7045 0x9724
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 68b8a86a2d9..541cea5c7d4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,23 @@
12012-10-17 Michael Heerdegen <michael_heerdegen@web.de> (tiny change)
2
3 * wdired.el (wdired-old-marks): New variable.
4 (wdired-change-to-wdired-mode): Locally set wdired-old-marks.
5 (wdired-do-renames): Move point with renamed file and don't lose
6 mark status (Bug#11795).
7
82012-10-16 Juri Linkov <juri@jurta.org>
9
10 * replace.el (query-replace-help): Mention multi-buffer replacement
11 keys in the Help message. (Bug#12655)
12
132012-10-15 Chong Yidong <cyd@gnu.org>
14
15 * emacs-lisp/byte-run.el (defsubst): Doc fix.
16
12012-10-14 Eli Zaretskii <eliz@gnu.org> 172012-10-14 Eli Zaretskii <eliz@gnu.org>
2 18
19 * window.el (display-buffer): Doc fix.
20
3 * progmodes/compile.el (compilation-error-regexp-alist-alist): 21 * progmodes/compile.el (compilation-error-regexp-alist-alist):
4 Adjust the msft regexp to the output of Studio 2010, and move msft 22 Adjust the msft regexp to the output of Studio 2010, and move msft
5 before edg-1. See the discussion on emacs-devel, 23 before edg-1. See the discussion on emacs-devel,
@@ -597,9 +615,9 @@
597 * emacs-lisp/eieio-base.el (eieio-persistent-read): New input args 615 * emacs-lisp/eieio-base.el (eieio-persistent-read): New input args
598 specifying the expected class, and whether subclassing is allowed. 616 specifying the expected class, and whether subclassing is allowed.
599 (eieio-persistent-convert-list-to-object): 617 (eieio-persistent-convert-list-to-object):
600 (eieio-persistent-validate/fix-slot-value) 618 (eieio-persistent-validate/fix-slot-value)
601 (eieio-persistent-slot-type-is-class-p): New functions. 619 (eieio-persistent-slot-type-is-class-p): New functions.
602 (eieio-named::slot-missing): Doc fix. 620 (eieio-named::slot-missing): Doc fix.
603 621
604 * emacs-lisp/eieio-datadebug.el (data-debug/eieio-insert-slots): 622 * emacs-lisp/eieio-datadebug.el (data-debug/eieio-insert-slots):
605 Stop using unused publd variable. 623 Stop using unused publd variable.
@@ -2042,7 +2060,7 @@
2042 2060
2043 * ses.el (ses-widen): 2061 * ses.el (ses-widen):
2044 * simple.el (count-words--buffer-message): 2062 * simple.el (count-words--buffer-message):
2045 * net/browse-url.el (browse-url-of-buffer): Use it 2063 * net/browse-url.el (browse-url-of-buffer): Use it.
2046 2064
2047 * simple.el (count-words-region): Don't signal an error if there 2065 * simple.el (count-words-region): Don't signal an error if there
2048 is a non-nil prefix arg and the mark is not set. 2066 is a non-nil prefix arg and the mark is not set.
@@ -16324,7 +16342,7 @@
163242011-06-22 Leo Liu <sdl.web@gmail.com> 163422011-06-22 Leo Liu <sdl.web@gmail.com>
16325 16343
16326 * minibuffer.el (completing-read-function) 16344 * minibuffer.el (completing-read-function)
16327 (completing-read-default): Move from minibuf.c 16345 (completing-read-default): Move from minibuf.c.
16328 16346
163292011-06-22 Richard Stallman <rms@gnu.org> 163472011-06-22 Richard Stallman <rms@gnu.org>
16330 16348
@@ -18181,7 +18199,7 @@
18181 Remove unnecessary and incorrect declarations. 18199 Remove unnecessary and incorrect declarations.
18182 18200
18183 * emacs-lisp/check-declare.el (check-declare-scan): 18201 * emacs-lisp/check-declare.el (check-declare-scan):
18184 Handle byte-compile-initial-macro-environment in bytecomp.el 18202 Handle byte-compile-initial-macro-environment in bytecomp.el.
18185 18203
181862011-05-05 Stefan Monnier <monnier@iro.umontreal.ca> 182042011-05-05 Stefan Monnier <monnier@iro.umontreal.ca>
18187 18205
diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog
index 14e8d6c1d64..e89e8ed258b 100644
--- a/lisp/cedet/ChangeLog
+++ b/lisp/cedet/ChangeLog
@@ -1,4 +1,32 @@
12012-10-08 David Engster <deng@randomsample.de>> 12012-10-14 David Engster <deng@randomsample.de>
2
3 * semantic.el (semantic-error-if-unparsed): New function. Raise
4 error if buffer was not parsed by Semantic (bug #12045).
5 (navigate-menu, edit-menu, cedet-menu-map): Enable Semantic items
6 only if buffer was parsed. Also, replace ':active' with ':enable'
7 where necessary.
8
9 * semantic/wisent/python.el
10 (semantic-python-get-system-include-path): Use
11 `python-shell-internal-send-string' if available to query Python
12 for system paths.
13
14 * semantic/senator.el (senator-next-tag, senator-previous-tag)
15 (senator-go-to-up-reference): Use `semantic-error-if-unparsed'.
16
17 * semantic/complete.el (semantic-complete-jump-local)
18 (semantic-complete-jump, semantic-complete-jump-local-members)
19 (semantic-complete-self-insert): Use `semantic-error-if-unparsed'.
20 (semantic-complete-inline-project): Fix autoload cookie.
21
22 * semantic/analyze/complete.el
23 (semantic-analyze-possible-completions): Check if buffer was
24 parsed. Only raise an error if function was called interactively,
25 otherwise silently return nil.
26
27 * cedet.el (cedet-menu-map): Fix copy&paste typo in menu creation.
28
292012-10-08 David Engster <deng@randomsample.de>
2 30
3 * semantic/bovine/el.el: Add `semantic-default-elisp-setup' to 31 * semantic/bovine/el.el: Add `semantic-default-elisp-setup' to
4 `emacs-lisp-mode-hook'. This was accidentally removed during the 32 `emacs-lisp-mode-hook'. This was accidentally removed during the
diff --git a/lisp/cedet/cedet.el b/lisp/cedet/cedet.el
index 5c21e4ab538..327a72f9dc7 100644
--- a/lisp/cedet/cedet.el
+++ b/lisp/cedet/cedet.el
@@ -59,7 +59,7 @@
59 (define-key map [navigate-menu] 'undefined) 59 (define-key map [navigate-menu] 'undefined)
60 (define-key map [semantic-options-separator] 'undefined) 60 (define-key map [semantic-options-separator] 'undefined)
61 (define-key map [global-semantic-highlight-func-mode] 'undefined) 61 (define-key map [global-semantic-highlight-func-mode] 'undefined)
62 (define-key map [global-semantic-highlight-func-mode] 'undefined) 62 (define-key map [global-semantic-stickyfunc-mode] 'undefined)
63 (define-key map [global-semantic-decoration-mode] 'undefined) 63 (define-key map [global-semantic-decoration-mode] 'undefined)
64 (define-key map [global-semantic-idle-completions-mode] 'undefined) 64 (define-key map [global-semantic-idle-completions-mode] 'undefined)
65 (define-key map [global-semantic-idle-summary-mode] 'undefined) 65 (define-key map [global-semantic-idle-summary-mode] 'undefined)
diff --git a/lisp/cedet/semantic.el b/lisp/cedet/semantic.el
index e02790cbfa8..373864a43d5 100644
--- a/lisp/cedet/semantic.el
+++ b/lisp/cedet/semantic.el
@@ -319,6 +319,11 @@ a parse of the buffer.")
319 "Return non-nil if the current buffer was set up for parsing." 319 "Return non-nil if the current buffer was set up for parsing."
320 semantic-new-buffer-fcn-was-run) 320 semantic-new-buffer-fcn-was-run)
321 321
322(defsubst semantic-error-if-unparsed ()
323 "Raise an error if current buffer was not parsed by Semantic."
324 (unless semantic-new-buffer-fcn-was-run
325 (error "Buffer was not parsed by Semantic.")))
326
322(defsubst semantic--umatched-syntax-needs-refresh-p () 327(defsubst semantic--umatched-syntax-needs-refresh-p ()
323 "Return non-nil if the unmatched syntax cache needs a refresh. 328 "Return non-nil if the unmatched syntax cache needs a refresh.
324That is, if it is dirty or if the current parse tree isn't up to date." 329That is, if it is dirty or if the current parse tree isn't up to date."
@@ -907,75 +912,91 @@ Throw away all the old tags, and recreate the tag database."
907 ;; Edit Tags submenu: 912 ;; Edit Tags submenu:
908 (define-key edit-menu [semantic-analyze-possible-completions] 913 (define-key edit-menu [semantic-analyze-possible-completions]
909 '(menu-item "List Completions" semantic-analyze-possible-completions 914 '(menu-item "List Completions" semantic-analyze-possible-completions
915 :enable (semantic-active-p)
910 :help "Display a list of completions for the tag at point")) 916 :help "Display a list of completions for the tag at point"))
911 (define-key edit-menu [semantic-complete-analyze-inline] 917 (define-key edit-menu [semantic-complete-analyze-inline]
912 '(menu-item "Complete Tag Inline" semantic-complete-analyze-inline 918 '(menu-item "Complete Tag Inline" semantic-complete-analyze-inline
919 :enable (semantic-active-p)
913 :help "Display inline completion for the tag at point")) 920 :help "Display inline completion for the tag at point"))
914 (define-key edit-menu [semantic-completion-separator] 921 (define-key edit-menu [semantic-completion-separator]
915 '("--")) 922 '("--"))
916 (define-key edit-menu [senator-transpose-tags-down] 923 (define-key edit-menu [senator-transpose-tags-down]
917 '(menu-item "Transpose Tags Down" senator-transpose-tags-down 924 '(menu-item "Transpose Tags Down" senator-transpose-tags-down
918 :active (semantic-current-tag) 925 :enable (and (semantic-active-p)
926 (semantic-current-tag))
919 :help "Transpose the current tag and the next tag")) 927 :help "Transpose the current tag and the next tag"))
920 (define-key edit-menu [senator-transpose-tags-up] 928 (define-key edit-menu [senator-transpose-tags-up]
921 '(menu-item "Transpose Tags Up" senator-transpose-tags-up 929 '(menu-item "Transpose Tags Up" senator-transpose-tags-up
922 :active (semantic-current-tag) 930 :enable (and (semantic-active-p)
931 (semantic-current-tag))
923 :help "Transpose the current tag and the previous tag")) 932 :help "Transpose the current tag and the previous tag"))
924 (define-key edit-menu [semantic-edit-separator] 933 (define-key edit-menu [semantic-edit-separator]
925 '("--")) 934 '("--"))
926 (define-key edit-menu [senator-yank-tag] 935 (define-key edit-menu [senator-yank-tag]
927 '(menu-item "Yank Tag" senator-yank-tag 936 '(menu-item "Yank Tag" senator-yank-tag
928 :active (not (ring-empty-p senator-tag-ring)) 937 :enable (not (ring-empty-p senator-tag-ring))
929 :help "Yank the head of the tag ring into the buffer")) 938 :help "Yank the head of the tag ring into the buffer"))
930 (define-key edit-menu [senator-copy-tag-to-register] 939 (define-key edit-menu [senator-copy-tag-to-register]
931 '(menu-item "Copy Tag To Register" senator-copy-tag-to-register 940 '(menu-item "Copy Tag To Register" senator-copy-tag-to-register
932 :active (semantic-current-tag) 941 :enable (and (semantic-active-p)
942 (semantic-current-tag))
933 :help "Yank the head of the tag ring into the buffer")) 943 :help "Yank the head of the tag ring into the buffer"))
934 (define-key edit-menu [senator-copy-tag] 944 (define-key edit-menu [senator-copy-tag]
935 '(menu-item "Copy Tag" senator-copy-tag 945 '(menu-item "Copy Tag" senator-copy-tag
936 :active (semantic-current-tag) 946 :enable (and (semantic-active-p)
947 (semantic-current-tag))
937 :help "Copy the current tag to the tag ring")) 948 :help "Copy the current tag to the tag ring"))
938 (define-key edit-menu [senator-kill-tag] 949 (define-key edit-menu [senator-kill-tag]
939 '(menu-item "Kill Tag" senator-kill-tag 950 '(menu-item "Kill Tag" senator-kill-tag
940 :active (semantic-current-tag) 951 :enable (and (semantic-active-p)
952 (semantic-current-tag))
941 :help "Kill the current tag, and copy it to the tag ring")) 953 :help "Kill the current tag, and copy it to the tag ring"))
942 954
943 ;; Navigate Tags submenu: 955 ;; Navigate Tags submenu:
944 (define-key navigate-menu [senator-narrow-to-defun] 956 (define-key navigate-menu [senator-narrow-to-defun]
945 '(menu-item "Narrow to Tag" senator-narrow-to-defun 957 '(menu-item "Narrow to Tag" senator-narrow-to-defun
946 :active (semantic-current-tag) 958 :enable (and (semantic-active-p)
959 (semantic-current-tag))
947 :help "Narrow the buffer to the bounds of the current tag")) 960 :help "Narrow the buffer to the bounds of the current tag"))
948 (define-key navigate-menu [semantic-narrow-to-defun-separator] 961 (define-key navigate-menu [semantic-narrow-to-defun-separator]
949 '("--")) 962 '("--"))
950 (define-key navigate-menu [semantic-symref-symbol] 963 (define-key navigate-menu [semantic-symref-symbol]
951 '(menu-item "Find Tag References..." semantic-symref-symbol 964 '(menu-item "Find Tag References..." semantic-symref-symbol
965 :enable (semantic-active-p)
952 :help "Read a tag and list the references to it")) 966 :help "Read a tag and list the references to it"))
953 (define-key navigate-menu [semantic-complete-jump] 967 (define-key navigate-menu [semantic-complete-jump]
954 '(menu-item "Find Tag Globally..." semantic-complete-jump 968 '(menu-item "Find Tag Globally..." semantic-complete-jump
969 :enable (semantic-active-p)
955 :help "Read a tag name and find it in the current project")) 970 :help "Read a tag name and find it in the current project"))
956 (define-key navigate-menu [semantic-complete-jump-local-members] 971 (define-key navigate-menu [semantic-complete-jump-local-members]
957 '(menu-item "Find Local Members ..." semantic-complete-jump-local-members 972 '(menu-item "Find Local Members ..." semantic-complete-jump-local-members
973 :enable (semantic-active-p)
958 :help "Read a tag name and find a local member with that name")) 974 :help "Read a tag name and find a local member with that name"))
959 (define-key navigate-menu [semantic-complete-jump-local] 975 (define-key navigate-menu [semantic-complete-jump-local]
960 '(menu-item "Find Tag in This Buffer..." semantic-complete-jump-local 976 '(menu-item "Find Tag in This Buffer..." semantic-complete-jump-local
977 :enable (semantic-active-p)
961 :help "Read a tag name and find it in this buffer")) 978 :help "Read a tag name and find it in this buffer"))
962 (define-key navigate-menu [semantic-navigation-separator] 979 (define-key navigate-menu [semantic-navigation-separator]
963 '("--")) 980 '("--"))
964 (define-key navigate-menu [senator-go-to-up-reference] 981 (define-key navigate-menu [senator-go-to-up-reference]
965 '(menu-item "Parent Tag" senator-go-to-up-reference 982 '(menu-item "Parent Tag" senator-go-to-up-reference
983 :enable (semantic-active-p)
966 :help "Navigate up one reference by tag")) 984 :help "Navigate up one reference by tag"))
967 (define-key navigate-menu [senator-next-tag] 985 (define-key navigate-menu [senator-next-tag]
968 '(menu-item "Next Tag" senator-next-tag 986 '(menu-item "Next Tag" senator-next-tag
987 :enable (semantic-active-p)
969 :help "Go to the next tag")) 988 :help "Go to the next tag"))
970 (define-key navigate-menu [senator-previous-tag] 989 (define-key navigate-menu [senator-previous-tag]
971 '(menu-item "Previous Tag" senator-previous-tag 990 '(menu-item "Previous Tag" senator-previous-tag
991 :enable (semantic-active-p)
972 :help "Go to the previous tag")) 992 :help "Go to the previous tag"))
973 993
974 ;; Top level menu items: 994 ;; Top level menu items:
975 (define-key cedet-menu-map [semantic-force-refresh] 995 (define-key cedet-menu-map [semantic-force-refresh]
976 '(menu-item "Reparse Buffer" semantic-force-refresh 996 '(menu-item "Reparse Buffer" semantic-force-refresh
977 :help "Force a full reparse of the current buffer" 997 :help "Force a full reparse of the current buffer"
978 :visible semantic-mode)) 998 :visible semantic-mode
999 :enable (semantic-active-p)))
979 (define-key cedet-menu-map [semantic-edit-menu] 1000 (define-key cedet-menu-map [semantic-edit-menu]
980 `(menu-item "Edit Tags" ,edit-menu 1001 `(menu-item "Edit Tags" ,edit-menu
981 :visible semantic-mode)) 1002 :visible semantic-mode))
diff --git a/lisp/cedet/semantic/analyze/complete.el b/lisp/cedet/semantic/analyze/complete.el
index edc3cdc230c..a83f4ff0ac8 100644
--- a/lisp/cedet/semantic/analyze/complete.el
+++ b/lisp/cedet/semantic/analyze/complete.el
@@ -87,20 +87,25 @@ in a buffer."
87 ;; In theory, we don't need the below since the context will 87 ;; In theory, we don't need the below since the context will
88 ;; do it for us. 88 ;; do it for us.
89 ;;(semantic-refresh-tags-safe) 89 ;;(semantic-refresh-tags-safe)
90 (with-syntax-table semantic-lex-syntax-table 90 (if (semantic-active-p)
91 (let* ((context (if (semantic-analyze-context-child-p context) 91 (with-syntax-table semantic-lex-syntax-table
92 context 92 (let* ((context (if (semantic-analyze-context-child-p context)
93 (semantic-analyze-current-context context))) 93 context
94 (ans (if (not context) 94 (semantic-analyze-current-context context)))
95 (error "Nothing to complete") 95 (ans (if (not context)
96 (:override)))) 96 (error "Nothing to complete")
97 ;; If interactive, display them. 97 (:override))))
98 (when (called-interactively-p 'any) 98 ;; If interactive, display them.
99 (with-output-to-temp-buffer "*Possible Completions*" 99 (when (called-interactively-p 'any)
100 (semantic-analyze-princ-sequence ans "" (current-buffer))) 100 (with-output-to-temp-buffer "*Possible Completions*"
101 (shrink-window-if-larger-than-buffer 101 (semantic-analyze-princ-sequence ans "" (current-buffer)))
102 (get-buffer-window "*Possible Completions*"))) 102 (shrink-window-if-larger-than-buffer
103 ans))) 103 (get-buffer-window "*Possible Completions*")))
104 ans))
105 ;; Buffer was not parsed by Semantic.
106 ;; Raise error if called interactively.
107 (when (called-interactively-p 'any)
108 (error "Buffer was not parsed by Semantic."))))
104 109
105(defun semantic-analyze-possible-completions-default (context &optional flags) 110(defun semantic-analyze-possible-completions-default (context &optional flags)
106 "Default method for producing smart completions. 111 "Default method for producing smart completions.
diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el
index 9c2da9faefa..59d17f2f8bb 100644
--- a/lisp/cedet/semantic/complete.el
+++ b/lisp/cedet/semantic/complete.el
@@ -2088,6 +2088,7 @@ completion works."
2088(defun semantic-complete-jump-local () 2088(defun semantic-complete-jump-local ()
2089 "Jump to a local semantic symbol." 2089 "Jump to a local semantic symbol."
2090 (interactive) 2090 (interactive)
2091 (semantic-error-if-unparsed)
2091 (let ((tag (semantic-complete-read-tag-buffer-deep "Jump to symbol: "))) 2092 (let ((tag (semantic-complete-read-tag-buffer-deep "Jump to symbol: ")))
2092 (when (semantic-tag-p tag) 2093 (when (semantic-tag-p tag)
2093 (push-mark) 2094 (push-mark)
@@ -2101,6 +2102,7 @@ completion works."
2101(defun semantic-complete-jump () 2102(defun semantic-complete-jump ()
2102 "Jump to a semantic symbol." 2103 "Jump to a semantic symbol."
2103 (interactive) 2104 (interactive)
2105 (semantic-error-if-unparsed)
2104 (let* ((tag (semantic-complete-read-tag-project "Jump to symbol: "))) 2106 (let* ((tag (semantic-complete-read-tag-project "Jump to symbol: ")))
2105 (when (semantic-tag-p tag) 2107 (when (semantic-tag-p tag)
2106 (push-mark) 2108 (push-mark)
@@ -2115,6 +2117,7 @@ completion works."
2115(defun semantic-complete-jump-local-members () 2117(defun semantic-complete-jump-local-members ()
2116 "Jump to a semantic symbol." 2118 "Jump to a semantic symbol."
2117 (interactive) 2119 (interactive)
2120 (semantic-error-if-unparsed)
2118 (let* ((tag (semantic-complete-read-tag-local-members "Jump to symbol: "))) 2121 (let* ((tag (semantic-complete-read-tag-local-members "Jump to symbol: ")))
2119 (when (semantic-tag-p tag) 2122 (when (semantic-tag-p tag)
2120 (let ((start (condition-case nil (semantic-tag-start tag) 2123 (let ((start (condition-case nil (semantic-tag-start tag)
@@ -2216,7 +2219,7 @@ use `semantic-complete-analyze-inline' to complete."
2216 (error nil)) 2219 (error nil))
2217 )) 2220 ))
2218 2221
2219;;;;###autoload 2222;;;###autoload
2220(defun semantic-complete-inline-project () 2223(defun semantic-complete-inline-project ()
2221 "Perform inline completion for any symbol in the current project. 2224 "Perform inline completion for any symbol in the current project.
2222`semantic-analyze-possible-completions' is used to determine the 2225`semantic-analyze-possible-completions' is used to determine the
diff --git a/lisp/cedet/semantic/senator.el b/lisp/cedet/semantic/senator.el
index 64f99a8ad6f..1138c13096a 100644
--- a/lisp/cedet/semantic/senator.el
+++ b/lisp/cedet/semantic/senator.el
@@ -255,6 +255,7 @@ TEXT, BOUND, NOERROR, and COUNT arguments are interpreted."
255 "Navigate to the next Semantic tag. 255 "Navigate to the next Semantic tag.
256Return the tag or nil if at end of buffer." 256Return the tag or nil if at end of buffer."
257 (interactive) 257 (interactive)
258 (semantic-error-if-unparsed)
258 (let ((pos (point)) 259 (let ((pos (point))
259 (tag (semantic-current-tag)) 260 (tag (semantic-current-tag))
260 where) 261 where)
@@ -294,6 +295,7 @@ Return the tag or nil if at end of buffer."
294 "Navigate to the previous Semantic tag. 295 "Navigate to the previous Semantic tag.
295Return the tag or nil if at beginning of buffer." 296Return the tag or nil if at beginning of buffer."
296 (interactive) 297 (interactive)
298 (semantic-error-if-unparsed)
297 (let ((pos (point)) 299 (let ((pos (point))
298 (tag (semantic-current-tag)) 300 (tag (semantic-current-tag))
299 where) 301 where)
@@ -519,6 +521,7 @@ If that parent which is only a reference in the function tag
519is found, we can jump to it. 521is found, we can jump to it.
520Some tags such as includes have other reference features." 522Some tags such as includes have other reference features."
521 (interactive) 523 (interactive)
524 (semantic-error-if-unparsed)
522 (let ((result (semantic-up-reference (or tag (semantic-current-tag))))) 525 (let ((result (semantic-up-reference (or tag (semantic-current-tag)))))
523 (if (not result) 526 (if (not result)
524 (error "No up reference found") 527 (error "No up reference found")
diff --git a/lisp/cedet/semantic/wisent/python.el b/lisp/cedet/semantic/wisent/python.el
index a0ea488f0fe..89c0499b7da 100644
--- a/lisp/cedet/semantic/wisent/python.el
+++ b/lisp/cedet/semantic/wisent/python.el
@@ -48,24 +48,15 @@
48 48
49(defun semantic-python-get-system-include-path () 49(defun semantic-python-get-system-include-path ()
50 "Evaluate some Python code that determines the system include path." 50 "Evaluate some Python code that determines the system include path."
51 (python-proc) 51 (delq nil
52 (if python-buffer 52 (mapcar
53 (with-current-buffer python-buffer 53 (lambda (dir)
54 (set (make-local-variable 'python-preoutput-result) nil) 54 (when (file-directory-p dir)
55 (python-send-string 55 dir))
56 "import sys; print '_emacs_out ' + '\\0'.join(sys.path)") 56 (split-string
57 (accept-process-output (python-proc) 2) 57 (python-shell-internal-send-string
58 (if python-preoutput-result 58 "import sys;print ('\\n'.join(sys.path))")
59 (split-string python-preoutput-result "[\0\n]" t) 59 "\n" t))))
60 ;; Try a second, Python3k compatible shot
61 (python-send-string
62 "import sys; print('_emacs_out ' + '\\0'.join(sys.path))")
63 (accept-process-output (python-proc) 2)
64 (if python-preoutput-result
65 (split-string python-preoutput-result "[\0\n]" t)
66 (message "Timeout while querying Python for system include path.")
67 nil)))
68 (message "Python seems to be unavailable on this system.")))
69 60
70(defcustom-mode-local-semantic-dependency-system-include-path 61(defcustom-mode-local-semantic-dependency-system-include-path
71 python-mode semantic-python-dependency-system-include-path 62 python-mode semantic-python-dependency-system-include-path
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index d740574f1e4..462b4a25154 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -232,7 +232,8 @@ The return value is undefined.
232;; fns))) 232;; fns)))
233 233
234(defmacro defsubst (name arglist &rest body) 234(defmacro defsubst (name arglist &rest body)
235 "Define an inline function. The syntax is just like that of `defun'." 235 "Define an inline function. The syntax is just like that of `defun'.
236\(fn NAME ARGLIST &optional DOCSTRING DECL &rest BODY)"
236 (declare (debug defun) (doc-string 3)) 237 (declare (debug defun) (doc-string 3))
237 (or (memq (get name 'byte-optimizer) 238 (or (memq (get name 'byte-optimizer)
238 '(nil byte-compile-inline-expand)) 239 '(nil byte-compile-inline-expand))
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index 8b4df6099bc..343a6655701 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,10 @@
12012-10-15 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * erc.el (erc-log): Make it into a defsubst.
4 (erc-with-server-buffer, define-erc-module, erc-with-buffer)
5 (erc-with-all-buffers-of-server): Use `declare'.
6 * erc-backend.el (erc-log): Adjust autoload accordingly.
7
12012-10-07 Deniz Dogan <deniz@dogan.se> 82012-10-07 Deniz Dogan <deniz@dogan.se>
2 9
3 * erc-log.el (erc-generate-log-file-name-function): 10 * erc-log.el (erc-generate-log-file-name-function):
@@ -42,8 +49,8 @@
42 49
432012-08-21 Julien Danjou <julien@danjou.info> 502012-08-21 Julien Danjou <julien@danjou.info>
44 51
45 * erc-match.el (erc-match-message): Use 52 * erc-match.el (erc-match-message):
46 `erc-match-exclude-server-buffer' not 53 Use `erc-match-exclude-server-buffer' not
47 `erc-track-exclude-server-buffer'. 54 `erc-track-exclude-server-buffer'.
48 55
492012-08-20 Josh Feinstein <jlf@foxtail.org> 562012-08-20 Josh Feinstein <jlf@foxtail.org>
@@ -56,8 +63,8 @@
56 (erc-lurker-threshold-time): New variables. 63 (erc-lurker-threshold-time): New variables.
57 (erc-lurker-maybe-trim, erc-lurker-initialize, erc-lurker-cleanup) 64 (erc-lurker-maybe-trim, erc-lurker-initialize, erc-lurker-cleanup)
58 (erc-hide-current-message-p, erc-canonicalize-server-name) 65 (erc-hide-current-message-p, erc-canonicalize-server-name)
59 (erc-lurker-update-status, erc-lurker-p): New functions. Together 66 (erc-lurker-update-status, erc-lurker-p): New functions.
60 they maintain state about which users have spoken in the last 67 Together they maintain state about which users have spoken in the last
61 erc-lurker-threshold-time, with all other users being considered 68 erc-lurker-threshold-time, with all other users being considered
62 lurkers whose messages of types in erc-lurker-hide-list will not 69 lurkers whose messages of types in erc-lurker-hide-list will not
63 be displayed by erc-display-message. 70 be displayed by erc-display-message.
@@ -192,7 +199,7 @@
192 199
193 * erc.el (erc-ssl): Made into a synonym for erc-tls, which 200 * erc.el (erc-ssl): Made into a synonym for erc-tls, which
194 provides a superset of the same functionality. 201 provides a superset of the same functionality.
195 (erc-open-ssl-stream): Removed. 202 (erc-open-ssl-stream): Remove.
196 (erc-open-tls-stream): Use `open-network-stream' instead of 203 (erc-open-tls-stream): Use `open-network-stream' instead of
197 `open-tls-stream' directly to be able to use the built-in TLS 204 `open-tls-stream' directly to be able to use the built-in TLS
198 support. 205 support.
diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el
index 20ccd071b95..b8b5c90b596 100644
--- a/lisp/erc/erc-backend.el
+++ b/lisp/erc/erc-backend.el
@@ -100,7 +100,7 @@
100(require 'erc-compat) 100(require 'erc-compat)
101(eval-when-compile (require 'cl)) 101(eval-when-compile (require 'cl))
102(autoload 'erc-with-buffer "erc" nil nil 'macro) 102(autoload 'erc-with-buffer "erc" nil nil 'macro)
103(autoload 'erc-log "erc" nil nil 'macro) 103(autoload 'erc-log "erc")
104 104
105;;;; Variables and options 105;;;; Variables and options
106 106
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index bbd9dad4310..2e97131b603 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -362,13 +362,12 @@ nicknames with erc-server-user struct instances.")
362(defmacro erc-with-server-buffer (&rest body) 362(defmacro erc-with-server-buffer (&rest body)
363 "Execute BODY in the current ERC server buffer. 363 "Execute BODY in the current ERC server buffer.
364If no server buffer exists, return nil." 364If no server buffer exists, return nil."
365 (declare (indent 0) (debug (body)))
365 (let ((buffer (make-symbol "buffer"))) 366 (let ((buffer (make-symbol "buffer")))
366 `(let ((,buffer (erc-server-buffer))) 367 `(let ((,buffer (erc-server-buffer)))
367 (when (buffer-live-p ,buffer) 368 (when (buffer-live-p ,buffer)
368 (with-current-buffer ,buffer 369 (with-current-buffer ,buffer
369 ,@body))))) 370 ,@body)))))
370(put 'erc-with-server-buffer 'lisp-indent-function 0)
371(put 'erc-with-server-buffer 'edebug-form-spec '(body))
372 371
373(defstruct (erc-server-user (:type vector) :named) 372(defstruct (erc-server-user (:type vector) :named)
374 ;; User data 373 ;; User data
@@ -1236,6 +1235,7 @@ Example:
1236 'erc-replace-insert)) 1235 'erc-replace-insert))
1237 ((remove-hook 'erc-insert-modify-hook 1236 ((remove-hook 'erc-insert-modify-hook
1238 'erc-replace-insert)))" 1237 'erc-replace-insert)))"
1238 (declare (doc-string 3))
1239 (let* ((sn (symbol-name name)) 1239 (let* ((sn (symbol-name name))
1240 (mode (intern (format "erc-%s-mode" (downcase sn)))) 1240 (mode (intern (format "erc-%s-mode" (downcase sn))))
1241 (group (intern (format "erc-%s" (downcase sn)))) 1241 (group (intern (format "erc-%s" (downcase sn))))
@@ -1281,8 +1281,6 @@ if ARG is omitted or nil.
1281 (put ',enable 'definition-name ',name) 1281 (put ',enable 'definition-name ',name)
1282 (put ',disable 'definition-name ',name)))) 1282 (put ',disable 'definition-name ',name))))
1283 1283
1284(put 'define-erc-module 'doc-string-elt 3)
1285
1286(defun erc-once-with-server-event (event &rest forms) 1284(defun erc-once-with-server-event (event &rest forms)
1287 "Execute FORMS the next time EVENT occurs in the `current-buffer'. 1285 "Execute FORMS the next time EVENT occurs in the `current-buffer'.
1288 1286
@@ -1334,10 +1332,10 @@ connection over which the data was received that triggered EVENT."
1334 (add-hook hook fun nil nil) 1332 (add-hook hook fun nil nil)
1335 fun)) 1333 fun))
1336 1334
1337(defmacro erc-log (string) 1335(defsubst erc-log (string)
1338 "Logs STRING if logging is on (see `erc-log-p')." 1336 "Logs STRING if logging is on (see `erc-log-p')."
1339 `(when erc-log-p 1337 (when erc-log-p
1340 (erc-log-aux ,string))) 1338 (erc-log-aux string)))
1341 1339
1342(defun erc-server-buffer () 1340(defun erc-server-buffer ()
1343 "Return the server buffer for the current buffer's process. 1341 "Return the server buffer for the current buffer's process.
@@ -1621,6 +1619,7 @@ See `erc-get-buffer' for details.
1621See also `with-current-buffer'. 1619See also `with-current-buffer'.
1622 1620
1623\(fn (TARGET [PROCESS]) BODY...)" 1621\(fn (TARGET [PROCESS]) BODY...)"
1622 (declare (indent 1) (debug ((form &optional form) body)))
1624 (let ((buf (make-symbol "buf")) 1623 (let ((buf (make-symbol "buf"))
1625 (proc (make-symbol "proc")) 1624 (proc (make-symbol "proc"))
1626 (target (make-symbol "target")) 1625 (target (make-symbol "target"))
@@ -1637,8 +1636,6 @@ See also `with-current-buffer'.
1637 (when (buffer-live-p ,buf) 1636 (when (buffer-live-p ,buf)
1638 (with-current-buffer ,buf 1637 (with-current-buffer ,buf
1639 ,@body))))) 1638 ,@body)))))
1640(put 'erc-with-buffer 'lisp-indent-function 1)
1641(put 'erc-with-buffer 'edebug-form-spec '((form &optional form) body))
1642 1639
1643(defun erc-get-buffer (target &optional proc) 1640(defun erc-get-buffer (target &optional proc)
1644 "Return the buffer matching TARGET in the process PROC. 1641 "Return the buffer matching TARGET in the process PROC.
@@ -1688,6 +1685,7 @@ needs to match PROC."
1688FORMS will be evaluated in all buffers having the process PROCESS and 1685FORMS will be evaluated in all buffers having the process PROCESS and
1689where PRED matches or in all buffers of the server process if PRED is 1686where PRED matches or in all buffers of the server process if PRED is
1690nil." 1687nil."
1688 (declare (indent 1) (debug (form form body)))
1691 ;; Make the evaluation have the correct order 1689 ;; Make the evaluation have the correct order
1692 (let ((pre (make-symbol "pre")) 1690 (let ((pre (make-symbol "pre"))
1693 (pro (make-symbol "pro"))) 1691 (pro (make-symbol "pro")))
@@ -1701,8 +1699,6 @@ nil."
1701 ;; Silence the byte-compiler by binding the result of mapcar to 1699 ;; Silence the byte-compiler by binding the result of mapcar to
1702 ;; a variable. 1700 ;; a variable.
1703 res))) 1701 res)))
1704(put 'erc-with-all-buffers-of-server 'lisp-indent-function 1)
1705(put 'erc-with-all-buffers-of-server 'edebug-form-spec '(form form body))
1706 1702
1707;; (iswitchb-mode) will autoload iswitchb.el 1703;; (iswitchb-mode) will autoload iswitchb.el
1708(defvar iswitchb-temp-buflist) 1704(defvar iswitchb-temp-buflist)
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index c6b2a4c37a7..dade2b4bbe5 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,7 @@
12012-10-17 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
2
3 * starttls.el (starttls-extra-arguments): Doc fix.
4
12012-10-09 Lars Magne Ingebrigtsen <larsi@gnus.org> 52012-10-09 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 6
3 * shr.el (shr-insert): \r is also not inserted, so don't try to delete 7 * shr.el (shr-insert): \r is also not inserted, so don't try to delete
diff --git a/lisp/gnus/starttls.el b/lisp/gnus/starttls.el
index 2d403650533..346e76b2ccc 100644
--- a/lisp/gnus/starttls.el
+++ b/lisp/gnus/starttls.el
@@ -149,7 +149,7 @@ These apply when the `starttls' command is used, i.e. when
149 :group 'starttls) 149 :group 'starttls)
150 150
151(defcustom starttls-extra-arguments nil 151(defcustom starttls-extra-arguments nil
152 "Extra arguments to `starttls-program'. 152 "Extra arguments to `starttls-gnutls-program'.
153These apply when GnuTLS is used, i.e. when `starttls-use-gnutls' is non-nil. 153These apply when GnuTLS is used, i.e. when `starttls-use-gnutls' is non-nil.
154 154
155For example, non-TLS compliant servers may require 155For example, non-TLS compliant servers may require
diff --git a/lisp/replace.el b/lisp/replace.el
index e714015fccf..4013e4e5df5 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -1603,9 +1603,13 @@ Comma to replace but not move point immediately,
1603C-r to enter recursive edit (\\[exit-recursive-edit] to get out again), 1603C-r to enter recursive edit (\\[exit-recursive-edit] to get out again),
1604C-w to delete match and recursive edit, 1604C-w to delete match and recursive edit,
1605C-l to clear the screen, redisplay, and offer same replacement again, 1605C-l to clear the screen, redisplay, and offer same replacement again,
1606! to replace all remaining matches with no more questions, 1606! to replace all remaining matches in this buffer with no more questions,
1607^ to move point back to previous match, 1607^ to move point back to previous match,
1608E to edit the replacement string" 1608E to edit the replacement string.
1609In multi-buffer replacements type `Y' to replace all remaining
1610matches in all remaining buffers with no more questions,
1611`N' to skip to the next buffer without replacing remaining matches
1612in the current buffer."
1609 "Help message while in `query-replace'.") 1613 "Help message while in `query-replace'.")
1610 1614
1611(defvar query-replace-map 1615(defvar query-replace-map
diff --git a/lisp/wdired.el b/lisp/wdired.el
index b893e8f6f2b..266d1993389 100644
--- a/lisp/wdired.el
+++ b/lisp/wdired.el
@@ -180,7 +180,7 @@ program `dired-chmod-program', which must exist."
180(defvar wdired-col-perm) ;; Column where the permission bits start 180(defvar wdired-col-perm) ;; Column where the permission bits start
181(defvar wdired-old-content) 181(defvar wdired-old-content)
182(defvar wdired-old-point) 182(defvar wdired-old-point)
183 183(defvar wdired-old-marks)
184 184
185(defun wdired-mode () 185(defun wdired-mode ()
186 "Writable Dired (WDired) mode. 186 "Writable Dired (WDired) mode.
@@ -221,6 +221,8 @@ See `wdired-mode'."
221 (error "Not a Dired buffer")) 221 (error "Not a Dired buffer"))
222 (set (make-local-variable 'wdired-old-content) 222 (set (make-local-variable 'wdired-old-content)
223 (buffer-substring (point-min) (point-max))) 223 (buffer-substring (point-min) (point-max)))
224 (set (make-local-variable 'wdired-old-marks)
225 (dired-remember-marks (point-min) (point-max)))
224 (set (make-local-variable 'wdired-old-point) (point)) 226 (set (make-local-variable 'wdired-old-point) (point))
225 (set (make-local-variable 'query-replace-skip-read-only) t) 227 (set (make-local-variable 'query-replace-skip-read-only) t)
226 (set (make-local-variable 'isearch-filter-predicate) 228 (set (make-local-variable 'isearch-filter-predicate)
@@ -455,7 +457,8 @@ non-nil means return old filename."
455 (push (cons tmp file-new) residue)))) 457 (push (cons tmp file-new) residue))))
456 (t 458 (t
457 (setq progress t) 459 (setq progress t)
458 (let ((file-ori (car rename))) 460 (let* ((file-ori (car rename))
461 (old-mark (cdr (assoc file-ori wdired-old-marks))))
459 (if wdired-use-interactive-rename 462 (if wdired-use-interactive-rename
460 (wdired-search-and-rename file-ori file-new) 463 (wdired-search-and-rename file-ori file-new)
461 ;; If dired-rename-file autoloads dired-aux while 464 ;; If dired-rename-file autoloads dired-aux while
@@ -466,12 +469,17 @@ non-nil means return old filename."
466 (condition-case err 469 (condition-case err
467 (let ((dired-backup-overwrite nil)) 470 (let ((dired-backup-overwrite nil))
468 (dired-rename-file file-ori file-new 471 (dired-rename-file file-ori file-new
469 overwrite)) 472 overwrite)
473 (dired-remove-file file-ori)
474 (dired-add-file file-new (if (integerp dired-keep-marker-rename)
475 dired-keep-marker-rename
476 old-mark)))
470 (error 477 (error
471 (setq errors (1+ errors)) 478 (setq errors (1+ errors))
472 (dired-log (concat "Rename `" file-ori "' to `" 479 (dired-log (concat "Rename `" file-ori "' to `"
473 file-new "' failed:\n%s\n") 480 file-new "' failed:\n%s\n")
474 err))))))))) 481 err)
482 (dired-add-entry file-ori old-mark)))))))))
475 errors)) 483 errors))
476 484
477 485
diff --git a/lisp/window.el b/lisp/window.el
index b033f9c26e3..a17e0adcdfe 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -5361,8 +5361,16 @@ BUFFER-OR-NAME must be a buffer or the name of an existing
5361buffer. Return the window chosen for displaying BUFFER-OR-NAME, 5361buffer. Return the window chosen for displaying BUFFER-OR-NAME,
5362or nil if no such window is found. 5362or nil if no such window is found.
5363 5363
5364Optional argument ACTION should have the form (FUNCTION . ALIST). 5364Optional argument ACTION, if non-nil, should specify a display
5365FUNCTION is either a function or a list of functions. 5365action. Its form is described below.
5366
5367Optional argument FRAME, if non-nil, acts like an additional
5368ALIST entry (reusable-frames . FRAME) to the action list of ACTION,
5369specifying the frame(s) to search for a window that is already
5370displaying the buffer. See `display-buffer-reuse-window'
5371
5372If ACTION is non-nil, it should have the form (FUNCTION . ALIST),
5373where FUNCTION is either a function or a list of functions, and
5366ALIST is an arbitrary association list (alist). 5374ALIST is an arbitrary association list (alist).
5367 5375
5368Each such FUNCTION should accept two arguments: the buffer to 5376Each such FUNCTION should accept two arguments: the buffer to
@@ -5379,6 +5387,9 @@ function in the combined function list in turn, passing the
5379buffer as the first argument and the combined alist as the second 5387buffer as the first argument and the combined alist as the second
5380argument, until one of the functions returns non-nil. 5388argument, until one of the functions returns non-nil.
5381 5389
5390If ACTION is nil, the function list and the alist are built using
5391only the other variables mentioned above.
5392
5382Available action functions include: 5393Available action functions include:
5383 `display-buffer-same-window' 5394 `display-buffer-same-window'
5384 `display-buffer-reuse-window' 5395 `display-buffer-reuse-window'
@@ -5407,12 +5418,7 @@ The ACTION argument to `display-buffer' can also have a non-nil
5407and non-list value. This means to display the buffer in a window 5418and non-list value. This means to display the buffer in a window
5408other than the selected one, even if it is already displayed in 5419other than the selected one, even if it is already displayed in
5409the selected window. If called interactively with a prefix 5420the selected window. If called interactively with a prefix
5410argument, ACTION is t. 5421argument, ACTION is t."
5411
5412Optional argument FRAME, if non-nil, acts like an additional
5413ALIST entry (reusable-frames . FRAME), specifying the frame(s) to
5414search for a window that is already displaying the buffer. See
5415`display-buffer-reuse-window'."
5416 (interactive (list (read-buffer "Display buffer: " (other-buffer)) 5422 (interactive (list (read-buffer "Display buffer: " (other-buffer))
5417 (if current-prefix-arg t))) 5423 (if current-prefix-arg t)))
5418 (let ((buffer (if (bufferp buffer-or-name) 5424 (let ((buffer (if (bufferp buffer-or-name)
diff --git a/nt/ChangeLog b/nt/ChangeLog
index e659b87eb76..94d2ce18551 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,3 +1,22 @@
12012-10-17 Eli Zaretskii <eliz@gnu.org>
2
3 * inc/pwd.h (getuid, geteuid): Add prototypes.
4
5 * inc/ms-w32.h (sys_wait, _getpid, gmtgime_r, localtime_r)
6 (signal_handler, sys_signal, sigemptyset, sigfillset, sigprocmask)
7 (pthread_sigmask, sigismember, setpgrp, sigaction, alarm)
8 (sys_kill, getpagesize): Add prototypes for emulated functions.
9
10 * inc/grp.h (getgid, getegid): Add prototypes.
11
12 * gmake.defs (DEBUG_CFLAGS) [NOOPT]: Add -std=gnu99.
13
14 * configure.bat (chkapiN): Avoid compiler warning in junk.c when
15 compiling with -std=gnu99.
16
17 * config.nt (CHECK_LISP_OBJECT_TYPE): Don't undef, so that it
18 could be used via --cflags switch to configure.bat.
19
12012-10-08 Juanma Barranquero <lekktu@gmail.com> 202012-10-08 Juanma Barranquero <lekktu@gmail.com>
2 21
3 * config.nt: Sync with autogen/config.in. 22 * config.nt: Sync with autogen/config.in.
@@ -32,13 +51,13 @@
32 (offset_to_section, relocate_offset, OFFSET_TO_RVA) 51 (offset_to_section, relocate_offset, OFFSET_TO_RVA)
33 (RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET, PTR_TO_RVA) 52 (RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET, PTR_TO_RVA)
34 (OFFSET_TO_PTR, ROUND_UP, ROUND_DOWN) 53 (OFFSET_TO_PTR, ROUND_UP, ROUND_DOWN)
35 (copy_executable_and_move_sections, ADJUST_IMPORT_RVA, main): Use 54 (copy_executable_and_move_sections, ADJUST_IMPORT_RVA, main):
36 DWORD_PTR instead of DWORD for compatibility with x64. 55 Use DWORD_PTR instead of DWORD for compatibility with x64.
37 56
38 * nmake.defs: Support AMD64. 57 * nmake.defs: Support AMD64.
39 (EMACS_HEAPSIZE, EMACS_PURESIZE, EMACS_MANIFEST): New macros. 58 (EMACS_HEAPSIZE, EMACS_PURESIZE, EMACS_MANIFEST): New macros.
40 59
41 * gmake.defs: (EMACS_HEAPSIZE, EMACS_PURESIZE, EMACS_MANIFEST): 60 * gmake.defs (EMACS_HEAPSIZE, EMACS_PURESIZE, EMACS_MANIFEST):
42 New macros. 61 New macros.
43 62
44 * addsection.c (pfnCheckSumMappedFile, rva_to_section) 63 * addsection.c (pfnCheckSumMappedFile, rva_to_section)
@@ -478,7 +497,7 @@
478 497
4792012-02-05 Christoph Scholtes <cschol2112@googlemail.com> 4982012-02-05 Christoph Scholtes <cschol2112@googlemail.com>
480 499
481 * README.W32: Clarification for inclusion in source tarball. (Bug#9750) 500 * README.W32: Clarification for inclusion in source tarball (bug#9750).
482 501
483 * gmake.defs (PRAGMA_SYSTEM_HEADER): Add for GCC. 502 * gmake.defs (PRAGMA_SYSTEM_HEADER): Add for GCC.
484 503
@@ -487,7 +506,7 @@
487 * makefile.w32-in (maybe-copy-distfiles) 506 * makefile.w32-in (maybe-copy-distfiles)
488 (maybe-copy-distfiles-CMD, maybe-copy-distfiles-SH) 507 (maybe-copy-distfiles-CMD, maybe-copy-distfiles-SH)
489 (create-tmp-dist-dir): Add to make --distfiles optional. 508 (create-tmp-dist-dir): Add to make --distfiles optional.
490 (dist): Use create-tmp-dist-dir and maybe-copy-distfiles. (Bug#10261) 509 (dist): Use create-tmp-dist-dir and maybe-copy-distfiles (bug#10261).
491 510
4922012-02-04 Eli Zaretskii <eliz@gnu.org> 5112012-02-04 Eli Zaretskii <eliz@gnu.org>
493 512
diff --git a/nt/config.nt b/nt/config.nt
index cd695bc4e34..4582928cb5a 100644
--- a/nt/config.nt
+++ b/nt/config.nt
@@ -76,7 +76,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
76#undef CANNOT_DUMP 76#undef CANNOT_DUMP
77 77
78/* Define this to enable compile time checks for the Lisp_Object data type. */ 78/* Define this to enable compile time checks for the Lisp_Object data type. */
79#undef CHECK_LISP_OBJECT_TYPE 79/* #undef CHECK_LISP_OBJECT_TYPE */
80 80
81/* Define if you want lock files to be written, so that Emacs can tell 81/* Define if you want lock files to be written, so that Emacs can tell
82 instantly when you try to modify a file that someone else has modified in 82 instantly when you try to modify a file that someone else has modified in
diff --git a/nt/configure.bat b/nt/configure.bat
index 7fedff411bc..3118bb11e5d 100755
--- a/nt/configure.bat
+++ b/nt/configure.bat
@@ -429,7 +429,7 @@ rem
429echo Checking whether Windows API headers are too old... 429echo Checking whether Windows API headers are too old...
430echo #include "windows.h" >junk.c 430echo #include "windows.h" >junk.c
431echo #include "usp10.h" >>junk.c 431echo #include "usp10.h" >>junk.c
432echo test(PIMAGE_NT_HEADERS pHeader) >>junk.c 432echo void test(PIMAGE_NT_HEADERS pHeader) >>junk.c
433echo {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);} >>junk.c 433echo {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);} >>junk.c
434if (%nocygwin%) == (Y) goto chkapi1 434if (%nocygwin%) == (Y) goto chkapi1
435set cf=%usercflags% 435set cf=%usercflags%
diff --git a/nt/gmake.defs b/nt/gmake.defs
index 7206237c47a..358c262db28 100644
--- a/nt/gmake.defs
+++ b/nt/gmake.defs
@@ -211,7 +211,7 @@ OBJ1_c = $(patsubst $(BLD)%.$(O),$(CURDIR)%.c,$(OBJ1))
211OBJ2_c = $(patsubst $(BLD)%.$(O),$(CURDIR)%.c,$(OBJ2)) 211OBJ2_c = $(patsubst $(BLD)%.$(O),$(CURDIR)%.c,$(OBJ2))
212 212
213ifdef NOOPT 213ifdef NOOPT
214DEBUG_CFLAGS = -DEMACSDEBUG -fno-crossjumping 214DEBUG_CFLAGS = -DEMACSDEBUG -fno-crossjumping -std=gnu99
215else 215else
216DEBUG_CFLAGS = 216DEBUG_CFLAGS =
217endif 217endif
diff --git a/nt/inc/grp.h b/nt/inc/grp.h
index 8c3131ac893..3d369044974 100644
--- a/nt/inc/grp.h
+++ b/nt/inc/grp.h
@@ -28,7 +28,10 @@ struct group {
28 gid_t gr_gid; /* group numerical ID */ 28 gid_t gr_gid; /* group numerical ID */
29}; 29};
30 30
31struct group *getgrgid(gid_t); 31extern unsigned getgid (void);
32extern unsigned getegid (void);
33
34extern struct group *getgrgid(gid_t);
32 35
33#endif /* _GRP_H */ 36#endif /* _GRP_H */
34 37
diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h
index 06a3af937df..dd2ae781cb8 100644
--- a/nt/inc/ms-w32.h
+++ b/nt/inc/ms-w32.h
@@ -120,21 +120,6 @@ extern char *getenv ();
120#endif 120#endif
121#include <sys/types.h> 121#include <sys/types.h>
122 122
123#ifdef _MSC_VER
124typedef int sigset_t;
125typedef int ssize_t;
126#endif
127
128struct sigaction {
129 int sa_flags;
130 void (_CALLBACK_ *sa_handler)(int);
131 sigset_t sa_mask;
132};
133#define SA_RESTART 0
134#define SIG_BLOCK 1
135#define SIG_SETMASK 2
136#define SIG_UNBLOCK 3
137
138#ifndef MAXPATHLEN 123#ifndef MAXPATHLEN
139#define MAXPATHLEN _MAX_PATH 124#define MAXPATHLEN _MAX_PATH
140#endif 125#endif
@@ -207,6 +192,8 @@ struct sigaction {
207/* Internal signals. */ 192/* Internal signals. */
208#define emacs_raise(sig) emacs_abort() 193#define emacs_raise(sig) emacs_abort()
209 194
195extern int sys_wait (int *);
196
210/* termcap.c calls that are emulated. */ 197/* termcap.c calls that are emulated. */
211#define tputs sys_tputs 198#define tputs sys_tputs
212#define tgetstr sys_tgetstr 199#define tgetstr sys_tgetstr
@@ -251,6 +238,9 @@ typedef int pid_t;
251#define stricmp _stricmp 238#define stricmp _stricmp
252#define tzset _tzset 239#define tzset _tzset
253 240
241/* We cannot include system header process.h, since there's src/process.h. */
242int _getpid (void);
243
254/* Include time.h before redirecting tzname, since MSVC's time.h 244/* Include time.h before redirecting tzname, since MSVC's time.h
255 defines _tzname to call a function, but also declares tzname a 245 defines _tzname to call a function, but also declares tzname a
256 2-element array. Having the redirection before including the 246 2-element array. Having the redirection before including the
@@ -272,6 +262,10 @@ struct timespec
272 long int tv_nsec; /* nanoseconds */ 262 long int tv_nsec; /* nanoseconds */
273}; 263};
274 264
265/* Required for functions in lib/time_r.c, since we don't use lib/time.h. */
266extern struct tm *gmtime_r (time_t const * restrict, struct tm * restrict);
267extern struct tm *localtime_r (time_t const * restrict, struct tm * restrict);
268
275/* This is hacky, but is necessary to avoid warnings about macro 269/* This is hacky, but is necessary to avoid warnings about macro
276 redefinitions using the SDK compilers. */ 270 redefinitions using the SDK compilers. */
277#ifndef __STDC__ 271#ifndef __STDC__
@@ -300,6 +294,37 @@ struct timespec
300#define NSIG 23 294#define NSIG 23
301#endif 295#endif
302 296
297#ifdef _MSC_VER
298typedef int sigset_t;
299typedef int ssize_t;
300#endif
301
302typedef void (_CALLBACK_ *signal_handler) (int);
303extern signal_handler sys_signal (int, signal_handler);
304
305struct sigaction {
306 int sa_flags;
307 void (_CALLBACK_ *sa_handler)(int);
308 sigset_t sa_mask;
309};
310#define SA_RESTART 0
311#define SIG_BLOCK 1
312#define SIG_SETMASK 2
313#define SIG_UNBLOCK 3
314
315extern int sigemptyset (sigset_t *);
316extern int sigaddset (sigset_t *, int);
317extern int sigfillset (sigset_t *);
318extern int sigprocmask (int, const sigset_t *, sigset_t *);
319extern int pthread_sigmask (int, const sigset_t *, sigset_t *);
320extern int sigismember (const sigset_t *, int);
321extern int setpgrp (int, int);
322extern int sigaction (int, const struct sigaction *, struct sigaction *);
323extern int alarm (int);
324
325extern int sys_kill (int, int);
326
327
303/* For integration with MSDOS support. */ 328/* For integration with MSDOS support. */
304#define getdisk() (_getdrive () - 1) 329#define getdisk() (_getdrive () - 1)
305#ifdef emacs 330#ifdef emacs
@@ -357,6 +382,7 @@ extern char *get_emacs_configuration_options (void);
357#endif 382#endif
358 383
359extern int getloadavg (double *, int); 384extern int getloadavg (double *, int);
385extern int getpagesize (void);
360 386
361#if defined (__MINGW32__) 387#if defined (__MINGW32__)
362 388
diff --git a/nt/inc/pwd.h b/nt/inc/pwd.h
index b39309d08fa..54e477e9665 100644
--- a/nt/inc/pwd.h
+++ b/nt/inc/pwd.h
@@ -18,8 +18,11 @@ struct passwd {
18typedef unsigned uid_t; 18typedef unsigned uid_t;
19typedef uid_t gid_t; 19typedef uid_t gid_t;
20 20
21struct passwd * getpwnam (char *); 21extern unsigned getuid (void);
22struct passwd * getpwuid (unsigned); 22extern unsigned geteuid (void);
23
24extern struct passwd * getpwnam (char *);
25extern struct passwd * getpwuid (unsigned);
23 26
24 27
25#endif /* _PWD_H_ */ 28#endif /* _PWD_H_ */
diff --git a/src/ChangeLog b/src/ChangeLog
index b573f8c1476..007a73f7988 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,103 @@
12012-10-17 Eli Zaretskii <eliz@gnu.org>
2
3 * makefile.w32-in ($(BLD)/w32.$(O)):
4 ($(BLD)/vm-limit.$(O)):
5 ($(BLD)/term.$(O)):
6 ($(BLD)/unexw32.$(O)):
7 ($(BLD)/fileio.$(O)):
8 ($(BLD)/dispnew.$(O)): Update dependencies.
9
10 * w32term.h (w32_initialize_display_info, initialize_w32_display):
11 Add prototypes.
12
13 * w32proc.c: Include ctype.h.
14
15 * w32.h (init_environment, check_windows_init_file)
16 (syms_of_ntproc, syms_of_ntterm, dostounix_filename)
17 (unixtodos_filename, init_winsock, srandom, random, sys_pipe)
18 (set_process_dir, sys_spawnve, register_child, sys_sleep, getwd)
19 (sys_link): Add prototypes.
20
21 * w32.c: Include w32select.h.
22 (sys_access, e_malloc, sys_select): Add prototypes.
23 (emacs_gnutls_pull): 'timeout' is now EMACS_TIME, not struct timeval.
24
25 * vm-limit.c [WINDOWSNT]: Include w32heap.h.
26
27 * unexw32.c: Include lisp.h and w32.h.
28
29 * term.c [WINDOWSNT]: Include w32term.h.
30
31 * process.c [WINDOWSNT]: Add prototype of sys_select.
32
33 * fileio.c [WINDOWSNT]: Include w32.h.
34
35 * dispnew.c [WINDOWSNT]: Include w32.h.
36
37 * cygw32.c (Fcygwin_convert_path_to_windows)
38 (Fcygwin_convert_path_from_windows): Use EQ to compare 2
39 Lisp_Object values. (Bug#12661)
40
41 * w32fns.c (w32_msg_pump): Use XIL instead of casting an integer
42 to Lisp_Object. (Bug#12661)
43
442012-10-17 Kenichi Handa <handa@gnu.org>
45
46 * xdisp.c (reseat_1): Make the information stored in it->cmp_it
47 invalidate.
48
492012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
50
51 * buffer.c (Fkill_buffer): When unchaining the marker,
52 reset its buffer pointer to NULL (Bug#12652).
53
542012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
55
56 Do not verify indirection counters of killed buffers (Bug#12579).
57 * buffer.h (BUFFER_CHECK_INDIRECTION): New macro.
58 * buffer.c (compact_buffer, set_buffer_internal_1): Use it.
59
602012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
61
62 * alloc.c (Fmake_byte_code): Fix typo in comment.
63 * print.c (print_interval): Define as static to match prototype.
64 * indent.c (disptab_matches_widthtab, recompute_width_table):
65 Convert to eassert.
66
672012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
68
69 * editfns.c (get_system_name): Remove.
70 * lisp.h (get_system_name): Remove prototype.
71 * xrdb.c (getenv, getpwuid, getpwnam): Remove prototypes.
72 (get_environ_db): Use Vsystem_name. Avoid call to strlen.
73
742012-10-15 Daniel Colascione <dancol@dancol.org>
75
76 * dbusbind.c: Add comment explaining reason for previous change.
77
782012-10-15 Martin Rudalics <rudalics@gmx.at>
79
80 * window.c (Fwindow_end): Rewrite check whether cached position
81 can be used (Bug#12600).
82 (resize_frame_windows, grow_mini_window, shrink_mini_window):
83 Set windows_or_buffers_changed.
84
852012-10-15 Daniel Colascione <dancol@dancol.org>
86
87 * dbusbind.c: Fix cygw32 build break when compiling with dbus
88 enabled by undefining the symbol "interface", which the platform
89 headers define to something incompatible.
90
912012-10-14 Daniel Colascione <dancol@dancol.org>
92
93 * image.c (init_tiff_functions, init_imagemagick_functions)
94 (init_svg_functions): Fix cygw32 build break by using these
95 functions only when WINDOWSNT _and_ HAVE_NTGUI.
96
972012-10-14 Jan Djärv <jan.h.d@swipnet.se>
98
99 * nsterm.m (ns_select): Count fd:s in writefs also (Bug#12422).
100
12012-10-13 Jan Djärv <jan.h.d@swipnet.se> 1012012-10-13 Jan Djärv <jan.h.d@swipnet.se>
2 102
3 * gtkutil.c (xg_set_widget_bg): Divide by 65535 (Bug#12612). 103 * gtkutil.c (xg_set_widget_bg): Divide by 65535 (Bug#12612).
@@ -53,8 +153,7 @@
53 a file exists. This avoids expensive system calls on MS-Windows. 153 a file exists. This avoids expensive system calls on MS-Windows.
54 (Bug#12587) 154 (Bug#12587)
55 155
56 * w32.c (init_environment): Call 'check_existing' instead of 156 * w32.c (init_environment): Call 'check_existing' instead of 'stat'.
57 'stat'.
58 157
59 * lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to 158 * lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to
60 determine whether a file exists and is not a directory. 159 determine whether a file exists and is not a directory.
@@ -194,7 +293,7 @@
194 * nsfont.m (Vfonts_in_cache): Remove, not needed as font.c handles 293 * nsfont.m (Vfonts_in_cache): Remove, not needed as font.c handles
195 caching. 294 caching.
196 (nsfont_open): Remove setting of Vfonts_in_cache. 295 (nsfont_open): Remove setting of Vfonts_in_cache.
197 (syms_of_nsfont): Remove initialization of Vfonts_in_cache 296 (syms_of_nsfont): Remove initialization of Vfonts_in_cache.
198 297
1992012-10-09 Eli Zaretskii <eliz@gnu.org> 2982012-10-09 Eli Zaretskii <eliz@gnu.org>
200 299
@@ -261,7 +360,7 @@
261 * w32select.h (HAVE_W32SELECT): Remove. 360 * w32select.h (HAVE_W32SELECT): Remove.
262 361
263 * w32select.c, w32proc.c, w32menu.c, w32console.c, w32.c: Include 362 * w32select.c, w32proc.c, w32menu.c, w32console.c, w32.c: Include
264 w32common.h instead of w32heap.h 363 w32common.h instead of w32heap.h.
265 364
266 * w32heap.h (ROUND_UP, ROUND_DOWN, get_page_size) 365 * w32heap.h (ROUND_UP, ROUND_DOWN, get_page_size)
267 (get_allocation_unit, get_processor_type, get_w32_major_version) 366 (get_allocation_unit, get_processor_type, get_w32_major_version)
@@ -272,8 +371,8 @@
272 371
273 * w32heap.c: Include w32common.h. 372 * w32heap.c: Include w32common.h.
274 (sysinfo_cache, syspage_mask, osinfo_cache, w32_major_version) 373 (sysinfo_cache, syspage_mask, osinfo_cache, w32_major_version)
275 (w32_minor_version, w32_build_number, w32_subtype): Remove 374 (w32_minor_version, w32_build_number, w32_subtype):
276 duplicate definitions. 375 Remove duplicate definitions.
277 376
278 * w32fns.c: Include w32common.h; include w32heap.h only in 377 * w32fns.c: Include w32common.h; include w32heap.h only in
279 WINDOWSNT. 378 WINDOWSNT.
@@ -384,7 +483,7 @@
384 Cygwin builds. Remove w32select declarations. 483 Cygwin builds. Remove w32select declarations.
385 484
386 * w32console.c (w32_sys_ring_bell, Fset_message_beep): Move to 485 * w32console.c (w32_sys_ring_bell, Fset_message_beep): Move to
387 w32fns.c. w32console.c is WINDOWSNT-only. 486 w32fns.c. w32console.c is WINDOWSNT-only.
388 487
389 * w32fns.c: Include cygw32.h or w32.h depending on CYGWIN; more 488 * w32fns.c: Include cygw32.h or w32.h depending on CYGWIN; more
390 NTGUI_UNICODE tweaks. (See above.) Change _snprintf to the more 489 NTGUI_UNICODE tweaks. (See above.) Change _snprintf to the more
@@ -460,6 +559,39 @@
460 but it still has blocs in it, don't return it to the system, 559 but it still has blocs in it, don't return it to the system,
461 instead of aborting. (Bug#12402) 560 instead of aborting. (Bug#12402)
462 561
5622012-10-07 Jan Djärv <jan.h.d@swipnet.se>
563
564 * nsterm.m (ns_dumpglyphs_image): Only draw slice of image (Bug#12506).
565
566 * nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of
567 MAC_OS_X_VERSION_10_6.
568 (syms_of_nsterm): Remove comment about Panther and above for
569 ns-antialias-text.
570 * nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove.
571 (EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4.
572 (struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3.
573
574 * nsselect.m (ns_string_from_pasteboard): Remove check for >=
575 MAC_OS_X_VERSION_10_4.
576
577 * nsmenu.m (fillWithWidgetValue:): Remove code for <
578 MAC_OS_X_VERSION_10_2.
579
580 * nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger.
581
582 * nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4.
583 (ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4.
584
585 * nsterm.m (ns_in_resize): Remove (Bug#12479).
586 (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove.
587 (ns_clear_frame, sendEvent, windowDidResize, drawRect:):
588 Remove ns_in_resize check.
589 (ns_clear_frame_area): Remove resize handle code.
590
591 * nsfns.m (ns_in_resize): Remove.
592 (x_set_icon_name, ns_set_name, ns_set_name_as_filename): Remove
593 ns_in_resize check.
594
4632012-10-07 Eli Zaretskii <eliz@gnu.org> 5952012-10-07 Eli Zaretskii <eliz@gnu.org>
464 596
465 * w32term.h (WM_EMACS_FILENOTIFY): New custom message. 597 * w32term.h (WM_EMACS_FILENOTIFY): New custom message.
@@ -494,39 +626,6 @@
494 626
495 * alloc.c (NSTATICS): Enlarge to 0x660. 627 * alloc.c (NSTATICS): Enlarge to 0x660.
496 628
4972012-10-07 Jan Djärv <jan.h.d@swipnet.se>
498
499 * nsterm.m (ns_dumpglyphs_image): Only draw slice of image (Bug#12506).
500
501 * nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of
502 MAC_OS_X_VERSION_10_6.
503 (syms_of_nsterm): Remove comment about Panther and above for
504 ns-antialias-text.
505 * nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove.
506 (EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4.
507 (struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3.
508
509 * nsselect.m (ns_string_from_pasteboard): Remove check for >=
510 MAC_OS_X_VERSION_10_4.
511
512 * nsmenu.m (fillWithWidgetValue:): Remove code for <
513 MAC_OS_X_VERSION_10_2.
514
515 * nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger.
516
517 * nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4.
518 (ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4.
519
520 * nsterm.m (ns_in_resize): Remove (Bug#12479).
521 (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove.
522 (ns_clear_frame, sendEvent, windowDidResize, drawRect:): Remove
523 ns_in_resize check.
524 (ns_clear_frame_area): Remove resize handle code.
525
526 * nsfns.m (ns_in_resize): Remove.
527 (x_set_icon_name, ns_set_name, ns_set_name_as_filename): Remove
528 ns_in_resize check.
529
5302012-10-07 Paul Eggert <eggert@cs.ucla.edu> 6292012-10-07 Paul Eggert <eggert@cs.ucla.edu>
531 630
532 Improve sys_siglist detection. 631 Improve sys_siglist detection.
@@ -553,7 +652,7 @@
553 (initFrameFromEmacs:): tbar_height renamed tibar_height. 652 (initFrameFromEmacs:): tbar_height renamed tibar_height.
554 (windowDidEnterFullScreen:): Toggle toolbar for fullscreen to fix 653 (windowDidEnterFullScreen:): Toggle toolbar for fullscreen to fix
555 error in drawing background. 654 error in drawing background.
556 (toggleFullScreen:): Remove comment. Rearrange calls. 655 (toggleFullScreen:): Remove comment. Rearrange calls.
557 Set toolbar values to zero, save old height in tobar_height. 656 Set toolbar values to zero, save old height in tobar_height.
558 Restore tool bar height when leaving fullscreen. 657 Restore tool bar height when leaving fullscreen.
559 (canBecomeMainWindow): New function. 658 (canBecomeMainWindow): New function.
@@ -567,8 +666,8 @@
567 * w32proc.c (stop_timer_thread): Fix declaration of 'err'. 666 * w32proc.c (stop_timer_thread): Fix declaration of 'err'.
568 667
569 * w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so 668 * w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so
570 that time stamps of directories could also be changed. Don't 669 that time stamps of directories could also be changed.
571 request the too broad GENERIC_WRITE, only the more restrictive 670 Don't request the too broad GENERIC_WRITE, only the more restrictive
572 FILE_WRITE_ATTRIBUTES access rights. 671 FILE_WRITE_ATTRIBUTES access rights.
573 672
574 * fileio.c (Fset_file_times): Special-case ignoring errors for 673 * fileio.c (Fset_file_times): Special-case ignoring errors for
@@ -976,7 +1075,7 @@
976 Call setCollectionBehavior if NEW_STYLE_FS. Initialize bwidth and 1075 Call setCollectionBehavior if NEW_STYLE_FS. Initialize bwidth and
977 tbar_height. 1076 tbar_height.
978 (windowWillUseStandardFrame:defaultFrame:): Update frame parameter 1077 (windowWillUseStandardFrame:defaultFrame:): Update frame parameter
979 fullscreen. Set maximized_width/height. Act on next_maximized. 1078 fullscreen. Set maximized_width/height. Act on next_maximized.
980 1079
981 * nsterm.h (MAC_OS_X_VERSION_10_7, MAC_OS_X_VERSION_10_8): New. 1080 * nsterm.h (MAC_OS_X_VERSION_10_7, MAC_OS_X_VERSION_10_8): New.
982 (EmacsView): Add variables for fullscreen. 1081 (EmacsView): Add variables for fullscreen.
@@ -1632,7 +1731,7 @@
16322012-09-19 Paul Eggert <eggert@cs.ucla.edu> 17312012-09-19 Paul Eggert <eggert@cs.ucla.edu>
1633 1732
1634 * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0. 1733 * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0.
1635 Ignore 'expected'. See Eli Zaretskii in 1734 Ignore 'expected'. See Eli Zaretskii in
1636 <http://bugs.gnu.org/12471#8> (last line). 1735 <http://bugs.gnu.org/12471#8> (last line).
1637 1736
1638 * frame.c (read_integer): Remove. All uses replaced by strtol/strtoul. 1737 * frame.c (read_integer): Remove. All uses replaced by strtol/strtoul.
@@ -1699,7 +1798,7 @@
1699 (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc) 1798 (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc)
1700 (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc): 1799 (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc):
1701 [!SYSTEM_MALLOC && !SYNC_INPUT]: 1800 [!SYSTEM_MALLOC && !SYNC_INPUT]:
1702 Remove. All uses removed. 1801 Remove. All uses removed.
1703 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different 1802 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different
1704 implementation, one that depends on whether the new macro 1803 implementation, one that depends on whether the new macro
1705 XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT 1804 XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT
@@ -1989,7 +2088,7 @@
1989 * alloc.c (discard_killed_buffers): New function. 2088 * alloc.c (discard_killed_buffers): New function.
1990 (mark_object): Use it for deleted windows and frames. 2089 (mark_object): Use it for deleted windows and frames.
1991 (mark_object): If symbol's value is set up for a killed buffer 2090 (mark_object): If symbol's value is set up for a killed buffer
1992 or deleted frame, restore it's global binding. 2091 or deleted frame, restore its global binding.
1993 * data.c (swap_in_global_binding): Add GC notice. 2092 * data.c (swap_in_global_binding): Add GC notice.
1994 (swap_in_symval_forwarding): Use convenient set_blv_where. 2093 (swap_in_symval_forwarding): Use convenient set_blv_where.
1995 * window.c (wset_next_buffers, wset_prev_buffers): Move ... 2094 * window.c (wset_next_buffers, wset_prev_buffers): Move ...
@@ -4296,7 +4395,7 @@
4296 4395
4297 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar) 4396 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
4298 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:) 4397 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
4299 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114) 4398 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
4300 * nsfns.m (ns_set_name_as_filename): Likewise. 4399 * nsfns.m (ns_set_name_as_filename): Likewise.
4301 * nsmenu.m (ns_update_menubar): Likewise. 4400 * nsmenu.m (ns_update_menubar): Likewise.
4302 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR. 4401 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
@@ -6392,7 +6491,7 @@
6392 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE 6491 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
6393 values which aren't power of 2. 6492 values which aren't power of 2.
6394 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro. 6493 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
6395 Verify it's value and the value of VECTOR_BLOCK_SIZE. Adjust users 6494 Verify its value and the value of VECTOR_BLOCK_SIZE. Adjust users
6396 accordingly. 6495 accordingly.
6397 6496
63982012-07-03 Stefan Monnier <monnier@iro.umontreal.ca> 64972012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
@@ -7561,7 +7660,7 @@
7561 bitfields where appropriate, remove unused fields. 7660 bitfields where appropriate, remove unused fields.
7562 * window.h (struct window): Remove unused 'last_mark_x' and 7661 * window.h (struct window): Remove unused 'last_mark_x' and
7563 'last_mark_y' fields. Rename 'mini_p' field to 'mini', 7662 'last_mark_y' fields. Rename 'mini_p' field to 'mini',
7564 change it's type from Lisp_Object to bitfield. 7663 change its type from Lisp_Object to bitfield.
7565 Change type of 'force_start', 'optional_new_start', 7664 Change type of 'force_start', 'optional_new_start',
7566 'last_had_star', 'update_mode_line' and 'start_at_line_beg' 7665 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
7567 fields from Lisp_Object to bitfield. Adjust users accordingly. 7666 fields from Lisp_Object to bitfield. Adjust users accordingly.
diff --git a/src/alloc.c b/src/alloc.c
index 4fd659bd001..f2dd7c8cee7 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -3100,7 +3100,7 @@ usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INT
3100 ptrdiff_t i; 3100 ptrdiff_t i;
3101 register struct Lisp_Vector *p; 3101 register struct Lisp_Vector *p;
3102 3102
3103 /* We used to purecopy everything here, if purify-flga was set. This worked 3103 /* We used to purecopy everything here, if purify-flag was set. This worked
3104 OK for Emacs-23, but with Emacs-24's lexical binding code, it can be 3104 OK for Emacs-23, but with Emacs-24's lexical binding code, it can be
3105 dangerous, since make-byte-code is used during execution to build 3105 dangerous, since make-byte-code is used during execution to build
3106 closures, so any closure built during the preload phase would end up 3106 closures, so any closure built during the preload phase would end up
diff --git a/src/buffer.c b/src/buffer.c
index 861a89b5a0f..0b3dde27968 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1663,18 +1663,11 @@ No argument or nil as argument means do this for the current buffer. */)
1663void 1663void
1664compact_buffer (struct buffer *buffer) 1664compact_buffer (struct buffer *buffer)
1665{ 1665{
1666 /* Verify indirection counters. */ 1666 BUFFER_CHECK_INDIRECTION (buffer);
1667 if (buffer->base_buffer)
1668 {
1669 eassert (buffer->indirections == -1);
1670 eassert (buffer->base_buffer->indirections > 0);
1671 }
1672 else
1673 eassert (buffer->indirections >= 0);
1674 1667
1675 /* Skip dead buffers, indirect buffers and buffers 1668 /* Skip dead buffers, indirect buffers and buffers
1676 which aren't changed since last compaction. */ 1669 which aren't changed since last compaction. */
1677 if (!NILP (buffer->INTERNAL_FIELD (name)) 1670 if (BUFFER_LIVE_P (buffer)
1678 && (buffer->base_buffer == NULL) 1671 && (buffer->base_buffer == NULL)
1679 && (buffer->text->compact != buffer->text->modiff)) 1672 && (buffer->text->compact != buffer->text->modiff))
1680 { 1673 {
@@ -1888,19 +1881,20 @@ cleaning up all windows currently displaying the buffer to be killed. */)
1888 1881
1889 if (b->base_buffer) 1882 if (b->base_buffer)
1890 { 1883 {
1891 { /* Unchain all markers that belong to this indirect buffer. 1884 /* Unchain all markers that belong to this indirect buffer.
1892 Don't unchain the markers that belong to the base buffer 1885 Don't unchain the markers that belong to the base buffer
1893 or its other indirect buffers. */ 1886 or its other indirect buffers. */
1894 struct Lisp_Marker **mp; 1887 struct Lisp_Marker **mp = &BUF_MARKERS (b);
1895 for (mp = &BUF_MARKERS (b); *mp; ) 1888 while ((m = *mp))
1896 { 1889 {
1897 struct Lisp_Marker *m = *mp; 1890 if (m->buffer == b)
1898 if (m->buffer == b) 1891 {
1892 m->buffer = NULL;
1899 *mp = m->next; 1893 *mp = m->next;
1900 else 1894 }
1901 mp = &m->next; 1895 else
1902 } 1896 mp = &m->next;
1903 } 1897 }
1904 } 1898 }
1905 else 1899 else
1906 { 1900 {
@@ -2114,6 +2108,8 @@ set_buffer_internal_1 (register struct buffer *b)
2114 if (current_buffer == b) 2108 if (current_buffer == b)
2115 return; 2109 return;
2116 2110
2111 BUFFER_CHECK_INDIRECTION (b);
2112
2117 old_buf = current_buffer; 2113 old_buf = current_buffer;
2118 current_buffer = b; 2114 current_buffer = b;
2119 last_known_column_point = -1; /* invalidate indentation cache */ 2115 last_known_column_point = -1; /* invalidate indentation cache */
diff --git a/src/buffer.h b/src/buffer.h
index d18ef30ea38..9e0e9eef0b1 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -963,6 +963,22 @@ bset_width_table (struct buffer *b, Lisp_Object val)
963 963
964#define BUFFER_LIVE_P(b) (!NILP (BVAR (b, name))) 964#define BUFFER_LIVE_P(b) (!NILP (BVAR (b, name)))
965 965
966/* Verify indirection counters. */
967
968#define BUFFER_CHECK_INDIRECTION(b) \
969 do { \
970 if (BUFFER_LIVE_P (b)) \
971 { \
972 if (b->base_buffer) \
973 { \
974 eassert (b->indirections == -1); \
975 eassert (b->base_buffer->indirections > 0); \
976 } \
977 else \
978 eassert (b->indirections >= 0); \
979 } \
980 } while (0)
981
966/* Chain of all buffers, including killed ones. */ 982/* Chain of all buffers, including killed ones. */
967 983
968extern struct buffer *all_buffers; 984extern struct buffer *all_buffers;
diff --git a/src/cygw32.c b/src/cygw32.c
index c45a45648e9..8f63461da2a 100644
--- a/src/cygw32.c
+++ b/src/cygw32.c
@@ -145,7 +145,7 @@ DEFUN ("cygwin-convert-path-to-windows",
145 (Lisp_Object path, Lisp_Object absolute_p) 145 (Lisp_Object path, Lisp_Object absolute_p)
146{ 146{
147 return from_unicode ( 147 return from_unicode (
148 conv_filename_to_w32_unicode (path, absolute_p == Qnil ? 0 : 1)); 148 conv_filename_to_w32_unicode (path, EQ (absolute_p, Qnil) ? 0 : 1));
149} 149}
150 150
151DEFUN ("cygwin-convert-path-from-windows", 151DEFUN ("cygwin-convert-path-from-windows",
@@ -156,7 +156,7 @@ DEFUN ("cygwin-convert-path-from-windows",
156 (Lisp_Object path, Lisp_Object absolute_p) 156 (Lisp_Object path, Lisp_Object absolute_p)
157{ 157{
158 return conv_filename_from_w32_unicode (to_unicode (path, &path), 158 return conv_filename_from_w32_unicode (to_unicode (path, &path),
159 absolute_p == Qnil ? 0 : 1); 159 EQ (absolute_p, Qnil) ? 0 : 1);
160} 160}
161 161
162void 162void
diff --git a/src/dbusbind.c b/src/dbusbind.c
index c2eefd605bb..08f34f47042 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -32,6 +32,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
32#define DBUS_NUM_MESSAGE_TYPES 5 32#define DBUS_NUM_MESSAGE_TYPES 5
33#endif 33#endif
34 34
35
36/* Some platforms define the symbol "interface", but we want to use it
37 * as a variable name below. */
38
39#ifdef interface
40#undef interface
41#endif
42
35 43
36/* Subroutines. */ 44/* Subroutines. */
37static Lisp_Object Qdbus_init_bus; 45static Lisp_Object Qdbus_init_bus;
diff --git a/src/dispnew.c b/src/dispnew.c
index 0956e3f2905..fa24408aa43 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -60,6 +60,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
60#if defined (HAVE_TERM_H) && defined (GNU_LINUX) 60#if defined (HAVE_TERM_H) && defined (GNU_LINUX)
61#include <term.h> /* for tgetent */ 61#include <term.h> /* for tgetent */
62#endif 62#endif
63
64#ifdef WINDOWSNT
65#include "w32.h"
66#endif
63 67
64/* Structure to pass dimensions around. Used for character bounding 68/* Structure to pass dimensions around. Used for character bounding
65 boxes, glyph matrix dimensions and alike. */ 69 boxes, glyph matrix dimensions and alike. */
diff --git a/src/editfns.c b/src/editfns.c
index 19fad7130a7..c5d4ed295ab 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -1339,15 +1339,6 @@ DEFUN ("system-name", Fsystem_name, Ssystem_name, 0, 0, 0,
1339 return Vsystem_name; 1339 return Vsystem_name;
1340} 1340}
1341 1341
1342const char *
1343get_system_name (void)
1344{
1345 if (STRINGP (Vsystem_name))
1346 return SSDATA (Vsystem_name);
1347 else
1348 return "";
1349}
1350
1351DEFUN ("emacs-pid", Femacs_pid, Semacs_pid, 0, 0, 0, 1342DEFUN ("emacs-pid", Femacs_pid, Semacs_pid, 0, 0, 0,
1352 doc: /* Return the process ID of Emacs, as a number. */) 1343 doc: /* Return the process ID of Emacs, as a number. */)
1353 (void) 1344 (void)
diff --git a/src/fileio.c b/src/fileio.c
index e3a91c2c9da..d47d7dd9e0b 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -53,6 +53,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
53#include <windows.h> 53#include <windows.h>
54#include <fcntl.h> 54#include <fcntl.h>
55#include <sys/file.h> 55#include <sys/file.h>
56#include "w32.h"
56#endif /* not WINDOWSNT */ 57#endif /* not WINDOWSNT */
57 58
58#ifdef MSDOS 59#ifdef MSDOS
diff --git a/src/image.c b/src/image.c
index d52c3a29a27..538ae2b7772 100644
--- a/src/image.c
+++ b/src/image.c
@@ -6577,7 +6577,7 @@ static const struct image_keyword tiff_format[TIFF_LAST] =
6577 {":index", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0} 6577 {":index", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0}
6578}; 6578};
6579 6579
6580#ifdef HAVE_NTGUI 6580#if defined HAVE_NTGUI && defined WINDOWSNT
6581static bool init_tiff_functions (void); 6581static bool init_tiff_functions (void);
6582#else 6582#else
6583#define init_tiff_functions NULL 6583#define init_tiff_functions NULL
@@ -7529,7 +7529,7 @@ static struct image_keyword imagemagick_format[IMAGEMAGICK_LAST] =
7529 {":crop", IMAGE_DONT_CHECK_VALUE_TYPE, 0} 7529 {":crop", IMAGE_DONT_CHECK_VALUE_TYPE, 0}
7530 }; 7530 };
7531 7531
7532#ifdef HAVE_NTGUI 7532#if defined HAVE_NTGUI && defined WINDOWSNT
7533static bool init_imagemagick_functions (void); 7533static bool init_imagemagick_functions (void);
7534#else 7534#else
7535#define init_imagemagick_functions NULL 7535#define init_imagemagick_functions NULL
@@ -8083,7 +8083,7 @@ static const struct image_keyword svg_format[SVG_LAST] =
8083 {":background", IMAGE_STRING_OR_NIL_VALUE, 0} 8083 {":background", IMAGE_STRING_OR_NIL_VALUE, 0}
8084}; 8084};
8085 8085
8086#ifdef HAVE_NTGUI 8086#if defined HAVE_NTGUI && defined WINDOWSNT
8087static bool init_svg_functions (void); 8087static bool init_svg_functions (void);
8088#else 8088#else
8089#define init_svg_functions NULL 8089#define init_svg_functions NULL
diff --git a/src/indent.c b/src/indent.c
index 81a63455ecb..bbc944d2518 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -119,8 +119,7 @@ disptab_matches_widthtab (struct Lisp_Char_Table *disptab, struct Lisp_Vector *w
119{ 119{
120 int i; 120 int i;
121 121
122 if (widthtab->header.size != 256) 122 eassert (widthtab->header.size == 256);
123 emacs_abort ();
124 123
125 for (i = 0; i < 256; i++) 124 for (i = 0; i < 256; i++)
126 if (character_width (i, disptab) 125 if (character_width (i, disptab)
@@ -141,8 +140,7 @@ recompute_width_table (struct buffer *buf, struct Lisp_Char_Table *disptab)
141 if (!VECTORP (BVAR (buf, width_table))) 140 if (!VECTORP (BVAR (buf, width_table)))
142 bset_width_table (buf, Fmake_vector (make_number (256), make_number (0))); 141 bset_width_table (buf, Fmake_vector (make_number (256), make_number (0)));
143 widthtab = XVECTOR (BVAR (buf, width_table)); 142 widthtab = XVECTOR (BVAR (buf, width_table));
144 if (widthtab->header.size != 256) 143 eassert (widthtab->header.size == 256);
145 emacs_abort ();
146 144
147 for (i = 0; i < 256; i++) 145 for (i = 0; i < 256; i++)
148 XSETFASTINT (widthtab->contents[i], character_width (i, disptab)); 146 XSETFASTINT (widthtab->contents[i], character_width (i, disptab));
diff --git a/src/lisp.h b/src/lisp.h
index 113ae16fc14..b9e78385313 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3127,7 +3127,6 @@ extern Lisp_Object make_buffer_string (ptrdiff_t, ptrdiff_t, bool);
3127extern Lisp_Object make_buffer_string_both (ptrdiff_t, ptrdiff_t, ptrdiff_t, 3127extern Lisp_Object make_buffer_string_both (ptrdiff_t, ptrdiff_t, ptrdiff_t,
3128 ptrdiff_t, bool); 3128 ptrdiff_t, bool);
3129extern void init_editfns (void); 3129extern void init_editfns (void);
3130const char *get_system_name (void);
3131extern void syms_of_editfns (void); 3130extern void syms_of_editfns (void);
3132extern void set_time_zone_rule (const char *); 3131extern void set_time_zone_rule (const char *);
3133 3132
diff --git a/src/makefile.w32-in b/src/makefile.w32-in
index 3e817fd58ca..7cb6667c7ea 100644
--- a/src/makefile.w32-in
+++ b/src/makefile.w32-in
@@ -736,6 +736,7 @@ $(BLD)/dispnew.$(O) : \
736 $(SRC)/disptab.h \ 736 $(SRC)/disptab.h \
737 $(SRC)/indent.h \ 737 $(SRC)/indent.h \
738 $(SRC)/termchar.h \ 738 $(SRC)/termchar.h \
739 $(SRC)/w32.h \
739 $(NT_INC)/unistd.h \ 740 $(NT_INC)/unistd.h \
740 $(BUFFER_H) \ 741 $(BUFFER_H) \
741 $(CHARACTER_H) \ 742 $(CHARACTER_H) \
@@ -833,6 +834,7 @@ $(BLD)/fileio.$(O) : \
833 $(SRC)/fileio.c \ 834 $(SRC)/fileio.c \
834 $(SRC)/blockinput.h \ 835 $(SRC)/blockinput.h \
835 $(SRC)/commands.h \ 836 $(SRC)/commands.h \
837 $(SRC)/w32.h \
836 $(NT_INC)/pwd.h \ 838 $(NT_INC)/pwd.h \
837 $(NT_INC)/sys/file.h \ 839 $(NT_INC)/sys/file.h \
838 $(NT_INC)/sys/stat.h \ 840 $(NT_INC)/sys/stat.h \
@@ -1174,6 +1176,7 @@ $(BLD)/w32.$(O) : \
1174 $(SRC)/w32.h \ 1176 $(SRC)/w32.h \
1175 $(SRC)/w32common.h \ 1177 $(SRC)/w32common.h \
1176 $(SRC)/w32heap.h \ 1178 $(SRC)/w32heap.h \
1179 $(SRC)/w32select.h \
1177 $(NT_INC)/pwd.h \ 1180 $(NT_INC)/pwd.h \
1178 $(NT_INC)/sys/file.h \ 1181 $(NT_INC)/sys/file.h \
1179 $(NT_INC)/sys/time.h \ 1182 $(NT_INC)/sys/time.h \
@@ -1429,6 +1432,7 @@ $(BLD)/term.$(O) : \
1429 $(SYSSIGNAL_H) \ 1432 $(SYSSIGNAL_H) \
1430 $(SYSTTY_H) \ 1433 $(SYSTTY_H) \
1431 $(TERMHOOKS_H) \ 1434 $(TERMHOOKS_H) \
1435 $(W32TERM_H) \
1432 $(WINDOW_H) 1436 $(WINDOW_H)
1433 1437
1434$(BLD)/terminal.$(O) : \ 1438$(BLD)/terminal.$(O) : \
@@ -1469,13 +1473,16 @@ $(BLD)/undo.$(O) : \
1469$(BLD)/unexw32.$(O) : \ 1473$(BLD)/unexw32.$(O) : \
1470 $(SRC)/unexw32.c \ 1474 $(SRC)/unexw32.c \
1471 $(SRC)/unexec.h \ 1475 $(SRC)/unexec.h \
1476 $(SRC)/w32.h \
1472 $(SRC)/w32common.h \ 1477 $(SRC)/w32common.h \
1473 $(SRC)/w32heap.h \ 1478 $(SRC)/w32heap.h \
1479 $(LISP_H) \
1474 $(CONFIG_H) 1480 $(CONFIG_H)
1475 1481
1476$(BLD)/vm-limit.$(O) : \ 1482$(BLD)/vm-limit.$(O) : \
1477 $(SRC)/vm-limit.c \ 1483 $(SRC)/vm-limit.c \
1478 $(SRC)/mem-limits.h \ 1484 $(SRC)/mem-limits.h \
1485 $(SRC)/w32heap.h \
1479 $(NT_INC)/unistd.h \ 1486 $(NT_INC)/unistd.h \
1480 $(CONFIG_H) \ 1487 $(CONFIG_H) \
1481 $(LISP_H) 1488 $(LISP_H)
diff --git a/src/nsterm.m b/src/nsterm.m
index 98dd0a8aab1..dfc84db50f7 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -3444,7 +3444,10 @@ ns_select (int nfds, fd_set *readfds, fd_set *writefds,
3444/* NSTRACE (ns_select); */ 3444/* NSTRACE (ns_select); */
3445 3445
3446 for (k = 0; readfds && k < nfds+1; k++) 3446 for (k = 0; readfds && k < nfds+1; k++)
3447 if (FD_ISSET(k, readfds)) ++nr; 3447 {
3448 if (FD_ISSET(k, readfds)) ++nr;
3449 if (FD_ISSET(k, writefds)) ++nr;
3450 }
3448 3451
3449 if (NSApp == nil 3452 if (NSApp == nil
3450 || (timeout && timeout->tv_sec == 0 && timeout->tv_nsec == 0)) 3453 || (timeout && timeout->tv_sec == 0 && timeout->tv_nsec == 0))
diff --git a/src/print.c b/src/print.c
index 49b491faec8..ccf0e8ed7cc 100644
--- a/src/print.c
+++ b/src/print.c
@@ -2075,7 +2075,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
2075/* Print a description of INTERVAL using PRINTCHARFUN. 2075/* Print a description of INTERVAL using PRINTCHARFUN.
2076 This is part of printing a string that has text properties. */ 2076 This is part of printing a string that has text properties. */
2077 2077
2078void 2078static void
2079print_interval (INTERVAL interval, Lisp_Object printcharfun) 2079print_interval (INTERVAL interval, Lisp_Object printcharfun)
2080{ 2080{
2081 if (NILP (interval->plist)) 2081 if (NILP (interval->plist))
diff --git a/src/process.c b/src/process.c
index d45a2c6e8e0..307e82819d6 100644
--- a/src/process.c
+++ b/src/process.c
@@ -125,6 +125,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
125#include "xgselect.h" 125#include "xgselect.h"
126#endif 126#endif
127 127
128#ifdef WINDOWSNT
129extern int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *,
130 EMACS_TIME *, void *);
131#endif
132
128#ifndef WNOHANG 133#ifndef WNOHANG
129# undef waitpid 134# undef waitpid
130# define waitpid(pid, status, options) wait (status) 135# define waitpid(pid, status, options) wait (status)
diff --git a/src/term.c b/src/term.c
index acce9c0548c..f7c87b7608d 100644
--- a/src/term.c
+++ b/src/term.c
@@ -66,6 +66,7 @@ static int been_here = -1;
66/* The name of the default console device. */ 66/* The name of the default console device. */
67#ifdef WINDOWSNT 67#ifdef WINDOWSNT
68#define DEV_TTY "CONOUT$" 68#define DEV_TTY "CONOUT$"
69#include "w32term.h"
69#else 70#else
70#define DEV_TTY "/dev/tty" 71#define DEV_TTY "/dev/tty"
71#endif 72#endif
diff --git a/src/unexw32.c b/src/unexw32.c
index 82671d0f120..1e591a78b73 100644
--- a/src/unexw32.c
+++ b/src/unexw32.c
@@ -22,7 +22,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
22 22
23#include <config.h> 23#include <config.h>
24#include "unexec.h" 24#include "unexec.h"
25#include "lisp.h"
25#include "w32common.h" 26#include "w32common.h"
27#include "w32.h"
26 28
27#include <stdio.h> 29#include <stdio.h>
28#include <fcntl.h> 30#include <fcntl.h>
diff --git a/src/vm-limit.c b/src/vm-limit.c
index 3020b84858a..2a71e88695a 100644
--- a/src/vm-limit.c
+++ b/src/vm-limit.c
@@ -85,6 +85,8 @@ get_lim_data (void)
85#else /* not USG */ 85#else /* not USG */
86#ifdef WINDOWSNT 86#ifdef WINDOWSNT
87 87
88#include "w32heap.h"
89
88static void 90static void
89get_lim_data (void) 91get_lim_data (void)
90{ 92{
diff --git a/src/w32.c b/src/w32.c
index babbcc6df9f..5ac1bc3eb7c 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -175,6 +175,7 @@ typedef struct _REPARSE_DATA_BUFFER {
175#include "ndir.h" 175#include "ndir.h"
176#include "w32common.h" 176#include "w32common.h"
177#include "w32heap.h" 177#include "w32heap.h"
178#include "w32select.h"
178#include "systime.h" 179#include "systime.h"
179#include "dispextern.h" /* for xstrcasecmp */ 180#include "dispextern.h" /* for xstrcasecmp */
180#include "coding.h" /* for Vlocale_coding_system */ 181#include "coding.h" /* for Vlocale_coding_system */
@@ -198,6 +199,12 @@ static int enable_privilege (LPCTSTR, BOOL, TOKEN_PRIVILEGES *);
198static int restore_privilege (TOKEN_PRIVILEGES *); 199static int restore_privilege (TOKEN_PRIVILEGES *);
199static BOOL WINAPI revert_to_self (void); 200static BOOL WINAPI revert_to_self (void);
200 201
202extern int sys_access (const char *, int);
203extern void *e_malloc (size_t);
204extern int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *,
205 EMACS_TIME *, void *);
206
207
201 208
202/* Initialization states. 209/* Initialization states.
203 210
@@ -6961,7 +6968,7 @@ emacs_gnutls_pull (gnutls_transport_ptr_t p, void* buf, size_t sz)
6961{ 6968{
6962 int n, sc, err; 6969 int n, sc, err;
6963 SELECT_TYPE fdset; 6970 SELECT_TYPE fdset;
6964 struct timeval timeout; 6971 EMACS_TIME timeout;
6965 struct Lisp_Process *process = (struct Lisp_Process *)p; 6972 struct Lisp_Process *process = (struct Lisp_Process *)p;
6966 int fd = process->infd; 6973 int fd = process->infd;
6967 6974
@@ -6977,8 +6984,7 @@ emacs_gnutls_pull (gnutls_transport_ptr_t p, void* buf, size_t sz)
6977 if (err == EWOULDBLOCK) 6984 if (err == EWOULDBLOCK)
6978 { 6985 {
6979 /* Set a small timeout. */ 6986 /* Set a small timeout. */
6980 timeout.tv_sec = 1; 6987 timeout = make_emacs_time (1, 0);
6981 timeout.tv_usec = 0;
6982 FD_ZERO (&fdset); 6988 FD_ZERO (&fdset);
6983 FD_SET ((int)fd, &fdset); 6989 FD_SET ((int)fd, &fdset);
6984 6990
diff --git a/src/w32.h b/src/w32.h
index c4cfdf5fedd..8309a3cc23d 100644
--- a/src/w32.h
+++ b/src/w32.h
@@ -146,6 +146,28 @@ extern int _sys_wait_accept (int fd);
146extern Lisp_Object QCloaded_from; 146extern Lisp_Object QCloaded_from;
147extern HMODULE w32_delayed_load (Lisp_Object); 147extern HMODULE w32_delayed_load (Lisp_Object);
148 148
149extern void init_environment (char **);
150extern void check_windows_init_file (void);
151extern void syms_of_ntproc (void);
152extern void syms_of_ntterm (void);
153extern void dostounix_filename (register char *);
154extern void unixtodos_filename (register char *);
155extern BOOL init_winsock (int load_now);
156extern void srandom (int);
157extern int random (void);
158
159extern int sys_pipe (int *);
160
161extern void set_process_dir (char *);
162extern int sys_spawnve (int, char *, char **, char **);
163extern void register_child (int, int);
164
165extern void sys_sleep (int);
166extern char *getwd (char *);
167extern int sys_link (const char *, const char *);
168
169
170
149#ifdef HAVE_GNUTLS 171#ifdef HAVE_GNUTLS
150#include <gnutls/gnutls.h> 172#include <gnutls/gnutls.h>
151 173
diff --git a/src/w32fns.c b/src/w32fns.c
index df0a16fc2a3..5ef0d9796ec 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -2424,7 +2424,7 @@ w32_msg_pump (deferred_msg * msg_buf)
2424 thread-safe. The next line is okay because the cons 2424 thread-safe. The next line is okay because the cons
2425 cell is never made into garbage and is not relocated by 2425 cell is never made into garbage and is not relocated by
2426 GC. */ 2426 GC. */
2427 XSETCAR ((Lisp_Object) ((EMACS_INT) msg.lParam), Qnil); 2427 XSETCAR (XIL ((EMACS_INT) msg.lParam), Qnil);
2428 if (!PostThreadMessage (dwMainThreadId, WM_EMACS_DONE, 0, 0)) 2428 if (!PostThreadMessage (dwMainThreadId, WM_EMACS_DONE, 0, 0))
2429 emacs_abort (); 2429 emacs_abort ();
2430 break; 2430 break;
@@ -2432,7 +2432,7 @@ w32_msg_pump (deferred_msg * msg_buf)
2432 { 2432 {
2433 int vk_code = (int) msg.wParam; 2433 int vk_code = (int) msg.wParam;
2434 int cur_state = (GetKeyState (vk_code) & 1); 2434 int cur_state = (GetKeyState (vk_code) & 1);
2435 Lisp_Object new_state = (Lisp_Object) ((EMACS_INT) msg.lParam); 2435 Lisp_Object new_state = XIL ((EMACS_INT) msg.lParam);
2436 2436
2437 /* NB: This code must be thread-safe. It is safe to 2437 /* NB: This code must be thread-safe. It is safe to
2438 call NILP because symbols are not relocated by GC, 2438 call NILP because symbols are not relocated by GC,
diff --git a/src/w32proc.c b/src/w32proc.c
index d8d32e78d5c..3a4b7981dcb 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -24,6 +24,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
24#include <stdio.h> 24#include <stdio.h>
25#include <stdlib.h> 25#include <stdlib.h>
26#include <errno.h> 26#include <errno.h>
27#include <ctype.h>
27#include <io.h> 28#include <io.h>
28#include <fcntl.h> 29#include <fcntl.h>
29#include <signal.h> 30#include <signal.h>
@@ -68,8 +69,6 @@ extern BOOL WINAPI IsValidLocale (LCID, DWORD);
68 69
69Lisp_Object Qhigh, Qlow; 70Lisp_Object Qhigh, Qlow;
70 71
71typedef void (_CALLBACK_ *signal_handler) (int);
72
73/* Signal handlers...SIG_DFL == 0 so this is initialized correctly. */ 72/* Signal handlers...SIG_DFL == 0 so this is initialized correctly. */
74static signal_handler sig_handlers[NSIG]; 73static signal_handler sig_handlers[NSIG];
75 74
diff --git a/src/w32term.h b/src/w32term.h
index 91723c3758a..94ef9624351 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -682,6 +682,7 @@ extern BOOL parse_button (int, int, int *, int *);
682 682
683extern void w32_sys_ring_bell (struct frame *f); 683extern void w32_sys_ring_bell (struct frame *f);
684extern void x_delete_display (struct w32_display_info *dpyinfo); 684extern void x_delete_display (struct w32_display_info *dpyinfo);
685
685extern int notification_buffer_in_use; 686extern int notification_buffer_in_use;
686extern BYTE file_notifications[16384]; 687extern BYTE file_notifications[16384];
687extern DWORD notifications_size; 688extern DWORD notifications_size;
@@ -689,6 +690,9 @@ extern void *notifications_desc;
689extern Lisp_Object w32_get_watch_object (Lisp_Object); 690extern Lisp_Object w32_get_watch_object (Lisp_Object);
690extern Lisp_Object lispy_file_action (DWORD); 691extern Lisp_Object lispy_file_action (DWORD);
691 692
693extern void w32_initialize_display_info (Lisp_Object);
694extern void initialize_w32_display (struct terminal *);
695
692/* Keypad command key support. W32 doesn't have virtual keys defined 696/* Keypad command key support. W32 doesn't have virtual keys defined
693 for the function keys on the keypad (they are mapped to the standard 697 for the function keys on the keypad (they are mapped to the standard
694 function keys), so we define our own. */ 698 function keys), so we define our own. */
diff --git a/src/window.c b/src/window.c
index 61d2a8b073f..b4fee61cac8 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1464,9 +1464,7 @@ if it isn't already recorded. */)
1464#endif 1464#endif
1465 1465
1466 if (! NILP (update) 1466 if (! NILP (update)
1467 && ! (! NILP (w->window_end_valid) 1467 && (windows_or_buffers_changed || NILP (w->window_end_valid))
1468 && w->last_modified >= BUF_MODIFF (b)
1469 && w->last_overlay_modified >= BUF_OVERLAY_MODIFF (b))
1470 && !noninteractive) 1468 && !noninteractive)
1471 { 1469 {
1472 struct text_pos startp; 1470 struct text_pos startp;
@@ -3795,6 +3793,8 @@ resize_frame_windows (struct frame *f, int size, int horflag)
3795 (m, make_number (XINT (r->top_line) + XINT (r->total_lines))); 3793 (m, make_number (XINT (r->top_line) + XINT (r->total_lines)));
3796 } 3794 }
3797 } 3795 }
3796
3797 windows_or_buffers_changed++;
3798} 3798}
3799 3799
3800 3800
@@ -4208,6 +4208,7 @@ grow_mini_window (struct window *w, int delta)
4208 w->last_modified = 0; 4208 w->last_modified = 0;
4209 w->last_overlay_modified = 0; 4209 w->last_overlay_modified = 0;
4210 4210
4211 windows_or_buffers_changed++;
4211 adjust_glyphs (f); 4212 adjust_glyphs (f);
4212 unblock_input (); 4213 unblock_input ();
4213 } 4214 }
@@ -4245,6 +4246,7 @@ shrink_mini_window (struct window *w)
4245 w->last_modified = 0; 4246 w->last_modified = 0;
4246 w->last_overlay_modified = 0; 4247 w->last_overlay_modified = 0;
4247 4248
4249 windows_or_buffers_changed++;
4248 adjust_glyphs (f); 4250 adjust_glyphs (f);
4249 unblock_input (); 4251 unblock_input ();
4250 } 4252 }
diff --git a/src/xdisp.c b/src/xdisp.c
index 1e61a74068b..6964719f958 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -6302,6 +6302,8 @@ reseat_1 (struct it *it, struct text_pos pos, int set_stop_p)
6302 it->stop_charpos = CHARPOS (pos); 6302 it->stop_charpos = CHARPOS (pos);
6303 it->base_level_stop = CHARPOS (pos); 6303 it->base_level_stop = CHARPOS (pos);
6304 } 6304 }
6305 /* This make the information stored in it->cmp_it invalidate. */
6306 it->cmp_it.id = -1;
6305} 6307}
6306 6308
6307 6309
diff --git a/src/xrdb.c b/src/xrdb.c
index 73672c9617c..9d056a607e4 100644
--- a/src/xrdb.c
+++ b/src/xrdb.c
@@ -24,7 +24,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
24#include <unistd.h> 24#include <unistd.h>
25#include <errno.h> 25#include <errno.h>
26#include <epaths.h> 26#include <epaths.h>
27 27#include <stdlib.h>
28#include <stdio.h> 28#include <stdio.h>
29 29
30#include "lisp.h" 30#include "lisp.h"
@@ -48,11 +48,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
48#include "keyboard.h" 48#include "keyboard.h"
49#endif 49#endif
50 50
51extern char *getenv (const char *);
52
53extern struct passwd *getpwuid (uid_t);
54extern struct passwd *getpwnam (const char *);
55
56char *x_get_string_resource (XrmDatabase rdb, const char *name, 51char *x_get_string_resource (XrmDatabase rdb, const char *name,
57 const char *class); 52 const char *class);
58static int file_p (const char *filename); 53static int file_p (const char *filename);
@@ -429,8 +424,9 @@ get_environ_db (void)
429 { 424 {
430 static char const xdefaults[] = ".Xdefaults-"; 425 static char const xdefaults[] = ".Xdefaults-";
431 char *home = gethomedir (); 426 char *home = gethomedir ();
432 char const *host = get_system_name (); 427 char const *host = SSDATA (Vsystem_name);
433 ptrdiff_t pathsize = strlen (home) + sizeof xdefaults + strlen (host); 428 ptrdiff_t pathsize = (strlen (home) + sizeof xdefaults
429 + SBYTES (Vsystem_name));
434 path = xrealloc (home, pathsize); 430 path = xrealloc (home, pathsize);
435 strcat (strcat (path, xdefaults), host); 431 strcat (strcat (path, xdefaults), host);
436 p = path; 432 p = path;