diff options
| author | Joakim Verona | 2013-02-10 00:03:41 +0100 |
|---|---|---|
| committer | Joakim Verona | 2013-02-10 00:03:41 +0100 |
| commit | 33cc2cd4d53f845b7d1e681dbbe8166acdb652c3 (patch) | |
| tree | 551834731473d23116e08cb89facebbc8bad03db | |
| parent | 4df065db6acba3975884b435422773ab97f32a00 (diff) | |
| parent | eff1c1900f47ec5dfb6d435325b366362d09d2db (diff) | |
| download | emacs-33cc2cd4d53f845b7d1e681dbbe8166acdb652c3.tar.gz emacs-33cc2cd4d53f845b7d1e681dbbe8166acdb652c3.zip | |
auto upstream
48 files changed, 536 insertions, 411 deletions
| @@ -1,3 +1,14 @@ | |||
| 1 | 2013-02-08 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Merge from gnulib, incorporating: | ||
| 4 | 2013-02-08 careadlinkat: stop exporting careadlinkatcwd | ||
| 5 | The MS-Windows port can remove careadlinkatcwd at its convenience. | ||
| 6 | 2013-02-08 extensions: port better to HP-UX | ||
| 7 | 2013-02-06 extensions: port better to MINIX 3, HP-UX, autoheader 2.62 | ||
| 8 | 2013-02-06 unistd: avoid namespace pollution on non-glibc systems | ||
| 9 | 2013-02-04 secure_getenv: new module [module not used by Emacs] | ||
| 10 | 2013-01-30 sys_time: port to Solaris 2.6 | ||
| 11 | |||
| 1 | 2013-02-01 Paul Eggert <eggert@cs.ucla.edu> | 12 | 2013-02-01 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 13 | ||
| 3 | Use fdopendir, fstatat and readlinkat, for efficiency (Bug#13539). | 14 | Use fdopendir, fstatat and readlinkat, for efficiency (Bug#13539). |
diff --git a/autogen/Makefile.in b/autogen/Makefile.in index b1bd33e6b44..f4bc918fa49 100644 --- a/autogen/Makefile.in +++ b/autogen/Makefile.in | |||
| @@ -333,6 +333,7 @@ GNULIB_RMDIR = @GNULIB_RMDIR@ | |||
| 333 | GNULIB_RPMATCH = @GNULIB_RPMATCH@ | 333 | GNULIB_RPMATCH = @GNULIB_RPMATCH@ |
| 334 | GNULIB_SCANDIR = @GNULIB_SCANDIR@ | 334 | GNULIB_SCANDIR = @GNULIB_SCANDIR@ |
| 335 | GNULIB_SCANF = @GNULIB_SCANF@ | 335 | GNULIB_SCANF = @GNULIB_SCANF@ |
| 336 | GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ | ||
| 336 | GNULIB_SELECT = @GNULIB_SELECT@ | 337 | GNULIB_SELECT = @GNULIB_SELECT@ |
| 337 | GNULIB_SETENV = @GNULIB_SETENV@ | 338 | GNULIB_SETENV = @GNULIB_SETENV@ |
| 338 | GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ | 339 | GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ |
| @@ -498,6 +499,7 @@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ | |||
| 498 | HAVE_REWINDDIR = @HAVE_REWINDDIR@ | 499 | HAVE_REWINDDIR = @HAVE_REWINDDIR@ |
| 499 | HAVE_RPMATCH = @HAVE_RPMATCH@ | 500 | HAVE_RPMATCH = @HAVE_RPMATCH@ |
| 500 | HAVE_SCANDIR = @HAVE_SCANDIR@ | 501 | HAVE_SCANDIR = @HAVE_SCANDIR@ |
| 502 | HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ | ||
| 501 | HAVE_SETENV = @HAVE_SETENV@ | 503 | HAVE_SETENV = @HAVE_SETENV@ |
| 502 | HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ | 504 | HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ |
| 503 | HAVE_SIGACTION = @HAVE_SIGACTION@ | 505 | HAVE_SIGACTION = @HAVE_SIGACTION@ |
| @@ -1737,6 +1739,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ | |||
| 1737 | -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ | 1739 | -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ |
| 1738 | -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ | 1740 | -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ |
| 1739 | -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ | 1741 | -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ |
| 1742 | -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \ | ||
| 1740 | -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \ | 1743 | -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \ |
| 1741 | -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \ | 1744 | -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \ |
| 1742 | -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \ | 1745 | -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \ |
| @@ -1765,6 +1768,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ | |||
| 1765 | -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ | 1768 | -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ |
| 1766 | -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ | 1769 | -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ |
| 1767 | -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ | 1770 | -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ |
| 1771 | -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \ | ||
| 1768 | -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ | 1772 | -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ |
| 1769 | -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ | 1773 | -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ |
| 1770 | -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ | 1774 | -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ |
diff --git a/autogen/config.in b/autogen/config.in index 40eaf0e7221..be52b323fcb 100644 --- a/autogen/config.in +++ b/autogen/config.in | |||
| @@ -1398,6 +1398,38 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1398 | /* Define to 1 if using the Motif X toolkit. */ | 1398 | /* Define to 1 if using the Motif X toolkit. */ |
| 1399 | #undef USE_MOTIF | 1399 | #undef USE_MOTIF |
| 1400 | 1400 | ||
| 1401 | /* Enable extensions on AIX 3, Interix. */ | ||
| 1402 | #ifndef _ALL_SOURCE | ||
| 1403 | # undef _ALL_SOURCE | ||
| 1404 | #endif | ||
| 1405 | /* Enable general extensions on OS X. */ | ||
| 1406 | #ifndef _DARWIN_C_SOURCE | ||
| 1407 | # undef _DARWIN_C_SOURCE | ||
| 1408 | #endif | ||
| 1409 | /* Enable GNU extensions on systems that have them. */ | ||
| 1410 | #ifndef _GNU_SOURCE | ||
| 1411 | # undef _GNU_SOURCE | ||
| 1412 | #endif | ||
| 1413 | /* Enable threading extensions on Solaris. */ | ||
| 1414 | #ifndef _POSIX_PTHREAD_SEMANTICS | ||
| 1415 | # undef _POSIX_PTHREAD_SEMANTICS | ||
| 1416 | #endif | ||
| 1417 | /* Enable extensions on HP NonStop. */ | ||
| 1418 | #ifndef _TANDEM_SOURCE | ||
| 1419 | # undef _TANDEM_SOURCE | ||
| 1420 | #endif | ||
| 1421 | /* Enable X/Open extensions if necessary. HP-UX 11.11 defines | ||
| 1422 | mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of | ||
| 1423 | whether compiling with -Ae or -D_HPUX_SOURCE=1. */ | ||
| 1424 | #ifndef _XOPEN_SOURCE | ||
| 1425 | # undef _XOPEN_SOURCE | ||
| 1426 | #endif | ||
| 1427 | /* Enable general extensions on Solaris. */ | ||
| 1428 | #ifndef __EXTENSIONS__ | ||
| 1429 | # undef __EXTENSIONS__ | ||
| 1430 | #endif | ||
| 1431 | |||
| 1432 | |||
| 1401 | /* Define to 1 if we should use toolkit scroll bars. */ | 1433 | /* Define to 1 if we should use toolkit scroll bars. */ |
| 1402 | #undef USE_TOOLKIT_SCROLL_BARS | 1434 | #undef USE_TOOLKIT_SCROLL_BARS |
| 1403 | 1435 | ||
| @@ -1484,6 +1516,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1484 | /* Define if GNUstep uses ObjC exceptions. */ | 1516 | /* Define if GNUstep uses ObjC exceptions. */ |
| 1485 | #undef _NATIVE_OBJC_EXCEPTIONS | 1517 | #undef _NATIVE_OBJC_EXCEPTIONS |
| 1486 | 1518 | ||
| 1519 | /* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ | ||
| 1520 | #undef _NETBSD_SOURCE | ||
| 1521 | |||
| 1487 | /* The _Noreturn keyword of C11. */ | 1522 | /* The _Noreturn keyword of C11. */ |
| 1488 | #if ! (defined _Noreturn \ | 1523 | #if ! (defined _Noreturn \ |
| 1489 | || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) | 1524 | || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) |
| @@ -1508,35 +1543,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1508 | /* Needed for system_process_attributes on Solaris. */ | 1543 | /* Needed for system_process_attributes on Solaris. */ |
| 1509 | #undef _STRUCTURED_PROC | 1544 | #undef _STRUCTURED_PROC |
| 1510 | 1545 | ||
| 1511 | /* Define to 500 only on HP-UX. */ | ||
| 1512 | #undef _XOPEN_SOURCE | ||
| 1513 | |||
| 1514 | /* Enable extensions on AIX 3, Interix. */ | ||
| 1515 | #ifndef _ALL_SOURCE | ||
| 1516 | # undef _ALL_SOURCE | ||
| 1517 | #endif | ||
| 1518 | /* Enable general extensions on Mac OS X. */ | ||
| 1519 | #ifndef _DARWIN_C_SOURCE | ||
| 1520 | # undef _DARWIN_C_SOURCE | ||
| 1521 | #endif | ||
| 1522 | /* Enable GNU extensions on systems that have them. */ | ||
| 1523 | #ifndef _GNU_SOURCE | ||
| 1524 | # undef _GNU_SOURCE | ||
| 1525 | #endif | ||
| 1526 | /* Enable threading extensions on Solaris. */ | ||
| 1527 | #ifndef _POSIX_PTHREAD_SEMANTICS | ||
| 1528 | # undef _POSIX_PTHREAD_SEMANTICS | ||
| 1529 | #endif | ||
| 1530 | /* Enable extensions on HP NonStop. */ | ||
| 1531 | #ifndef _TANDEM_SOURCE | ||
| 1532 | # undef _TANDEM_SOURCE | ||
| 1533 | #endif | ||
| 1534 | /* Enable general extensions on Solaris. */ | ||
| 1535 | #ifndef __EXTENSIONS__ | ||
| 1536 | # undef __EXTENSIONS__ | ||
| 1537 | #endif | ||
| 1538 | |||
| 1539 | |||
| 1540 | /* Define to rpl_ if the getopt replacement functions and variables should be | 1546 | /* Define to rpl_ if the getopt replacement functions and variables should be |
| 1541 | used. */ | 1547 | used. */ |
| 1542 | #undef __GETOPT_PREFIX | 1548 | #undef __GETOPT_PREFIX |
diff --git a/autogen/configure b/autogen/configure index aa026222767..4b27e99acf1 100755 --- a/autogen/configure +++ b/autogen/configure | |||
| @@ -902,6 +902,7 @@ HAVE_STRTOLL | |||
| 902 | HAVE_STRTOD | 902 | HAVE_STRTOD |
| 903 | HAVE_DECL_SETENV | 903 | HAVE_DECL_SETENV |
| 904 | HAVE_SETENV | 904 | HAVE_SETENV |
| 905 | HAVE_SECURE_GETENV | ||
| 905 | HAVE_RPMATCH | 906 | HAVE_RPMATCH |
| 906 | HAVE_REALPATH | 907 | HAVE_REALPATH |
| 907 | HAVE_RANDOM_R | 908 | HAVE_RANDOM_R |
| @@ -929,6 +930,7 @@ GNULIB_STRTOULL | |||
| 929 | GNULIB_STRTOLL | 930 | GNULIB_STRTOLL |
| 930 | GNULIB_STRTOD | 931 | GNULIB_STRTOD |
| 931 | GNULIB_SETENV | 932 | GNULIB_SETENV |
| 933 | GNULIB_SECURE_GETENV | ||
| 932 | GNULIB_RPMATCH | 934 | GNULIB_RPMATCH |
| 933 | GNULIB_REALPATH | 935 | GNULIB_REALPATH |
| 934 | GNULIB_REALLOC_POSIX | 936 | GNULIB_REALLOC_POSIX |
| @@ -6469,8 +6471,6 @@ done | |||
| 6469 | 6471 | ||
| 6470 | 6472 | ||
| 6471 | 6473 | ||
| 6472 | |||
| 6473 | |||
| 6474 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" | 6474 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
| 6475 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : | 6475 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : |
| 6476 | MINIX=yes | 6476 | MINIX=yes |
| @@ -6489,15 +6489,10 @@ $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h | |||
| 6489 | 6489 | ||
| 6490 | $as_echo "#define _MINIX 1" >>confdefs.h | 6490 | $as_echo "#define _MINIX 1" >>confdefs.h |
| 6491 | 6491 | ||
| 6492 | fi | ||
| 6493 | |||
| 6494 | case "$host_os" in | ||
| 6495 | hpux*) | ||
| 6496 | 6492 | ||
| 6497 | $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h | 6493 | $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h |
| 6498 | 6494 | ||
| 6499 | ;; | 6495 | fi |
| 6500 | esac | ||
| 6501 | 6496 | ||
| 6502 | 6497 | ||
| 6503 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 | 6498 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
| @@ -6540,6 +6535,54 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |||
| 6540 | 6535 | ||
| 6541 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h | 6536 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
| 6542 | 6537 | ||
| 6538 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 | ||
| 6539 | $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; } | ||
| 6540 | if test "${ac_cv_should_define__xopen_source+set}" = set; then : | ||
| 6541 | $as_echo_n "(cached) " >&6 | ||
| 6542 | else | ||
| 6543 | ac_cv_should_define__xopen_source=no | ||
| 6544 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 6545 | /* end confdefs.h. */ | ||
| 6546 | |||
| 6547 | #include <wchar.h> | ||
| 6548 | mbstate_t x; | ||
| 6549 | int | ||
| 6550 | main () | ||
| 6551 | { | ||
| 6552 | |||
| 6553 | ; | ||
| 6554 | return 0; | ||
| 6555 | } | ||
| 6556 | _ACEOF | ||
| 6557 | if ac_fn_c_try_compile "$LINENO"; then : | ||
| 6558 | |||
| 6559 | else | ||
| 6560 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 6561 | /* end confdefs.h. */ | ||
| 6562 | |||
| 6563 | #define _XOPEN_SOURCE 500 | ||
| 6564 | #include <wchar.h> | ||
| 6565 | mbstate_t x; | ||
| 6566 | int | ||
| 6567 | main () | ||
| 6568 | { | ||
| 6569 | |||
| 6570 | ; | ||
| 6571 | return 0; | ||
| 6572 | } | ||
| 6573 | _ACEOF | ||
| 6574 | if ac_fn_c_try_compile "$LINENO"; then : | ||
| 6575 | ac_cv_should_define__xopen_source=yes | ||
| 6576 | fi | ||
| 6577 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
| 6578 | fi | ||
| 6579 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
| 6580 | fi | ||
| 6581 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 | ||
| 6582 | $as_echo "$ac_cv_should_define__xopen_source" >&6; } | ||
| 6583 | test $ac_cv_should_define__xopen_source = yes && | ||
| 6584 | $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h | ||
| 6585 | |||
| 6543 | 6586 | ||
| 6544 | 6587 | ||
| 6545 | 6588 | ||
| @@ -17367,6 +17410,7 @@ _ACEOF | |||
| 17367 | GNULIB_REALLOC_POSIX=0; | 17410 | GNULIB_REALLOC_POSIX=0; |
| 17368 | GNULIB_REALPATH=0; | 17411 | GNULIB_REALPATH=0; |
| 17369 | GNULIB_RPMATCH=0; | 17412 | GNULIB_RPMATCH=0; |
| 17413 | GNULIB_SECURE_GETENV=0; | ||
| 17370 | GNULIB_SETENV=0; | 17414 | GNULIB_SETENV=0; |
| 17371 | GNULIB_STRTOD=0; | 17415 | GNULIB_STRTOD=0; |
| 17372 | GNULIB_STRTOLL=0; | 17416 | GNULIB_STRTOLL=0; |
| @@ -17394,6 +17438,7 @@ _ACEOF | |||
| 17394 | HAVE_RANDOM_R=1; | 17438 | HAVE_RANDOM_R=1; |
| 17395 | HAVE_REALPATH=1; | 17439 | HAVE_REALPATH=1; |
| 17396 | HAVE_RPMATCH=1; | 17440 | HAVE_RPMATCH=1; |
| 17441 | HAVE_SECURE_GETENV=1; | ||
| 17397 | HAVE_SETENV=1; | 17442 | HAVE_SETENV=1; |
| 17398 | HAVE_DECL_SETENV=1; | 17443 | HAVE_DECL_SETENV=1; |
| 17399 | HAVE_STRTOD=1; | 17444 | HAVE_STRTOD=1; |
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 3b7ab6527aa..d2f44eabb0e 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-02-09 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * msdog.texi (Text and Binary): Delete the description of | ||
| 4 | file-name-buffer-file-type-alist. | ||
| 5 | |||
| 1 | 2013-01-19 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2013-01-19 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 7 | ||
| 3 | * trouble.texi (Crashing): Suggest -p for newer addr2line. (Bug#13445) | 8 | * trouble.texi (Crashing): Suggest -p for newer addr2line. (Bug#13445) |
diff --git a/doc/emacs/msdog.texi b/doc/emacs/msdog.texi index 2c22c89a113..0f01958b51c 100644 --- a/doc/emacs/msdog.texi +++ b/doc/emacs/msdog.texi | |||
| @@ -218,29 +218,6 @@ set conversion, only end-of-line conversion. Essentially, it directs | |||
| 218 | Emacs to create new files with the Unix-style convention of using | 218 | Emacs to create new files with the Unix-style convention of using |
| 219 | newline at the end of a line. @xref{Coding Systems}. | 219 | newline at the end of a line. @xref{Coding Systems}. |
| 220 | 220 | ||
| 221 | @vindex file-name-buffer-file-type-alist | ||
| 222 | @cindex binary files, on MS-DOS/MS-Windows | ||
| 223 | Some kinds of files should not be converted at all, because their | ||
| 224 | contents are not really text. Therefore, Emacs on MS-Windows distinguishes | ||
| 225 | certain files as @dfn{binary files}. (This distinction is not part of | ||
| 226 | MS-Windows; it is made by Emacs only.) Binary files include executable | ||
| 227 | programs, compressed archives, etc. Emacs uses the file name to decide | ||
| 228 | whether to treat a file as binary: the variable | ||
| 229 | @code{file-name-buffer-file-type-alist} defines the file-name patterns | ||
| 230 | that indicate binary files. If a file name matches one of the patterns | ||
| 231 | for binary files (those whose associations are of the type | ||
| 232 | @code{(@var{pattern} . t)}, Emacs reads and writes that file using the | ||
| 233 | @code{no-conversion} coding system (@pxref{Coding Systems}) which turns | ||
| 234 | off @emph{all} coding-system conversions, not only the EOL conversion. | ||
| 235 | @code{file-name-buffer-file-type-alist} also includes file-name patterns | ||
| 236 | for files which are known to be Windows-style text files with | ||
| 237 | carriage-return linefeed EOL format, such as @file{CONFIG.SYS}; Emacs | ||
| 238 | always writes those files with Windows-style EOLs. | ||
| 239 | |||
| 240 | If a file that belongs to an untranslated file system matches one of | ||
| 241 | the file-name patterns in @code{file-name-buffer-file-type-alist}, the | ||
| 242 | EOL conversion is determined by @code{file-name-buffer-file-type-alist}. | ||
| 243 | |||
| 244 | @node Windows Files | 221 | @node Windows Files |
| 245 | @section File Names on MS-Windows | 222 | @section File Names on MS-Windows |
| 246 | @cindex file names on MS-Windows | 223 | @cindex file names on MS-Windows |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 7c444a038af..90b2349387f 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2013-02-09 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * modes.texi (%-Constructs): Remove the description of %t. | ||
| 4 | |||
| 5 | * nonascii.texi (MS-DOS File Types): Delete node. | ||
| 6 | |||
| 1 | 2013-02-08 Glenn Morris <rgm@gnu.org> | 7 | 2013-02-08 Glenn Morris <rgm@gnu.org> |
| 2 | 8 | ||
| 3 | * keymaps.texi (Active Keymaps, Searching Keymaps): | 9 | * keymaps.texi (Active Keymaps, Searching Keymaps): |
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index 127b22086d0..3d1c4cf577d 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi | |||
| @@ -1209,8 +1209,6 @@ Coding Systems | |||
| 1209 | for a single file operation. | 1209 | for a single file operation. |
| 1210 | * Explicit Encoding:: Encoding or decoding text without doing I/O. | 1210 | * Explicit Encoding:: Encoding or decoding text without doing I/O. |
| 1211 | * Terminal I/O Encoding:: Use of encoding for terminal I/O. | 1211 | * Terminal I/O Encoding:: Use of encoding for terminal I/O. |
| 1212 | * MS-DOS File Types:: How DOS "text" and "binary" files | ||
| 1213 | relate to coding systems. | ||
| 1214 | 1212 | ||
| 1215 | Searching and Matching | 1213 | Searching and Matching |
| 1216 | 1214 | ||
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 29aba877ba2..71ce2bb9271 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi | |||
| @@ -2150,11 +2150,6 @@ visible on screen; or @samp{Bottom} or @samp{All}. | |||
| 2150 | The status of the subprocess belonging to the current buffer, obtained with | 2150 | The status of the subprocess belonging to the current buffer, obtained with |
| 2151 | @code{process-status}. @xref{Process Information}. | 2151 | @code{process-status}. @xref{Process Information}. |
| 2152 | 2152 | ||
| 2153 | @item %t | ||
| 2154 | Whether the visited file is a text file or a binary file. This is a | ||
| 2155 | meaningful distinction only on certain operating systems (@pxref{MS-DOS | ||
| 2156 | File Types}). | ||
| 2157 | |||
| 2158 | @item %z | 2153 | @item %z |
| 2159 | The mnemonics of keyboard, terminal, and buffer coding systems. | 2154 | The mnemonics of keyboard, terminal, and buffer coding systems. |
| 2160 | 2155 | ||
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index 9ad68be60cb..e462c3b4ce4 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi | |||
| @@ -855,8 +855,6 @@ documented here. | |||
| 855 | for a single file operation. | 855 | for a single file operation. |
| 856 | * Explicit Encoding:: Encoding or decoding text without doing I/O. | 856 | * Explicit Encoding:: Encoding or decoding text without doing I/O. |
| 857 | * Terminal I/O Encoding:: Use of encoding for terminal I/O. | 857 | * Terminal I/O Encoding:: Use of encoding for terminal I/O. |
| 858 | * MS-DOS File Types:: How DOS "text" and "binary" files | ||
| 859 | relate to coding systems. | ||
| 860 | @end menu | 858 | @end menu |
| 861 | 859 | ||
| 862 | @node Coding System Basics | 860 | @node Coding System Basics |
| @@ -1775,62 +1773,6 @@ for encoding terminal output from @var{terminal}. If | |||
| 1775 | @code{nil}, that means the currently selected frame's terminal. | 1773 | @code{nil}, that means the currently selected frame's terminal. |
| 1776 | @end deffn | 1774 | @end deffn |
| 1777 | 1775 | ||
| 1778 | @node MS-DOS File Types | ||
| 1779 | @subsection MS-DOS File Types | ||
| 1780 | @cindex DOS file types | ||
| 1781 | @cindex MS-DOS file types | ||
| 1782 | @cindex Windows file types | ||
| 1783 | @cindex file types on MS-DOS and Windows | ||
| 1784 | @cindex text files and binary files | ||
| 1785 | @cindex binary files and text files | ||
| 1786 | |||
| 1787 | On MS-DOS and Microsoft Windows, Emacs guesses the appropriate | ||
| 1788 | end-of-line conversion for a file by looking at the file's name. This | ||
| 1789 | feature classifies files as @dfn{text files} and @dfn{binary files}. By | ||
| 1790 | ``binary file'' we mean a file of literal byte values that are not | ||
| 1791 | necessarily meant to be characters; Emacs does no end-of-line conversion | ||
| 1792 | and no character code conversion for them. On the other hand, the bytes | ||
| 1793 | in a text file are intended to represent characters; when you create a | ||
| 1794 | new file whose name implies that it is a text file, Emacs uses DOS | ||
| 1795 | end-of-line conversion. | ||
| 1796 | |||
| 1797 | @defvar buffer-file-type | ||
| 1798 | This variable, automatically buffer-local in each buffer, records the | ||
| 1799 | file type of the buffer's visited file. When a buffer does not specify | ||
| 1800 | a coding system with @code{buffer-file-coding-system}, this variable is | ||
| 1801 | used to determine which coding system to use when writing the contents | ||
| 1802 | of the buffer. It should be @code{nil} for text, @code{t} for binary. | ||
| 1803 | If it is @code{t}, the coding system is @code{no-conversion}. | ||
| 1804 | Otherwise, @code{undecided-dos} is used. | ||
| 1805 | |||
| 1806 | Normally this variable is set by visiting a file; it is set to | ||
| 1807 | @code{nil} if the file was visited without any actual conversion. | ||
| 1808 | |||
| 1809 | Its default value is used to decide how to handle files for which | ||
| 1810 | @code{file-name-buffer-file-type-alist} says nothing about the type: | ||
| 1811 | If the default value is non-@code{nil}, then these files are treated as | ||
| 1812 | binary: the coding system @code{no-conversion} is used. Otherwise, | ||
| 1813 | nothing special is done for them---the coding system is deduced solely | ||
| 1814 | from the file contents, in the usual Emacs fashion. | ||
| 1815 | @end defvar | ||
| 1816 | |||
| 1817 | @defopt file-name-buffer-file-type-alist | ||
| 1818 | This variable holds an alist for recognizing text and binary files. | ||
| 1819 | Each element has the form (@var{regexp} . @var{type}), where | ||
| 1820 | @var{regexp} is matched against the file name, and @var{type} may be | ||
| 1821 | @code{nil} for text, @code{t} for binary, or a function to call to | ||
| 1822 | compute which. If it is a function, then it is called with a single | ||
| 1823 | argument (the file name) and should return @code{t} or @code{nil}. | ||
| 1824 | |||
| 1825 | When running on MS-DOS or MS-Windows, Emacs checks this alist to decide | ||
| 1826 | which coding system to use when reading a file. For a text file, | ||
| 1827 | @code{undecided-dos} is used. For a binary file, @code{no-conversion} | ||
| 1828 | is used. | ||
| 1829 | |||
| 1830 | If no element in this alist matches a given file name, then | ||
| 1831 | the default value of @code{buffer-file-type} says how to treat the file. | ||
| 1832 | @end defopt | ||
| 1833 | |||
| 1834 | @node Input Methods | 1776 | @node Input Methods |
| 1835 | @section Input Methods | 1777 | @section Input Methods |
| 1836 | @cindex input methods | 1778 | @cindex input methods |
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index d64f45bbee9..85f184cc4cb 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | % Load plain if necessary, i.e., if running under initex. | 3 | % Load plain if necessary, i.e., if running under initex. |
| 4 | \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi | 4 | \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi |
| 5 | % | 5 | % |
| 6 | \def\texinfoversion{2013-01-01.15} | 6 | \def\texinfoversion{2013-02-01.11} |
| 7 | % | 7 | % |
| 8 | % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, | 8 | % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, |
| 9 | % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, | 9 | % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |
| @@ -2496,7 +2496,7 @@ end | |||
| 2496 | \let-\codedash | 2496 | \let-\codedash |
| 2497 | \let_\codeunder | 2497 | \let_\codeunder |
| 2498 | \else | 2498 | \else |
| 2499 | \let-\realdash | 2499 | \let-\normaldash |
| 2500 | \let_\realunder | 2500 | \let_\realunder |
| 2501 | \fi | 2501 | \fi |
| 2502 | \codex | 2502 | \codex |
| @@ -2505,7 +2505,7 @@ end | |||
| 2505 | 2505 | ||
| 2506 | \def\codex #1{\tclose{#1}\endgroup} | 2506 | \def\codex #1{\tclose{#1}\endgroup} |
| 2507 | 2507 | ||
| 2508 | \def\realdash{-} | 2508 | \def\normaldash{-} |
| 2509 | \def\codedash{-\discretionary{}{}{}} | 2509 | \def\codedash{-\discretionary{}{}{}} |
| 2510 | \def\codeunder{% | 2510 | \def\codeunder{% |
| 2511 | % this is all so @math{@code{var_name}+1} can work. In math mode, _ | 2511 | % this is all so @math{@code{var_name}+1} can work. In math mode, _ |
| @@ -2520,9 +2520,9 @@ end | |||
| 2520 | } | 2520 | } |
| 2521 | 2521 | ||
| 2522 | % An additional complication: the above will allow breaks after, e.g., | 2522 | % An additional complication: the above will allow breaks after, e.g., |
| 2523 | % each of the four underscores in __typeof__. This is undesirable in | 2523 | % each of the four underscores in __typeof__. This is bad. |
| 2524 | % some manuals, especially if they don't have long identifiers in | 2524 | % @allowcodebreaks provides a document-level way to turn breaking at - |
| 2525 | % general. @allowcodebreaks provides a way to control this. | 2525 | % and _ on and off. |
| 2526 | % | 2526 | % |
| 2527 | \newif\ifallowcodebreaks \allowcodebreakstrue | 2527 | \newif\ifallowcodebreaks \allowcodebreakstrue |
| 2528 | 2528 | ||
| @@ -4188,7 +4188,7 @@ end | |||
| 4188 | % ..., but we might end up with active ones in the argument if | 4188 | % ..., but we might end up with active ones in the argument if |
| 4189 | % we're called from @code, as @code{@value{foo-bar_}}, though. | 4189 | % we're called from @code, as @code{@value{foo-bar_}}, though. |
| 4190 | % So \let them to their normal equivalents. | 4190 | % So \let them to their normal equivalents. |
| 4191 | \let-\realdash \let_\normalunderscore | 4191 | \let-\normaldash \let_\normalunderscore |
| 4192 | } | 4192 | } |
| 4193 | } | 4193 | } |
| 4194 | 4194 | ||
| @@ -9993,22 +9993,26 @@ directory should work if nowhere else does.} | |||
| 9993 | @gdef@otherbackslash{@let\=@realbackslash} | 9993 | @gdef@otherbackslash{@let\=@realbackslash} |
| 9994 | 9994 | ||
| 9995 | % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of | 9995 | % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of |
| 9996 | % the literal character `\'. | 9996 | % the literal character `\'. Also revert - to its normal character, in |
| 9997 | % | 9997 | % case the active - from code has slipped in. |
| 9998 | @def@normalturnoffactive{% | 9998 | % |
| 9999 | @let"=@normaldoublequote | 9999 | {@catcode`- = @active |
| 10000 | @let$=@normaldollar %$ font-lock fix | 10000 | @gdef@normalturnoffactive{% |
| 10001 | @let+=@normalplus | 10001 | @let-=@normaldash |
| 10002 | @let<=@normalless | 10002 | @let"=@normaldoublequote |
| 10003 | @let>=@normalgreater | 10003 | @let$=@normaldollar %$ font-lock fix |
| 10004 | @let\=@normalbackslash | 10004 | @let+=@normalplus |
| 10005 | @let^=@normalcaret | 10005 | @let<=@normalless |
| 10006 | @let_=@normalunderscore | 10006 | @let>=@normalgreater |
| 10007 | @let|=@normalverticalbar | 10007 | @let\=@normalbackslash |
| 10008 | @let~=@normaltilde | 10008 | @let^=@normalcaret |
| 10009 | @markupsetuplqdefault | 10009 | @let_=@normalunderscore |
| 10010 | @markupsetuprqdefault | 10010 | @let|=@normalverticalbar |
| 10011 | @unsepspaces | 10011 | @let~=@normaltilde |
| 10012 | @markupsetuplqdefault | ||
| 10013 | @markupsetuprqdefault | ||
| 10014 | @unsepspaces | ||
| 10015 | } | ||
| 10012 | } | 10016 | } |
| 10013 | 10017 | ||
| 10014 | % Make _ and + \other characters, temporarily. | 10018 | % Make _ and + \other characters, temporarily. |
| @@ -280,6 +280,12 @@ and ACL entries. | |||
| 280 | The backtrace is written to the 'emacs_backtrace.txt' file in the | 280 | The backtrace is written to the 'emacs_backtrace.txt' file in the |
| 281 | directory where Emacs was running. | 281 | directory where Emacs was running. |
| 282 | 282 | ||
| 283 | +++ | ||
| 284 | ** The variable `buffer-file-type' is no longer supported. | ||
| 285 | Setting it has no effect, and %t in the mode-line format is ignored. | ||
| 286 | Likewise, `file-name-buffer-file-type-alist' is now obsolete, and | ||
| 287 | modifying it has no effect. | ||
| 288 | |||
| 283 | 289 | ||
| 284 | * Installation Changes in Emacs 24.3 | 290 | * Installation Changes in Emacs 24.3 |
| 285 | 291 | ||
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 2bdbebeb110..81876d86165 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2013-02-08 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * movemail.c (getenv): Remove decl (unused since 1994). | ||
| 4 | |||
| 1 | 2013-01-15 Paul Eggert <eggert@cs.ucla.edu> | 5 | 2013-01-15 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 6 | ||
| 3 | * make-docfile.c (write_globals): Make it a bit clearer (Bug#13448). | 7 | * make-docfile.c (write_globals): Make it a bit clearer (Bug#13448). |
diff --git a/lib-src/movemail.c b/lib-src/movemail.c index 616cbde5394..cf93fb78d98 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c | |||
| @@ -665,7 +665,6 @@ popmail (char *mailbox, char *outfile, int preserve, char *password, int reverse | |||
| 665 | register int i; | 665 | register int i; |
| 666 | int mbfi; | 666 | int mbfi; |
| 667 | FILE *mbf; | 667 | FILE *mbf; |
| 668 | char *getenv (const char *); | ||
| 669 | popserver server; | 668 | popserver server; |
| 670 | int start, end, increment; | 669 | int start, end, increment; |
| 671 | char *user, *hostname; | 670 | char *user, *hostname; |
diff --git a/lib/careadlinkat.c b/lib/careadlinkat.c index d242ffaac7d..e2c19d1c1f1 100644 --- a/lib/careadlinkat.c +++ b/lib/careadlinkat.c | |||
| @@ -25,6 +25,7 @@ | |||
| 25 | #include <errno.h> | 25 | #include <errno.h> |
| 26 | #include <limits.h> | 26 | #include <limits.h> |
| 27 | #include <string.h> | 27 | #include <string.h> |
| 28 | #include <unistd.h> | ||
| 28 | 29 | ||
| 29 | /* Define this independently so that stdint.h is not a prerequisite. */ | 30 | /* Define this independently so that stdint.h is not a prerequisite. */ |
| 30 | #ifndef SIZE_MAX | 31 | #ifndef SIZE_MAX |
diff --git a/lib/careadlinkat.h b/lib/careadlinkat.h index 965573bef3a..46f88ae288a 100644 --- a/lib/careadlinkat.h +++ b/lib/careadlinkat.h | |||
| @@ -52,15 +52,12 @@ char *careadlinkat (int fd, char const *filename, | |||
| 52 | ssize_t (*preadlinkat) (int, char const *, | 52 | ssize_t (*preadlinkat) (int, char const *, |
| 53 | char *, size_t)); | 53 | char *, size_t)); |
| 54 | 54 | ||
| 55 | /* Suitable value for careadlinkat's FD argument, | 55 | /* Suitable value for careadlinkat's FD argument. */ |
| 56 | when doing a plain readlink: | ||
| 57 | Pass FD = AT_FDCWD. */ | ||
| 58 | #if HAVE_READLINKAT | 56 | #if HAVE_READLINKAT |
| 59 | /* AT_FDCWD is declared in <fcntl.h>. */ | 57 | /* AT_FDCWD is declared in <fcntl.h>. */ |
| 60 | #else | 58 | #else |
| 61 | /* Define AT_FDCWD independently, so that the careadlinkat module does | 59 | /* Define AT_FDCWD independently, so that the careadlinkat module does |
| 62 | not depend on the fcntl-h module. The value does not matter, since | 60 | not depend on the fcntl-h module. We might as well use the same value |
| 63 | careadlinkatcwd ignores it, but we might as well use the same value | ||
| 64 | as fcntl-h. */ | 61 | as fcntl-h. */ |
| 65 | # ifndef AT_FDCWD | 62 | # ifndef AT_FDCWD |
| 66 | # define AT_FDCWD (-3041965) | 63 | # define AT_FDCWD (-3041965) |
diff --git a/lib/gnulib.mk b/lib/gnulib.mk index 89317fd2088..8103eec88a0 100644 --- a/lib/gnulib.mk +++ b/lib/gnulib.mk | |||
| @@ -1032,6 +1032,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ | |||
| 1032 | -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ | 1032 | -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ |
| 1033 | -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ | 1033 | -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ |
| 1034 | -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ | 1034 | -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ |
| 1035 | -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \ | ||
| 1035 | -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \ | 1036 | -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \ |
| 1036 | -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \ | 1037 | -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \ |
| 1037 | -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \ | 1038 | -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \ |
| @@ -1060,6 +1061,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ | |||
| 1060 | -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ | 1061 | -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ |
| 1061 | -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ | 1062 | -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ |
| 1062 | -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ | 1063 | -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ |
| 1064 | -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \ | ||
| 1063 | -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ | 1065 | -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ |
| 1064 | -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ | 1066 | -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ |
| 1065 | -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ | 1067 | -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ |
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index 422ad714c32..e054c520ebe 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h | |||
| @@ -767,6 +767,22 @@ _GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - " | |||
| 767 | # endif | 767 | # endif |
| 768 | #endif | 768 | #endif |
| 769 | 769 | ||
| 770 | #if @GNULIB_SECURE_GETENV@ | ||
| 771 | /* Look up NAME in the environment, returning 0 in insecure situations. */ | ||
| 772 | # if !@HAVE_SECURE_GETENV@ | ||
| 773 | _GL_FUNCDECL_SYS (secure_getenv, char *, | ||
| 774 | (char const *name) _GL_ARG_NONNULL ((1))); | ||
| 775 | # endif | ||
| 776 | _GL_CXXALIAS_SYS (secure_getenv, int, (char const *name)); | ||
| 777 | _GL_CXXALIASWARN (secure_getenv); | ||
| 778 | #elif defined GNULIB_POSIXCHECK | ||
| 779 | # undef secure_getenv | ||
| 780 | # if HAVE_RAW_DECL_SECURE_GETENV | ||
| 781 | _GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - " | ||
| 782 | "use gnulib module secure_getenv for portability"); | ||
| 783 | # endif | ||
| 784 | #endif | ||
| 785 | |||
| 770 | #if @GNULIB_SETENV@ | 786 | #if @GNULIB_SETENV@ |
| 771 | /* Set NAME to VALUE in the environment. | 787 | /* Set NAME to VALUE in the environment. |
| 772 | If REPLACE is nonzero, overwrite an existing value. */ | 788 | If REPLACE is nonzero, overwrite an existing value. */ |
diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h index edff088a125..521ccef321d 100644 --- a/lib/sys_select.in.h +++ b/lib/sys_select.in.h | |||
| @@ -19,14 +19,25 @@ | |||
| 19 | # endif | 19 | # endif |
| 20 | @PRAGMA_COLUMNS@ | 20 | @PRAGMA_COLUMNS@ |
| 21 | 21 | ||
| 22 | /* On OSF/1, <sys/types.h> and <sys/time.h> include <sys/select.h>. | 22 | /* On OSF/1 and Solaris 2.6, <sys/types.h> and <sys/time.h> |
| 23 | both include <sys/select.h>. | ||
| 23 | Simply delegate to the system's header in this case. */ | 24 | Simply delegate to the system's header in this case. */ |
| 24 | #if @HAVE_SYS_SELECT_H@ && defined __osf__ && (defined _SYS_TYPES_H_ && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H) && defined _OSF_SOURCE | 25 | #if (@HAVE_SYS_SELECT_H@ \ |
| 26 | && ((defined __osf__ && defined _SYS_TYPES_H_ && defined _OSF_SOURCE) \ | ||
| 27 | || (defined __sun && defined _SYS_TYPES_H \ | ||
| 28 | && (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE) \ | ||
| 29 | || defined __EXTENSIONS__))) \ | ||
| 30 | && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H) | ||
| 25 | 31 | ||
| 26 | # define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H | 32 | # define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H |
| 27 | # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ | 33 | # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ |
| 28 | 34 | ||
| 29 | #elif @HAVE_SYS_SELECT_H@ && defined __osf__ && (defined _SYS_TIME_H_ && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H) && defined _OSF_SOURCE | 35 | #elif (@HAVE_SYS_SELECT_H@ \ |
| 36 | && ((defined __osf__ && defined _SYS_TIME_H_ && defined _OSF_SOURCE) \ | ||
| 37 | || (defined __sun && defined _SYS_TIME_H \ | ||
| 38 | && (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE) \ | ||
| 39 | || defined __EXTENSIONS__))) \ | ||
| 40 | && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H) | ||
| 30 | 41 | ||
| 31 | # define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H | 42 | # define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H |
| 32 | # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ | 43 | # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ |
diff --git a/lib/sys_time.in.h b/lib/sys_time.in.h index 1b7736bee02..656c3f13ad2 100644 --- a/lib/sys_time.in.h +++ b/lib/sys_time.in.h | |||
| @@ -17,37 +17,34 @@ | |||
| 17 | 17 | ||
| 18 | /* Written by Paul Eggert. */ | 18 | /* Written by Paul Eggert. */ |
| 19 | 19 | ||
| 20 | #ifndef _@GUARD_PREFIX@_SYS_TIME_H | ||
| 21 | |||
| 20 | #if __GNUC__ >= 3 | 22 | #if __GNUC__ >= 3 |
| 21 | @PRAGMA_SYSTEM_HEADER@ | 23 | @PRAGMA_SYSTEM_HEADER@ |
| 22 | #endif | 24 | #endif |
| 23 | @PRAGMA_COLUMNS@ | 25 | @PRAGMA_COLUMNS@ |
| 24 | 26 | ||
| 25 | #if defined _@GUARD_PREFIX@_SYS_TIME_H | 27 | /* The include_next requires a split double-inclusion guard. */ |
| 26 | 28 | #if @HAVE_SYS_TIME_H@ | |
| 27 | /* Simply delegate to the system's header, without adding anything. */ | 29 | # @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ |
| 28 | # if @HAVE_SYS_TIME_H@ | 30 | #endif |
| 29 | # @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ | ||
| 30 | # endif | ||
| 31 | |||
| 32 | #else | ||
| 33 | 31 | ||
| 34 | # define _@GUARD_PREFIX@_SYS_TIME_H | 32 | #ifndef _@GUARD_PREFIX@_SYS_TIME_H |
| 33 | #define _@GUARD_PREFIX@_SYS_TIME_H | ||
| 35 | 34 | ||
| 36 | # if @HAVE_SYS_TIME_H@ | 35 | #if ! @HAVE_SYS_TIME_H@ |
| 37 | # @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ | 36 | # include <time.h> |
| 38 | # else | 37 | #endif |
| 39 | # include <time.h> | ||
| 40 | # endif | ||
| 41 | 38 | ||
| 42 | /* On native Windows with MSVC, get the 'struct timeval' type. | 39 | /* On native Windows with MSVC, get the 'struct timeval' type. |
| 43 | Also, on native Windows with a 64-bit time_t, where we are overriding the | 40 | Also, on native Windows with a 64-bit time_t, where we are overriding the |
| 44 | 'struct timeval' type, get all declarations of system functions whose | 41 | 'struct timeval' type, get all declarations of system functions whose |
| 45 | signature contains 'struct timeval'. */ | 42 | signature contains 'struct timeval'. */ |
| 46 | # if (defined _MSC_VER || @REPLACE_STRUCT_TIMEVAL@) && @HAVE_WINSOCK2_H@ && !defined _GL_INCLUDING_WINSOCK2_H | 43 | #if (defined _MSC_VER || @REPLACE_STRUCT_TIMEVAL@) && @HAVE_WINSOCK2_H@ && !defined _GL_INCLUDING_WINSOCK2_H |
| 47 | # define _GL_INCLUDING_WINSOCK2_H | 44 | # define _GL_INCLUDING_WINSOCK2_H |
| 48 | # include <winsock2.h> | 45 | # include <winsock2.h> |
| 49 | # undef _GL_INCLUDING_WINSOCK2_H | 46 | # undef _GL_INCLUDING_WINSOCK2_H |
| 50 | # endif | 47 | #endif |
| 51 | 48 | ||
| 52 | /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ | 49 | /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
| 53 | 50 | ||
| @@ -55,112 +52,112 @@ | |||
| 55 | 52 | ||
| 56 | /* The definition of _GL_WARN_ON_USE is copied here. */ | 53 | /* The definition of _GL_WARN_ON_USE is copied here. */ |
| 57 | 54 | ||
| 58 | # ifdef __cplusplus | 55 | #ifdef __cplusplus |
| 59 | extern "C" { | 56 | extern "C" { |
| 60 | # endif | 57 | #endif |
| 61 | 58 | ||
| 62 | # if !@HAVE_STRUCT_TIMEVAL@ || @REPLACE_STRUCT_TIMEVAL@ | 59 | #if !@HAVE_STRUCT_TIMEVAL@ || @REPLACE_STRUCT_TIMEVAL@ |
| 63 | 60 | ||
| 64 | # if @REPLACE_STRUCT_TIMEVAL@ | 61 | # if @REPLACE_STRUCT_TIMEVAL@ |
| 65 | # define timeval rpl_timeval | 62 | # define timeval rpl_timeval |
| 66 | # endif | 63 | # endif |
| 67 | 64 | ||
| 68 | # if !GNULIB_defined_struct_timeval | 65 | # if !GNULIB_defined_struct_timeval |
| 69 | struct timeval | 66 | struct timeval |
| 70 | { | 67 | { |
| 71 | time_t tv_sec; | 68 | time_t tv_sec; |
| 72 | long int tv_usec; | 69 | long int tv_usec; |
| 73 | }; | 70 | }; |
| 74 | # define GNULIB_defined_struct_timeval 1 | 71 | # define GNULIB_defined_struct_timeval 1 |
| 75 | # endif | ||
| 76 | |||
| 77 | # endif | 72 | # endif |
| 78 | 73 | ||
| 79 | # ifdef __cplusplus | 74 | #endif |
| 75 | |||
| 76 | #ifdef __cplusplus | ||
| 80 | } | 77 | } |
| 81 | # endif | 78 | #endif |
| 82 | 79 | ||
| 83 | # if @GNULIB_GETTIMEOFDAY@ | 80 | #if @GNULIB_GETTIMEOFDAY@ |
| 84 | # if @REPLACE_GETTIMEOFDAY@ | 81 | # if @REPLACE_GETTIMEOFDAY@ |
| 85 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 82 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 86 | # undef gettimeofday | 83 | # undef gettimeofday |
| 87 | # define gettimeofday rpl_gettimeofday | 84 | # define gettimeofday rpl_gettimeofday |
| 88 | # endif | 85 | # endif |
| 89 | _GL_FUNCDECL_RPL (gettimeofday, int, | 86 | _GL_FUNCDECL_RPL (gettimeofday, int, |
| 90 | (struct timeval *restrict, void *restrict) | 87 | (struct timeval *restrict, void *restrict) |
| 91 | _GL_ARG_NONNULL ((1))); | 88 | _GL_ARG_NONNULL ((1))); |
| 92 | _GL_CXXALIAS_RPL (gettimeofday, int, | 89 | _GL_CXXALIAS_RPL (gettimeofday, int, |
| 93 | (struct timeval *restrict, void *restrict)); | 90 | (struct timeval *restrict, void *restrict)); |
| 94 | # else | 91 | # else |
| 95 | # if !@HAVE_GETTIMEOFDAY@ | 92 | # if !@HAVE_GETTIMEOFDAY@ |
| 96 | _GL_FUNCDECL_SYS (gettimeofday, int, | 93 | _GL_FUNCDECL_SYS (gettimeofday, int, |
| 97 | (struct timeval *restrict, void *restrict) | 94 | (struct timeval *restrict, void *restrict) |
| 98 | _GL_ARG_NONNULL ((1))); | 95 | _GL_ARG_NONNULL ((1))); |
| 99 | # endif | 96 | # endif |
| 100 | /* Need to cast, because on glibc systems, by default, the second argument is | 97 | /* Need to cast, because on glibc systems, by default, the second argument is |
| 101 | struct timezone *. */ | 98 | struct timezone *. */ |
| 102 | _GL_CXXALIAS_SYS_CAST (gettimeofday, int, | 99 | _GL_CXXALIAS_SYS_CAST (gettimeofday, int, |
| 103 | (struct timeval *restrict, void *restrict)); | 100 | (struct timeval *restrict, void *restrict)); |
| 104 | # endif | 101 | # endif |
| 105 | _GL_CXXALIASWARN (gettimeofday); | 102 | _GL_CXXALIASWARN (gettimeofday); |
| 106 | # elif defined GNULIB_POSIXCHECK | 103 | #elif defined GNULIB_POSIXCHECK |
| 107 | # undef gettimeofday | 104 | # undef gettimeofday |
| 108 | # if HAVE_RAW_DECL_GETTIMEOFDAY | 105 | # if HAVE_RAW_DECL_GETTIMEOFDAY |
| 109 | _GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - " | 106 | _GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - " |
| 110 | "use gnulib module gettimeofday for portability"); | 107 | "use gnulib module gettimeofday for portability"); |
| 111 | # endif | ||
| 112 | # endif | 108 | # endif |
| 109 | #endif | ||
| 113 | 110 | ||
| 114 | /* Hide some function declarations from <winsock2.h>. */ | 111 | /* Hide some function declarations from <winsock2.h>. */ |
| 115 | 112 | ||
| 116 | # if defined _MSC_VER && @HAVE_WINSOCK2_H@ | 113 | #if defined _MSC_VER && @HAVE_WINSOCK2_H@ |
| 117 | # if !defined _@GUARD_PREFIX@_UNISTD_H | 114 | # if !defined _@GUARD_PREFIX@_UNISTD_H |
| 118 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 115 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 119 | # undef close | 116 | # undef close |
| 120 | # define close close_used_without_including_unistd_h | 117 | # define close close_used_without_including_unistd_h |
| 121 | # else | 118 | # else |
| 122 | _GL_WARN_ON_USE (close, | 119 | _GL_WARN_ON_USE (close, |
| 123 | "close() used without including <unistd.h>"); | 120 | "close() used without including <unistd.h>"); |
| 124 | # endif | 121 | # endif |
| 125 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 122 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 126 | # undef gethostname | 123 | # undef gethostname |
| 127 | # define gethostname gethostname_used_without_including_unistd_h | 124 | # define gethostname gethostname_used_without_including_unistd_h |
| 128 | # else | 125 | # else |
| 129 | _GL_WARN_ON_USE (gethostname, | 126 | _GL_WARN_ON_USE (gethostname, |
| 130 | "gethostname() used without including <unistd.h>"); | 127 | "gethostname() used without including <unistd.h>"); |
| 131 | # endif | ||
| 132 | # endif | 128 | # endif |
| 133 | # if !defined _@GUARD_PREFIX@_SYS_SOCKET_H | 129 | # endif |
| 134 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 130 | # if !defined _@GUARD_PREFIX@_SYS_SOCKET_H |
| 135 | # undef socket | 131 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 136 | # define socket socket_used_without_including_sys_socket_h | 132 | # undef socket |
| 137 | # undef connect | 133 | # define socket socket_used_without_including_sys_socket_h |
| 138 | # define connect connect_used_without_including_sys_socket_h | 134 | # undef connect |
| 139 | # undef accept | 135 | # define connect connect_used_without_including_sys_socket_h |
| 140 | # define accept accept_used_without_including_sys_socket_h | 136 | # undef accept |
| 141 | # undef bind | 137 | # define accept accept_used_without_including_sys_socket_h |
| 142 | # define bind bind_used_without_including_sys_socket_h | 138 | # undef bind |
| 143 | # undef getpeername | 139 | # define bind bind_used_without_including_sys_socket_h |
| 144 | # define getpeername getpeername_used_without_including_sys_socket_h | 140 | # undef getpeername |
| 145 | # undef getsockname | 141 | # define getpeername getpeername_used_without_including_sys_socket_h |
| 146 | # define getsockname getsockname_used_without_including_sys_socket_h | 142 | # undef getsockname |
| 147 | # undef getsockopt | 143 | # define getsockname getsockname_used_without_including_sys_socket_h |
| 148 | # define getsockopt getsockopt_used_without_including_sys_socket_h | 144 | # undef getsockopt |
| 149 | # undef listen | 145 | # define getsockopt getsockopt_used_without_including_sys_socket_h |
| 150 | # define listen listen_used_without_including_sys_socket_h | 146 | # undef listen |
| 151 | # undef recv | 147 | # define listen listen_used_without_including_sys_socket_h |
| 152 | # define recv recv_used_without_including_sys_socket_h | 148 | # undef recv |
| 153 | # undef send | 149 | # define recv recv_used_without_including_sys_socket_h |
| 154 | # define send send_used_without_including_sys_socket_h | 150 | # undef send |
| 155 | # undef recvfrom | 151 | # define send send_used_without_including_sys_socket_h |
| 156 | # define recvfrom recvfrom_used_without_including_sys_socket_h | 152 | # undef recvfrom |
| 157 | # undef sendto | 153 | # define recvfrom recvfrom_used_without_including_sys_socket_h |
| 158 | # define sendto sendto_used_without_including_sys_socket_h | 154 | # undef sendto |
| 159 | # undef setsockopt | 155 | # define sendto sendto_used_without_including_sys_socket_h |
| 160 | # define setsockopt setsockopt_used_without_including_sys_socket_h | 156 | # undef setsockopt |
| 161 | # undef shutdown | 157 | # define setsockopt setsockopt_used_without_including_sys_socket_h |
| 162 | # define shutdown shutdown_used_without_including_sys_socket_h | 158 | # undef shutdown |
| 163 | # else | 159 | # define shutdown shutdown_used_without_including_sys_socket_h |
| 160 | # else | ||
| 164 | _GL_WARN_ON_USE (socket, | 161 | _GL_WARN_ON_USE (socket, |
| 165 | "socket() used without including <sys/socket.h>"); | 162 | "socket() used without including <sys/socket.h>"); |
| 166 | _GL_WARN_ON_USE (connect, | 163 | _GL_WARN_ON_USE (connect, |
| @@ -189,17 +186,18 @@ _GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - " | |||
| 189 | "setsockopt() used without including <sys/socket.h>"); | 186 | "setsockopt() used without including <sys/socket.h>"); |
| 190 | _GL_WARN_ON_USE (shutdown, | 187 | _GL_WARN_ON_USE (shutdown, |
| 191 | "shutdown() used without including <sys/socket.h>"); | 188 | "shutdown() used without including <sys/socket.h>"); |
| 192 | # endif | ||
| 193 | # endif | 189 | # endif |
| 194 | # if !defined _@GUARD_PREFIX@_SYS_SELECT_H | 190 | # endif |
| 195 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 191 | # if !defined _@GUARD_PREFIX@_SYS_SELECT_H |
| 196 | # undef select | 192 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 197 | # define select select_used_without_including_sys_select_h | 193 | # undef select |
| 198 | # else | 194 | # define select select_used_without_including_sys_select_h |
| 195 | # else | ||
| 199 | _GL_WARN_ON_USE (select, | 196 | _GL_WARN_ON_USE (select, |
| 200 | "select() used without including <sys/select.h>"); | 197 | "select() used without including <sys/select.h>"); |
| 201 | # endif | ||
| 202 | # endif | 198 | # endif |
| 203 | # endif | 199 | # endif |
| 200 | #endif | ||
| 204 | 201 | ||
| 205 | #endif /* _@GUARD_PREFIX@_SYS_TIME_H */ | 202 | #endif /* _@GUARD_PREFIX@_SYS_TIME_H */ |
| 203 | #endif /* _@GUARD_PREFIX@_SYS_TIME_H */ | ||
diff --git a/lib/unistd.in.h b/lib/unistd.in.h index a870fe7b4a3..675c7e6a552 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h | |||
| @@ -110,6 +110,7 @@ | |||
| 110 | /* Get getopt(), optarg, optind, opterr, optopt. | 110 | /* Get getopt(), optarg, optind, opterr, optopt. |
| 111 | But avoid namespace pollution on glibc systems. */ | 111 | But avoid namespace pollution on glibc systems. */ |
| 112 | #if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT | 112 | #if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT |
| 113 | # define __need_getopt | ||
| 113 | # include <getopt.h> | 114 | # include <getopt.h> |
| 114 | #endif | 115 | #endif |
| 115 | 116 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3dea3ed0380..5a9af8c42a0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,61 @@ | |||
| 1 | 2013-02-09 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * subr.el (buffer-file-type, default-buffer-file-type): Remove. | ||
| 4 | |||
| 5 | * net/ange-ftp.el (ange-ftp-insert-file-contents): Don't reference | ||
| 6 | buffer-file-type. | ||
| 7 | |||
| 8 | * mail/feedmail.el (feedmail-force-binary-write): Doc fix. | ||
| 9 | (feedmail-run-the-queue, feedmail-dump-message-to-queue) | ||
| 10 | (feedmail-send-it-immediately): Don't bind buffer-file-type, bind | ||
| 11 | coding-system-for-write instead. | ||
| 12 | |||
| 13 | * jka-compr.el (jka-compr-write-region): Don't bind | ||
| 14 | buffer-file-type. | ||
| 15 | |||
| 16 | * emacs-lisp/bytecomp.el (byte-compile-file): Don't bind | ||
| 17 | buffer-file-type. | ||
| 18 | |||
| 19 | * files.el (file-name-buffer-file-type-alist): Remove defvar. | ||
| 20 | (insert-file-contents-literally): Remove reference to | ||
| 21 | file-name-buffer-file-type-alist. | ||
| 22 | |||
| 23 | * dos-w32.el (file-name-buffer-file-type-alist): Deprecate and | ||
| 24 | make-obsolete. | ||
| 25 | (find-buffer-file-type-match, find-buffer-file-type): Remove. | ||
| 26 | (find-buffer-file-type-coding-system): Remove references to | ||
| 27 | find-buffer-file-type-match, find-buffer-file-type, and | ||
| 28 | buffer-file-type. | ||
| 29 | Don't put find-buffer-file-type-coding-system into | ||
| 30 | file-coding-system-alist. | ||
| 31 | (find-file-binary, find-file-text): Bind coding-system-for-read | ||
| 32 | instead of file-name-buffer-file-type-alist. | ||
| 33 | |||
| 34 | 2013-02-09 Tassilo Horn <tsdh@gnu.org> | ||
| 35 | |||
| 36 | * doc-view.el: Use (and prefer) soffice as default ODF->PDF | ||
| 37 | converter (Bug#13622). Patch provided by Jambunathan K | ||
| 38 | <kjambunathan@gmail.com>. | ||
| 39 | (doc-view-unoconv-program): Make obsolete variable. | ||
| 40 | (doc-view-odf->pdf-converter-program): New variable. | ||
| 41 | (doc-view-odf->pdf-converter-function): New variable. | ||
| 42 | (doc-view-mode-p): Use it. | ||
| 43 | (doc-view-odf->pdf-converter-unoconv): Rename from | ||
| 44 | `doc-view-odf->pdf-converter-unoconv'. | ||
| 45 | (doc-view-odf->pdf-converter-soffice): New function. | ||
| 46 | (doc-view-convert-current-doc): Use | ||
| 47 | `doc-view-odf->pdf-converter-function'. | ||
| 48 | |||
| 49 | 2013-02-09 Chong Yidong <cyd@gnu.org> | ||
| 50 | |||
| 51 | * minibuffer.el (minibuffer-inactive-mode-map): Bind mouse-1 to | ||
| 52 | view-echo-area-messages (Bug#13340). | ||
| 53 | |||
| 54 | * help.el (view-echo-area-messages): Use display-buffer. | ||
| 55 | |||
| 56 | * dired-x.el (dired-do-run-mail): Prompt for confirmation | ||
| 57 | (Bug#13561). | ||
| 58 | |||
| 1 | 2013-02-08 Stefan Monnier <monnier@iro.umontreal.ca> | 59 | 2013-02-08 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 60 | ||
| 3 | * emacs-lisp/byte-run.el (eval-when-compile, eval-and-compile): | 61 | * emacs-lisp/byte-run.el (eval-when-compile, eval-and-compile): |
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index 8849fb85244..4fc04b706b5 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el | |||
| @@ -975,11 +975,6 @@ using `make-temp-file', and the generated name is returned." | |||
| 975 | (save-excursion | 975 | (save-excursion |
| 976 | (funcall set-auto-coding-function | 976 | (funcall set-auto-coding-function |
| 977 | filename (- (point-max) (point-min))))) | 977 | filename (- (point-max) (point-min))))) |
| 978 | ;; dos-w32.el defines the function | ||
| 979 | ;; find-buffer-file-type-coding-system for DOS/Windows | ||
| 980 | ;; systems which preserves the coding-system of existing files. | ||
| 981 | ;; (That function is called via file-coding-system-alist.) | ||
| 982 | ;; Here, we want it to act as if the extracted file existed. | ||
| 983 | ;; The following let-binding of file-name-handler-alist forces | 978 | ;; The following let-binding of file-name-handler-alist forces |
| 984 | ;; find-file-not-found-set-buffer-file-coding-system to ignore | 979 | ;; find-file-not-found-set-buffer-file-coding-system to ignore |
| 985 | ;; the file's name (see dos-w32.el). | 980 | ;; the file's name (see dos-w32.el). |
diff --git a/lisp/dired-x.el b/lisp/dired-x.el index a2c13033cd1..3cf6654da2b 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el | |||
| @@ -1344,13 +1344,20 @@ Otherwise obeys the value of `dired-vm-read-only-folders'." | |||
| 1344 | (rmail (dired-get-filename))) | 1344 | (rmail (dired-get-filename))) |
| 1345 | 1345 | ||
| 1346 | (defun dired-do-run-mail () | 1346 | (defun dired-do-run-mail () |
| 1347 | "If `dired-bind-vm' is non-nil, call `dired-vm', else call `dired-rmail'." | 1347 | "Visit the current file as a mailbox, using VM or RMAIL. |
| 1348 | Prompt for confirmation first; if the user says yes, call | ||
| 1349 | `dired-vm' if `dired-bind-vm' is non-nil, `dired-rmail' | ||
| 1350 | otherwise." | ||
| 1348 | (interactive) | 1351 | (interactive) |
| 1349 | (if dired-bind-vm | 1352 | (let ((file (dired-get-filename t))) |
| 1350 | ;; Read mail folder using vm. | 1353 | (if dired-bind-vm |
| 1351 | (dired-vm) | 1354 | (if (y-or-n-p (concat "Visit `" file |
| 1352 | ;; Read mail folder using rmail. | 1355 | "' as a mail folder with VM?")) |
| 1353 | (dired-rmail))) | 1356 | (dired-vm)) |
| 1357 | ;; Read mail folder using rmail. | ||
| 1358 | (if (y-or-n-p (concat "Visit `" file | ||
| 1359 | "' as a mailbox with RMAIL?")) | ||
| 1360 | (dired-rmail))))) | ||
| 1354 | 1361 | ||
| 1355 | 1362 | ||
| 1356 | ;;; MISCELLANEOUS INTERNAL FUNCTIONS. | 1363 | ;;; MISCELLANEOUS INTERNAL FUNCTIONS. |
diff --git a/lisp/dired.el b/lisp/dired.el index 30069488586..b5fc46eb78d 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -4297,7 +4297,7 @@ instead. | |||
| 4297 | ;;;*** | 4297 | ;;;*** |
| 4298 | 4298 | ||
| 4299 | ;;;### (autoloads (dired-do-relsymlink dired-jump-other-window dired-jump) | 4299 | ;;;### (autoloads (dired-do-relsymlink dired-jump-other-window dired-jump) |
| 4300 | ;;;;;; "dired-x" "dired-x.el" "cdaacce7c861256289ba48493dd6d0ec") | 4300 | ;;;;;; "dired-x" "dired-x.el" "90ba5245f6f5df3bdbda6303c725ef45") |
| 4301 | ;;; Generated autoloads from dired-x.el | 4301 | ;;; Generated autoloads from dired-x.el |
| 4302 | 4302 | ||
| 4303 | (autoload 'dired-jump "dired-x" "\ | 4303 | (autoload 'dired-jump "dired-x" "\ |
diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 30aa3a09bf2..e7d1ebc35ff 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el | |||
| @@ -231,14 +231,37 @@ If this and `doc-view-dvipdfm-program' are set, | |||
| 231 | :type 'file | 231 | :type 'file |
| 232 | :group 'doc-view) | 232 | :group 'doc-view) |
| 233 | 233 | ||
| 234 | (defcustom doc-view-unoconv-program "unoconv" | 234 | (define-obsolete-variable-alias 'doc-view-unoconv-program |
| 235 | 'doc-view-odf->pdf-converter-program | ||
| 236 | "24.4") | ||
| 237 | |||
| 238 | (defcustom doc-view-odf->pdf-converter-program | ||
| 239 | (cond | ||
| 240 | ((executable-find "soffice") "soffice") | ||
| 241 | ((executable-find "unoconv") "unoconv") | ||
| 242 | (t "soffice")) | ||
| 235 | "Program to convert any file type readable by OpenOffice.org to PDF. | 243 | "Program to convert any file type readable by OpenOffice.org to PDF. |
| 236 | 244 | ||
| 237 | Needed for viewing OpenOffice.org (and MS Office) files." | 245 | Needed for viewing OpenOffice.org (and MS Office) files." |
| 238 | :version "24.1" | 246 | :version "24.4" |
| 239 | :type 'file | 247 | :type 'file |
| 240 | :group 'doc-view) | 248 | :group 'doc-view) |
| 241 | 249 | ||
| 250 | (defcustom doc-view-odf->pdf-converter-function | ||
| 251 | (cond | ||
| 252 | ((string-match "unoconv\\'" doc-view-odf->pdf-converter-program) | ||
| 253 | #'doc-view-odf->pdf-converter-unoconv) | ||
| 254 | ((string-match "soffice\\'" doc-view-odf->pdf-converter-program) | ||
| 255 | #'doc-view-odf->pdf-converter-soffice)) | ||
| 256 | "Function to call to convert a ODF file into a PDF file." | ||
| 257 | :type '(radio | ||
| 258 | (function-item doc-view-odf->pdf-converter-unoconv | ||
| 259 | :doc "Use unoconv") | ||
| 260 | (function-item doc-view-odf->pdf-converter-soffice | ||
| 261 | :doc "Use LibreOffice") | ||
| 262 | function) | ||
| 263 | :version "24.4") | ||
| 264 | |||
| 242 | (defcustom doc-view-ps2pdf-program "ps2pdf" | 265 | (defcustom doc-view-ps2pdf-program "ps2pdf" |
| 243 | "Program to convert PS files to PDF. | 266 | "Program to convert PS files to PDF. |
| 244 | 267 | ||
| @@ -700,8 +723,8 @@ OpenDocument format)." | |||
| 700 | (and doc-view-ghostscript-program | 723 | (and doc-view-ghostscript-program |
| 701 | (executable-find doc-view-ghostscript-program))) | 724 | (executable-find doc-view-ghostscript-program))) |
| 702 | ((eq type 'odf) | 725 | ((eq type 'odf) |
| 703 | (and doc-view-unoconv-program | 726 | (and doc-view-odf->pdf-converter-program |
| 704 | (executable-find doc-view-unoconv-program) | 727 | (executable-find doc-view-odf->pdf-converter-program) |
| 705 | (doc-view-mode-p 'pdf))) | 728 | (doc-view-mode-p 'pdf))) |
| 706 | ((eq type 'djvu) | 729 | ((eq type 'djvu) |
| 707 | (executable-find "ddjvu")) | 730 | (executable-find "ddjvu")) |
| @@ -903,14 +926,23 @@ If PAGE is nil, convert the whole document." | |||
| 903 | ,@(if page `(,(format "%d" page)))) | 926 | ,@(if page `(,(format "%d" page)))) |
| 904 | callback)) | 927 | callback)) |
| 905 | 928 | ||
| 906 | (defun doc-view-odf->pdf (odf callback) | 929 | (defun doc-view-odf->pdf-converter-unoconv (odf callback) |
| 907 | "Convert ODF to PDF asynchronously and call CALLBACK when finished. | 930 | "Convert ODF to PDF asynchronously and call CALLBACK when finished. |
| 908 | The converted PDF is put into the current cache directory, and it | 931 | The converted PDF is put into the current cache directory, and it |
| 909 | is named like ODF with the extension turned to pdf." | 932 | is named like ODF with the extension turned to pdf." |
| 910 | (doc-view-start-process "odf->pdf" doc-view-unoconv-program | 933 | (doc-view-start-process "odf->pdf" doc-view-odf->pdf-converter-program |
| 911 | (list "-f" "pdf" "-o" (doc-view-current-cache-dir) odf) | 934 | (list "-f" "pdf" "-o" (doc-view-current-cache-dir) odf) |
| 912 | callback)) | 935 | callback)) |
| 913 | 936 | ||
| 937 | (defun doc-view-odf->pdf-converter-soffice (odf callback) | ||
| 938 | "Convert ODF to PDF asynchronously and call CALLBACK when finished. | ||
| 939 | The converted PDF is put into the current cache directory, and it | ||
| 940 | is named like ODF with the extension turned to pdf." | ||
| 941 | (doc-view-start-process "odf->pdf" doc-view-odf->pdf-converter-program | ||
| 942 | (list "--headless" "--convert-to" "pdf" | ||
| 943 | "--outdir" (doc-view-current-cache-dir) odf) | ||
| 944 | callback)) | ||
| 945 | |||
| 914 | (defun doc-view-pdf/ps->png (pdf-ps png) | 946 | (defun doc-view-pdf/ps->png (pdf-ps png) |
| 915 | ;; FIXME: Fix name and docstring to account for djvu&tiff. | 947 | ;; FIXME: Fix name and docstring to account for djvu&tiff. |
| 916 | "Convert PDF-PS to PNG asynchronously." | 948 | "Convert PDF-PS to PNG asynchronously." |
| @@ -1058,7 +1090,7 @@ Those files are saved in the directory given by the function | |||
| 1058 | ;; The unoconv tool only supports an output directory, but no | 1090 | ;; The unoconv tool only supports an output directory, but no |
| 1059 | ;; file name. It's named like the input file with the | 1091 | ;; file name. It's named like the input file with the |
| 1060 | ;; extension replaced by pdf. | 1092 | ;; extension replaced by pdf. |
| 1061 | (doc-view-odf->pdf doc-view-buffer-file-name | 1093 | (funcall doc-view-odf->pdf-converter-function doc-view-buffer-file-name |
| 1062 | (lambda () | 1094 | (lambda () |
| 1063 | ;; Rename to doc.pdf | 1095 | ;; Rename to doc.pdf |
| 1064 | (rename-file opdf pdf) | 1096 | (rename-file opdf pdf) |
diff --git a/lisp/dos-w32.el b/lisp/dos-w32.el index 5866edfc3d6..d6788ffe028 100644 --- a/lisp/dos-w32.el +++ b/lisp/dos-w32.el | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | ;; Set the null device (for compile.el). | 37 | ;; Set the null device (for compile.el). |
| 38 | (setq null-device "NUL") | 38 | (setq null-device "NUL") |
| 39 | 39 | ||
| 40 | ;; For distinguishing file types based upon suffixes. | 40 | ;; For distinguishing file types based upon suffixes. DEPRECATED, DO NOT USE! |
| 41 | (defcustom file-name-buffer-file-type-alist | 41 | (defcustom file-name-buffer-file-type-alist |
| 42 | '(("[:/].*config.sys$" . nil) ; config.sys text | 42 | '(("[:/].*config.sys$" . nil) ; config.sys text |
| 43 | ("\\.\\(obj\\|exe\\|com\\|lib\\|sys\\|bin\\|ico\\|pif\\|class\\)$" . t) | 43 | ("\\.\\(obj\\|exe\\|com\\|lib\\|sys\\|bin\\|ico\\|pif\\|class\\)$" . t) |
| @@ -54,36 +54,18 @@ | |||
| 54 | ("\\.tp[ulpw]$" . t) ; borland Pascal stuff | 54 | ("\\.tp[ulpw]$" . t) ; borland Pascal stuff |
| 55 | ("[:/]tags$" . nil) ; emacs TAGS file | 55 | ("[:/]tags$" . nil) ; emacs TAGS file |
| 56 | ) | 56 | ) |
| 57 | "Alist for distinguishing text files from binary files. | 57 | "Alist used in the past for distinguishing text files from binary files. |
| 58 | Each element has the form (REGEXP . TYPE), where REGEXP is matched | 58 | Each element has the form (REGEXP . TYPE), where REGEXP is matched |
| 59 | against the file name, and TYPE is nil for text, t for binary." | 59 | against the file name, and TYPE is nil for text, t for binary. |
| 60 | |||
| 61 | This variable is deprecated, not used anywhere, and will soon be deleted." | ||
| 60 | :type '(repeat (cons regexp boolean)) | 62 | :type '(repeat (cons regexp boolean)) |
| 61 | :group 'dos-fns | 63 | :group 'dos-fns |
| 62 | :group 'w32) | 64 | :group 'w32) |
| 63 | 65 | ||
| 64 | ;; Return the pair matching filename on file-name-buffer-file-type-alist, | 66 | (make-obsolete-variable 'file-name-buffer-file-type-alist |
| 65 | ;; or nil otherwise. | 67 | 'file-coding-system-alist |
| 66 | (defun find-buffer-file-type-match (filename) | 68 | "24.4") |
| 67 | (let ((alist file-name-buffer-file-type-alist) | ||
| 68 | (found nil)) | ||
| 69 | (let ((case-fold-search t)) | ||
| 70 | (setq filename (file-name-sans-versions filename)) | ||
| 71 | (while (and (not found) alist) | ||
| 72 | (if (string-match (car (car alist)) filename) | ||
| 73 | (setq found (car alist))) | ||
| 74 | (setq alist (cdr alist))) | ||
| 75 | found))) | ||
| 76 | |||
| 77 | ;; Don't check for untranslated file systems here. | ||
| 78 | (defun find-buffer-file-type (filename) | ||
| 79 | (let ((match (find-buffer-file-type-match filename)) | ||
| 80 | (code)) | ||
| 81 | (if (not match) | ||
| 82 | (default-value 'buffer-file-type) | ||
| 83 | (setq code (cdr match)) | ||
| 84 | (cond ((memq code '(nil t)) code) | ||
| 85 | ((and (symbolp code) (fboundp code)) | ||
| 86 | (funcall code filename)))))) | ||
| 87 | 69 | ||
| 88 | (setq-default buffer-file-coding-system 'undecided-dos) | 70 | (setq-default buffer-file-coding-system 'undecided-dos) |
| 89 | 71 | ||
| @@ -99,9 +81,6 @@ and whether the file exists: | |||
| 99 | If it matches in `untranslated-filesystem-list': | 81 | If it matches in `untranslated-filesystem-list': |
| 100 | If the file exists: `undecided' | 82 | If the file exists: `undecided' |
| 101 | If the file does not exist: `undecided-unix' | 83 | If the file does not exist: `undecided-unix' |
| 102 | If it matches in `file-name-buffer-file-type-alist': | ||
| 103 | If the match is t (for binary): `no-conversion' | ||
| 104 | If the match is nil (for dos-text): `undecided-dos' | ||
| 105 | Otherwise: | 84 | Otherwise: |
| 106 | If the file exists: `undecided' | 85 | If the file exists: `undecided' |
| 107 | If the file does not exist default value of `buffer-file-coding-system' | 86 | If the file does not exist default value of `buffer-file-coding-system' |
| @@ -110,25 +89,23 @@ Note that the CAR of arguments to `insert-file-contents' operation could | |||
| 110 | be a cons cell of the form \(FILENAME . BUFFER\), where BUFFER is a buffer | 89 | be a cons cell of the form \(FILENAME . BUFFER\), where BUFFER is a buffer |
| 111 | into which the file's contents were already read, but not yet decoded. | 90 | into which the file's contents were already read, but not yet decoded. |
| 112 | 91 | ||
| 113 | If operation is `write-region', the coding system is chosen based upon | 92 | If operation is `write-region', the coding system is chosen based |
| 114 | the value of `buffer-file-coding-system' and `buffer-file-type'. If | 93 | upon the value of `buffer-file-coding-system'. If |
| 115 | `buffer-file-coding-system' is non-nil, its value is used. If it is | 94 | `buffer-file-coding-system' is non-nil, its value is used. |
| 116 | nil and `buffer-file-type' is t, the coding system is `no-conversion'. | ||
| 117 | Otherwise, it is `undecided-dos'. | 95 | Otherwise, it is `undecided-dos'. |
| 118 | 96 | ||
| 119 | The two most common situations are when DOS and Unix files are read | 97 | The most common situation is when DOS and Unix files are read and |
| 120 | and written, and their names do not match in | 98 | written, and their names do not match in `untranslated-filesystem-list'. |
| 121 | `untranslated-filesystem-list' and `file-name-buffer-file-type-alist'. | 99 | In these cases, the coding system initially will be `undecided'. |
| 122 | In these cases, the coding system initially will be `undecided'. As | 100 | As the file is read in the DOS case, the coding system will be |
| 123 | the file is read in the DOS case, the coding system will be changed to | 101 | changed to `undecided-dos' as CR/LFs are detected. As the file |
| 124 | `undecided-dos' as CR/LFs are detected. As the file is read in the | 102 | is read in the Unix case, the coding system will be changed to |
| 125 | Unix case, the coding system will be changed to `undecided-unix' as | 103 | `undecided-unix' as LFs are detected. In both cases, |
| 126 | LFs are detected. In both cases, `buffer-file-coding-system' will be | 104 | `buffer-file-coding-system' will be set to the appropriate coding |
| 127 | set to the appropriate coding system, and the value of | 105 | system, and the value of `buffer-file-coding-system' will be used |
| 128 | `buffer-file-coding-system' will be used when writing the file." | 106 | when writing the file." |
| 129 | 107 | ||
| 130 | (let ((op (nth 0 command)) | 108 | (let ((op (nth 0 command)) |
| 131 | (binary nil) (text nil) | ||
| 132 | (undecided nil) (undecided-unix nil) | 109 | (undecided nil) (undecided-unix nil) |
| 133 | target target-buf) | 110 | target target-buf) |
| 134 | (cond ((eq op 'insert-file-contents) | 111 | (cond ((eq op 'insert-file-contents) |
| @@ -144,15 +121,8 @@ set to the appropriate coding system, and the value of | |||
| 144 | (and (bufferp (cdr target)) | 121 | (and (bufferp (cdr target)) |
| 145 | (buffer-name (cdr target)))) | 122 | (buffer-name (cdr target)))) |
| 146 | (setq target (car target))) | 123 | (setq target (car target))) |
| 147 | ;; First check for a file name that indicates | 124 | (cond ((or |
| 148 | ;; it is truly binary. | 125 | ;; For any existing file, decide based on contents. |
| 149 | (setq binary (find-buffer-file-type target)) | ||
| 150 | (cond (binary) | ||
| 151 | ;; Next check for files that MUST use DOS eol conversion. | ||
| 152 | ((find-buffer-file-type-match target) | ||
| 153 | (setq text t)) | ||
| 154 | ;; For any other existing file, decide based on contents. | ||
| 155 | ((or | ||
| 156 | (file-exists-p target) | 126 | (file-exists-p target) |
| 157 | ;; If TARGET does not exist as a file, replace its | 127 | ;; If TARGET does not exist as a file, replace its |
| 158 | ;; base name with TARGET-BUF and try again. This | 128 | ;; base name with TARGET-BUF and try again. This |
| @@ -167,9 +137,7 @@ set to the appropriate coding system, and the value of | |||
| 167 | ;; Next check for a non-DOS file system. | 137 | ;; Next check for a non-DOS file system. |
| 168 | ((untranslated-file-p target) | 138 | ((untranslated-file-p target) |
| 169 | (setq undecided-unix t))) | 139 | (setq undecided-unix t))) |
| 170 | (cond (binary '(no-conversion . no-conversion)) | 140 | (cond (undecided-unix '(undecided-unix . undecided-unix)) |
| 171 | (text '(undecided-dos . undecided-dos)) | ||
| 172 | (undecided-unix '(undecided-unix . undecided-unix)) | ||
| 173 | (undecided '(undecided . undecided)) | 141 | (undecided '(undecided . undecided)) |
| 174 | (t (cons (default-value 'buffer-file-coding-system) | 142 | (t (cons (default-value 'buffer-file-coding-system) |
| 175 | (default-value 'buffer-file-coding-system))))) | 143 | (default-value 'buffer-file-coding-system))))) |
| @@ -180,22 +148,18 @@ set to the appropriate coding system, and the value of | |||
| 180 | ;; Normally this is used only in a non-file-visiting | 148 | ;; Normally this is used only in a non-file-visiting |
| 181 | ;; buffer, because normally buffer-file-coding-system is non-nil | 149 | ;; buffer, because normally buffer-file-coding-system is non-nil |
| 182 | ;; in a file-visiting buffer. | 150 | ;; in a file-visiting buffer. |
| 183 | (if buffer-file-type | 151 | '(undecided-dos . undecided-dos)))))) |
| 184 | '(no-conversion . no-conversion) | ||
| 185 | '(undecided-dos . undecided-dos))))))) | ||
| 186 | |||
| 187 | (modify-coding-system-alist 'file "" 'find-buffer-file-type-coding-system) | ||
| 188 | 152 | ||
| 189 | (defun find-file-binary (filename) | 153 | (defun find-file-binary (filename) |
| 190 | "Visit file FILENAME and treat it as binary." | 154 | "Visit file FILENAME and treat it as binary." |
| 191 | (interactive "FFind file binary: ") | 155 | (interactive "FFind file binary: ") |
| 192 | (let ((file-name-buffer-file-type-alist '(("" . t)))) | 156 | (let ((coding-system-for-read 'no-conversion)) |
| 193 | (find-file filename))) | 157 | (find-file filename))) |
| 194 | 158 | ||
| 195 | (defun find-file-text (filename) | 159 | (defun find-file-text (filename) |
| 196 | "Visit file FILENAME and treat it as a text file." | 160 | "Visit file FILENAME and treat it as a text file." |
| 197 | (interactive "FFind file text: ") | 161 | (interactive "FFind file text: ") |
| 198 | (let ((file-name-buffer-file-type-alist '(("" . nil)))) | 162 | (let ((coding-system-for-read 'undecided-dos)) |
| 199 | (find-file filename))) | 163 | (find-file filename))) |
| 200 | 164 | ||
| 201 | (defun find-file-not-found-set-buffer-file-coding-system () | 165 | (defun find-file-not-found-set-buffer-file-coding-system () |
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 4e002cfc8cb..280a1bbc2dd 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -1795,8 +1795,6 @@ The value is non-nil if there were no errors, nil if errors." | |||
| 1795 | (kill-emacs-hook | 1795 | (kill-emacs-hook |
| 1796 | (cons (lambda () (ignore-errors (delete-file tempfile))) | 1796 | (cons (lambda () (ignore-errors (delete-file tempfile))) |
| 1797 | kill-emacs-hook))) | 1797 | kill-emacs-hook))) |
| 1798 | (if (memq system-type '(ms-dos 'windows-nt)) | ||
| 1799 | (setq buffer-file-type t)) | ||
| 1800 | (write-region (point-min) (point-max) tempfile nil 1) | 1798 | (write-region (point-min) (point-max) tempfile nil 1) |
| 1801 | ;; This has the intentional side effect that any | 1799 | ;; This has the intentional side effect that any |
| 1802 | ;; hard-links to target-file continue to | 1800 | ;; hard-links to target-file continue to |
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index bbe551c735d..cc7624dee03 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2013-02-09 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * erc-dcc.el (erc-dcc-get-file): Don't reference buffer-file-type. | ||
| 4 | |||
| 1 | 2013-01-11 Dmitry Antipov <dmantipov@yandex.ru> | 5 | 2013-01-11 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 6 | ||
| 3 | * erc-dcc.el (erc-dcc-send-file): Use point-min-marker. | 7 | * erc-dcc.el (erc-dcc-send-file): Use point-min-marker. |
diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el index c27bb629f9d..acb8febea80 100644 --- a/lisp/erc/erc-dcc.el +++ b/lisp/erc/erc-dcc.el | |||
| @@ -942,7 +942,6 @@ filter and a process sentinel, and making the connection." | |||
| 942 | (set-buffer-multibyte nil)) | 942 | (set-buffer-multibyte nil)) |
| 943 | 943 | ||
| 944 | (setq mode-line-process '(":%s") | 944 | (setq mode-line-process '(":%s") |
| 945 | buffer-file-type t | ||
| 946 | buffer-read-only t) | 945 | buffer-read-only t) |
| 947 | (setq erc-dcc-file-name file) | 946 | (setq erc-dcc-file-name file) |
| 948 | 947 | ||
diff --git a/lisp/files.el b/lisp/files.el index 3bc3059c68f..9fca70d36f7 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -1983,8 +1983,6 @@ Do you want to revisit the file normally now? ") | |||
| 1983 | (after-find-file error (not nowarn))) | 1983 | (after-find-file error (not nowarn))) |
| 1984 | (current-buffer)))) | 1984 | (current-buffer)))) |
| 1985 | 1985 | ||
| 1986 | (defvar file-name-buffer-file-type-alist) ;From dos-w32.el. | ||
| 1987 | |||
| 1988 | (defun insert-file-contents-literally (filename &optional visit beg end replace) | 1986 | (defun insert-file-contents-literally (filename &optional visit beg end replace) |
| 1989 | "Like `insert-file-contents', but only reads in the file literally. | 1987 | "Like `insert-file-contents', but only reads in the file literally. |
| 1990 | A buffer may be modified in several ways after reading into the buffer, | 1988 | A buffer may be modified in several ways after reading into the buffer, |
| @@ -1996,7 +1994,6 @@ This function ensures that none of these modifications will take place." | |||
| 1996 | (after-insert-file-functions nil) | 1994 | (after-insert-file-functions nil) |
| 1997 | (coding-system-for-read 'no-conversion) | 1995 | (coding-system-for-read 'no-conversion) |
| 1998 | (coding-system-for-write 'no-conversion) | 1996 | (coding-system-for-write 'no-conversion) |
| 1999 | (file-name-buffer-file-type-alist '(("" . t))) | ||
| 2000 | (inhibit-file-name-handlers | 1997 | (inhibit-file-name-handlers |
| 2001 | ;; FIXME: Yuck!! We should turn insert-file-contents-literally | 1998 | ;; FIXME: Yuck!! We should turn insert-file-contents-literally |
| 2002 | ;; into a file operation instead! | 1999 | ;; into a file operation instead! |
diff --git a/lisp/help.el b/lisp/help.el index 4219dd86986..25bc9c4b7c6 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -412,7 +412,9 @@ With argument, display info only for the selected version." | |||
| 412 | The number of messages retained in that buffer | 412 | The number of messages retained in that buffer |
| 413 | is specified by the variable `message-log-max'." | 413 | is specified by the variable `message-log-max'." |
| 414 | (interactive) | 414 | (interactive) |
| 415 | (switch-to-buffer (get-buffer-create "*Messages*"))) | 415 | (with-current-buffer (get-buffer-create "*Messages*") |
| 416 | (goto-char (point-max)) | ||
| 417 | (display-buffer (current-buffer)))) | ||
| 416 | 418 | ||
| 417 | (defun view-order-manuals () | 419 | (defun view-order-manuals () |
| 418 | "Display the Emacs ORDERS file." | 420 | "Display the Emacs ORDERS file." |
diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el index ac81cf0d52d..5664a890cb1 100644 --- a/lisp/jka-compr.el +++ b/lisp/jka-compr.el | |||
| @@ -332,8 +332,6 @@ There should be no more than seven characters after the final `/'." | |||
| 332 | 332 | ||
| 333 | (with-current-buffer temp-buffer | 333 | (with-current-buffer temp-buffer |
| 334 | (let ((coding-system-for-write 'no-conversion)) | 334 | (let ((coding-system-for-write 'no-conversion)) |
| 335 | (if (memq system-type '(ms-dos windows-nt)) | ||
| 336 | (setq buffer-file-type t) ) | ||
| 337 | (jka-compr-run-real-handler 'write-region | 335 | (jka-compr-run-real-handler 'write-region |
| 338 | (list (point-min) (point-max) | 336 | (list (point-min) (point-max) |
| 339 | filename | 337 | filename |
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el index 4305094611a..0502e7f9487 100644 --- a/lisp/mail/feedmail.el +++ b/lisp/mail/feedmail.el | |||
| @@ -590,7 +590,7 @@ header is fiddled after the From: header is fiddled." | |||
| 590 | (defcustom feedmail-force-binary-write t | 590 | (defcustom feedmail-force-binary-write t |
| 591 | "If non-nil, force writing file as binary (this applies to queues and Fcc:). | 591 | "If non-nil, force writing file as binary (this applies to queues and Fcc:). |
| 592 | On systems where there is a difference between binary and text files, | 592 | On systems where there is a difference between binary and text files, |
| 593 | feedmail will temporarily manipulate the value of `buffer-file-type' | 593 | feedmail will temporarily manipulate the value of `coding-system-for-write' |
| 594 | to make the writing as binary. If nil, writing will be in text mode. | 594 | to make the writing as binary. If nil, writing will be in text mode. |
| 595 | On systems where there is no distinction or where it is controlled by other | 595 | On systems where there is no distinction or where it is controlled by other |
| 596 | variables or other means, this option has no effect." | 596 | variables or other means, this option has no effect." |
| @@ -2016,7 +2016,6 @@ backup file names and the like)." | |||
| 2016 | (setq buffer-offer-save nil) | 2016 | (setq buffer-offer-save nil) |
| 2017 | (buffer-disable-undo blobby-buffer) | 2017 | (buffer-disable-undo blobby-buffer) |
| 2018 | (insert-file-contents-literally maybe-file) | 2018 | (insert-file-contents-literally maybe-file) |
| 2019 | (setq buffer-file-type t) ; binary | ||
| 2020 | (goto-char (point-min)) | 2019 | (goto-char (point-min)) |
| 2021 | ;; if at least two line-endings with CRLF, translate the file | 2020 | ;; if at least two line-endings with CRLF, translate the file |
| 2022 | (if (looking-at ".*\r\n.*\r\n") | 2021 | (if (looking-at ".*\r\n.*\r\n") |
| @@ -2334,7 +2333,10 @@ mapped to mostly alphanumerics for safety." | |||
| 2334 | (setq filename buffer-file-name) | 2333 | (setq filename buffer-file-name) |
| 2335 | (setq filename (feedmail-create-queue-filename queue-directory))) | 2334 | (setq filename (feedmail-create-queue-filename queue-directory))) |
| 2336 | ;; make binary file on DOS/Windows 95/Windows NT, etc | 2335 | ;; make binary file on DOS/Windows 95/Windows NT, etc |
| 2337 | (let ((buffer-file-type feedmail-force-binary-write)) | 2336 | (let ((coding-system-for-write |
| 2337 | (if feedmail-force-binary-write | ||
| 2338 | 'no-conversion | ||
| 2339 | coding-system-for-write))) | ||
| 2338 | (write-file filename)) | 2340 | (write-file filename)) |
| 2339 | ;; convenient for moving from draft to q, for example | 2341 | ;; convenient for moving from draft to q, for example |
| 2340 | (if (and previous-buffer-file-name (or (not is-fqm) (not is-in-this-dir)) | 2342 | (if (and previous-buffer-file-name (or (not is-fqm) (not is-in-this-dir)) |
| @@ -2571,26 +2573,27 @@ mapped to mostly alphanumerics for safety." | |||
| 2571 | ;; Re-insert and handle any Fcc fields (and, optionally, | 2573 | ;; Re-insert and handle any Fcc fields (and, optionally, |
| 2572 | ;; any Bcc). | 2574 | ;; any Bcc). |
| 2573 | (when fcc | 2575 | (when fcc |
| 2574 | (let ((old (default-value 'buffer-file-type))) | 2576 | (let ((coding-system-for-write |
| 2577 | (if (and (memq system-type '(ms-dos windows-nt)) | ||
| 2578 | feedmail-force-binary-write) | ||
| 2579 | 'no-conversion | ||
| 2580 | coding-system-for-write))) | ||
| 2575 | (unwind-protect | 2581 | (unwind-protect |
| 2576 | (progn | 2582 | (progn |
| 2577 | (setq-default buffer-file-type | ||
| 2578 | feedmail-force-binary-write) | ||
| 2579 | (insert fcc) | 2583 | (insert fcc) |
| 2580 | (unless feedmail-nuke-bcc-in-fcc | 2584 | (unless feedmail-nuke-bcc-in-fcc |
| 2581 | (if bcc-holder (insert bcc-holder)) | 2585 | (if bcc-holder (insert bcc-holder)) |
| 2582 | (if resent-bcc-holder | 2586 | (if resent-bcc-holder |
| 2583 | (insert resent-bcc-holder))) | 2587 | (insert resent-bcc-holder))) |
| 2584 | 2588 | ||
| 2585 | (run-hooks 'feedmail-before-fcc-hook) | 2589 | (run-hooks 'feedmail-before-fcc-hook) |
| 2586 | 2590 | ||
| 2587 | (when feedmail-nuke-body-in-fcc | 2591 | (when feedmail-nuke-body-in-fcc |
| 2588 | (goto-char eoh-marker) | 2592 | (goto-char eoh-marker) |
| 2589 | (if (natnump feedmail-nuke-body-in-fcc) | 2593 | (if (natnump feedmail-nuke-body-in-fcc) |
| 2590 | (forward-line feedmail-nuke-body-in-fcc)) | 2594 | (forward-line feedmail-nuke-body-in-fcc)) |
| 2591 | (delete-region (point) (point-max))) | 2595 | (delete-region (point) (point-max))) |
| 2592 | (mail-do-fcc eoh-marker)) | 2596 | (mail-do-fcc eoh-marker)))))) |
| 2593 | (setq-default buffer-file-type old))))) | ||
| 2594 | ;; User bailed out of one-last-look. | 2597 | ;; User bailed out of one-last-look. |
| 2595 | (if feedmail-queue-runner-is-active | 2598 | (if feedmail-queue-runner-is-active |
| 2596 | (throw 'skip-me-q 'skip-me-q) | 2599 | (throw 'skip-me-q 'skip-me-q) |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 0d2815e535e..e18f4c9c77f 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -2045,10 +2045,7 @@ with `minibuffer-local-must-match-map'.") | |||
| 2045 | (define-key map "i" 'info) | 2045 | (define-key map "i" 'info) |
| 2046 | (define-key map "m" 'mail) | 2046 | (define-key map "m" 'mail) |
| 2047 | (define-key map "n" 'make-frame) | 2047 | (define-key map "n" 'make-frame) |
| 2048 | (define-key map [mouse-1] (lambda () (interactive) | 2048 | (define-key map [mouse-1] 'view-echo-area-messages) |
| 2049 | (with-current-buffer "*Messages*" | ||
| 2050 | (goto-char (point-max)) | ||
| 2051 | (display-buffer (current-buffer))))) | ||
| 2052 | ;; So the global down-mouse-1 binding doesn't clutter the execution of the | 2049 | ;; So the global down-mouse-1 binding doesn't clutter the execution of the |
| 2053 | ;; above mouse-1 binding. | 2050 | ;; above mouse-1 binding. |
| 2054 | (define-key map [down-mouse-1] #'ignore) | 2051 | (define-key map [down-mouse-1] #'ignore) |
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 4f7d8092891..ea318ec3250 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el | |||
| @@ -3297,7 +3297,6 @@ system TYPE.") | |||
| 3297 | (name (ange-ftp-quote-string (nth 2 parsed))) | 3297 | (name (ange-ftp-quote-string (nth 2 parsed))) |
| 3298 | (temp (ange-ftp-make-tmp-name host)) | 3298 | (temp (ange-ftp-make-tmp-name host)) |
| 3299 | (binary (ange-ftp-binary-file filename)) | 3299 | (binary (ange-ftp-binary-file filename)) |
| 3300 | (buffer-file-type buffer-file-type) | ||
| 3301 | (abbr (ange-ftp-abbreviate-filename filename)) | 3300 | (abbr (ange-ftp-abbreviate-filename filename)) |
| 3302 | (coding-system-used last-coding-system-used) | 3301 | (coding-system-used last-coding-system-used) |
| 3303 | size) | 3302 | size) |
| @@ -3322,10 +3321,7 @@ system TYPE.") | |||
| 3322 | size | 3321 | size |
| 3323 | (nth 1 (ange-ftp-real-insert-file-contents | 3322 | (nth 1 (ange-ftp-real-insert-file-contents |
| 3324 | temp visit beg end replace)) | 3323 | temp visit beg end replace)) |
| 3325 | coding-system-used last-coding-system-used | 3324 | coding-system-used last-coding-system-used) |
| 3326 | ;; override autodetection of buffer file type | ||
| 3327 | ;; to ensure buffer is saved in DOS format | ||
| 3328 | buffer-file-type binary) | ||
| 3329 | (signal 'ftp-error | 3325 | (signal 'ftp-error |
| 3330 | (list | 3326 | (list |
| 3331 | "Opening input file:" | 3327 | "Opening input file:" |
diff --git a/lisp/subr.el b/lisp/subr.el index 31cbb9a0a8a..db2b6a8eaad 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1229,7 +1229,6 @@ is converted into a string by expressing it in decimal." | |||
| 1229 | (make-obsolete-variable 'default-scroll-down-aggressively 'scroll-down-aggressively "23.2") | 1229 | (make-obsolete-variable 'default-scroll-down-aggressively 'scroll-down-aggressively "23.2") |
| 1230 | (make-obsolete-variable 'default-fill-column 'fill-column "23.2") | 1230 | (make-obsolete-variable 'default-fill-column 'fill-column "23.2") |
| 1231 | (make-obsolete-variable 'default-cursor-type 'cursor-type "23.2") | 1231 | (make-obsolete-variable 'default-cursor-type 'cursor-type "23.2") |
| 1232 | (make-obsolete-variable 'default-buffer-file-type 'buffer-file-type "23.2") | ||
| 1233 | (make-obsolete-variable 'default-cursor-in-non-selected-windows 'cursor-in-non-selected-windows "23.2") | 1232 | (make-obsolete-variable 'default-cursor-in-non-selected-windows 'cursor-in-non-selected-windows "23.2") |
| 1234 | (make-obsolete-variable 'default-buffer-file-coding-system 'buffer-file-coding-system "23.2") | 1233 | (make-obsolete-variable 'default-buffer-file-coding-system 'buffer-file-coding-system "23.2") |
| 1235 | (make-obsolete-variable 'default-major-mode 'major-mode "23.2") | 1234 | (make-obsolete-variable 'default-major-mode 'major-mode "23.2") |
| @@ -2622,15 +2621,6 @@ When the hook runs, the temporary buffer is current. | |||
| 2622 | This hook is normally set up with a function to put the buffer in Help | 2621 | This hook is normally set up with a function to put the buffer in Help |
| 2623 | mode.") | 2622 | mode.") |
| 2624 | 2623 | ||
| 2625 | (defvar-local buffer-file-type nil | ||
| 2626 | "Non-nil if the visited file is a binary file. | ||
| 2627 | This variable is meaningful on MS-DOG and MS-Windows. | ||
| 2628 | On those systems, it is automatically local in every buffer. | ||
| 2629 | On other systems, this variable is normally always nil. | ||
| 2630 | |||
| 2631 | WARNING: This variable is obsolete and will disappear Real Soon Now. | ||
| 2632 | Don't use it!") | ||
| 2633 | |||
| 2634 | ;; The `assert' macro from the cl package signals | 2624 | ;; The `assert' macro from the cl package signals |
| 2635 | ;; `cl-assertion-failed' at runtime so always define it. | 2625 | ;; `cl-assertion-failed' at runtime so always define it. |
| 2636 | (put 'cl-assertion-failed 'error-conditions '(error)) | 2626 | (put 'cl-assertion-failed 'error-conditions '(error)) |
diff --git a/m4/extensions.m4 b/m4/extensions.m4 index 617323b244c..07ba376c0e7 100644 --- a/m4/extensions.m4 +++ b/m4/extensions.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # serial 12 -*- Autoconf -*- | 1 | # serial 13 -*- Autoconf -*- |
| 2 | # Enable extensions on systems that normally disable them. | 2 | # Enable extensions on systems that normally disable them. |
| 3 | 3 | ||
| 4 | # Copyright (C) 2003, 2006-2013 Free Software Foundation, Inc. | 4 | # Copyright (C) 2003, 2006-2013 Free Software Foundation, Inc. |
| @@ -8,7 +8,7 @@ | |||
| 8 | 8 | ||
| 9 | # This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS | 9 | # This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS |
| 10 | # Autoconf. Perhaps we can remove this once we can assume Autoconf | 10 | # Autoconf. Perhaps we can remove this once we can assume Autoconf |
| 11 | # 2.62 or later everywhere, but since CVS Autoconf mutates rapidly | 11 | # 2.70 or later everywhere, but since Autoconf mutates rapidly |
| 12 | # enough in this area it's likely we'll need to redefine | 12 | # enough in this area it's likely we'll need to redefine |
| 13 | # AC_USE_SYSTEM_EXTENSIONS for quite some time. | 13 | # AC_USE_SYSTEM_EXTENSIONS for quite some time. |
| 14 | 14 | ||
| @@ -30,6 +30,7 @@ | |||
| 30 | # ------------------------ | 30 | # ------------------------ |
| 31 | # Enable extensions on systems that normally disable them, | 31 | # Enable extensions on systems that normally disable them, |
| 32 | # typically due to standards-conformance issues. | 32 | # typically due to standards-conformance issues. |
| 33 | # | ||
| 33 | # Remember that #undef in AH_VERBATIM gets replaced with #define by | 34 | # Remember that #undef in AH_VERBATIM gets replaced with #define by |
| 34 | # AC_DEFINE. The goal here is to define all known feature-enabling | 35 | # AC_DEFINE. The goal here is to define all known feature-enabling |
| 35 | # macros, then, if reports of conflicts are made, disable macros that | 36 | # macros, then, if reports of conflicts are made, disable macros that |
| @@ -38,8 +39,6 @@ AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS], | |||
| 38 | [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl | 39 | [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl |
| 39 | AC_BEFORE([$0], [AC_RUN_IFELSE])dnl | 40 | AC_BEFORE([$0], [AC_RUN_IFELSE])dnl |
| 40 | 41 | ||
| 41 | AC_REQUIRE([AC_CANONICAL_HOST]) | ||
| 42 | |||
| 43 | AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) | 42 | AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) |
| 44 | if test "$MINIX" = yes; then | 43 | if test "$MINIX" = yes; then |
| 45 | AC_DEFINE([_POSIX_SOURCE], [1], | 44 | AC_DEFINE([_POSIX_SOURCE], [1], |
| @@ -50,24 +49,18 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl | |||
| 50 | except with this defined.]) | 49 | except with this defined.]) |
| 51 | AC_DEFINE([_MINIX], [1], | 50 | AC_DEFINE([_MINIX], [1], |
| 52 | [Define to 1 if on MINIX.]) | 51 | [Define to 1 if on MINIX.]) |
| 52 | AC_DEFINE([_NETBSD_SOURCE], [1], | ||
| 53 | [Define to 1 to make NetBSD features available. MINIX 3 needs this.]) | ||
| 53 | fi | 54 | fi |
| 54 | 55 | ||
| 55 | dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500, | 56 | dnl Use a different key than __EXTENSIONS__, as that name broke existing |
| 56 | dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already | 57 | dnl configure.ac when using autoheader 2.62. |
| 57 | dnl provided. | 58 | AH_VERBATIM([USE_SYSTEM_EXTENSIONS], |
| 58 | case "$host_os" in | ||
| 59 | hpux*) | ||
| 60 | AC_DEFINE([_XOPEN_SOURCE], [500], | ||
| 61 | [Define to 500 only on HP-UX.]) | ||
| 62 | ;; | ||
| 63 | esac | ||
| 64 | |||
| 65 | AH_VERBATIM([__EXTENSIONS__], | ||
| 66 | [/* Enable extensions on AIX 3, Interix. */ | 59 | [/* Enable extensions on AIX 3, Interix. */ |
| 67 | #ifndef _ALL_SOURCE | 60 | #ifndef _ALL_SOURCE |
| 68 | # undef _ALL_SOURCE | 61 | # undef _ALL_SOURCE |
| 69 | #endif | 62 | #endif |
| 70 | /* Enable general extensions on Mac OS X. */ | 63 | /* Enable general extensions on OS X. */ |
| 71 | #ifndef _DARWIN_C_SOURCE | 64 | #ifndef _DARWIN_C_SOURCE |
| 72 | # undef _DARWIN_C_SOURCE | 65 | # undef _DARWIN_C_SOURCE |
| 73 | #endif | 66 | #endif |
| @@ -83,6 +76,12 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl | |||
| 83 | #ifndef _TANDEM_SOURCE | 76 | #ifndef _TANDEM_SOURCE |
| 84 | # undef _TANDEM_SOURCE | 77 | # undef _TANDEM_SOURCE |
| 85 | #endif | 78 | #endif |
| 79 | /* Enable X/Open extensions if necessary. HP-UX 11.11 defines | ||
| 80 | mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of | ||
| 81 | whether compiling with -Ae or -D_HPUX_SOURCE=1. */ | ||
| 82 | #ifndef _XOPEN_SOURCE | ||
| 83 | # undef _XOPEN_SOURCE | ||
| 84 | #endif | ||
| 86 | /* Enable general extensions on Solaris. */ | 85 | /* Enable general extensions on Solaris. */ |
| 87 | #ifndef __EXTENSIONS__ | 86 | #ifndef __EXTENSIONS__ |
| 88 | # undef __EXTENSIONS__ | 87 | # undef __EXTENSIONS__ |
| @@ -103,6 +102,22 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl | |||
| 103 | AC_DEFINE([_GNU_SOURCE]) | 102 | AC_DEFINE([_GNU_SOURCE]) |
| 104 | AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) | 103 | AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) |
| 105 | AC_DEFINE([_TANDEM_SOURCE]) | 104 | AC_DEFINE([_TANDEM_SOURCE]) |
| 105 | AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined], | ||
| 106 | [ac_cv_should_define__xopen_source], | ||
| 107 | [ac_cv_should_define__xopen_source=no | ||
| 108 | AC_COMPILE_IFELSE( | ||
| 109 | [AC_LANG_PROGRAM([[ | ||
| 110 | #include <wchar.h> | ||
| 111 | mbstate_t x;]])], | ||
| 112 | [], | ||
| 113 | [AC_COMPILE_IFELSE( | ||
| 114 | [AC_LANG_PROGRAM([[ | ||
| 115 | #define _XOPEN_SOURCE 500 | ||
| 116 | #include <wchar.h> | ||
| 117 | mbstate_t x;]])], | ||
| 118 | [ac_cv_should_define__xopen_source=yes])])]) | ||
| 119 | test $ac_cv_should_define__xopen_source = yes && | ||
| 120 | AC_DEFINE([_XOPEN_SOURCE], [500]) | ||
| 106 | ])# AC_USE_SYSTEM_EXTENSIONS | 121 | ])# AC_USE_SYSTEM_EXTENSIONS |
| 107 | 122 | ||
| 108 | # gl_USE_SYSTEM_EXTENSIONS | 123 | # gl_USE_SYSTEM_EXTENSIONS |
diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4 index 79103bc7eb5..2027ab3c1d0 100644 --- a/m4/stdlib_h.m4 +++ b/m4/stdlib_h.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # stdlib_h.m4 serial 41 | 1 | # stdlib_h.m4 serial 42 |
| 2 | dnl Copyright (C) 2007-2013 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2007-2013 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -22,7 +22,7 @@ AC_DEFUN([gl_STDLIB_H], | |||
| 22 | ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt | 22 | ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt |
| 23 | initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps | 23 | initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps |
| 24 | posix_openpt ptsname ptsname_r random random_r realpath rpmatch | 24 | posix_openpt ptsname ptsname_r random random_r realpath rpmatch |
| 25 | setenv setstate setstate_r srandom srandom_r | 25 | secure_getenv setenv setstate setstate_r srandom srandom_r |
| 26 | strtod strtoll strtoull unlockpt unsetenv]) | 26 | strtod strtoll strtoull unlockpt unsetenv]) |
| 27 | ]) | 27 | ]) |
| 28 | 28 | ||
| @@ -60,6 +60,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], | |||
| 60 | GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) | 60 | GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) |
| 61 | GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH]) | 61 | GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH]) |
| 62 | GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH]) | 62 | GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH]) |
| 63 | GNULIB_SECURE_GETENV=0; AC_SUBST([GNULIB_SECURE_GETENV]) | ||
| 63 | GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV]) | 64 | GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV]) |
| 64 | GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD]) | 65 | GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD]) |
| 65 | GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL]) | 66 | GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL]) |
| @@ -88,6 +89,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], | |||
| 88 | HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) | 89 | HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) |
| 89 | HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) | 90 | HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) |
| 90 | HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH]) | 91 | HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH]) |
| 92 | HAVE_SECURE_GETENV=1; AC_SUBST([HAVE_SECURE_GETENV]) | ||
| 91 | HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) | 93 | HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) |
| 92 | HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV]) | 94 | HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV]) |
| 93 | HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) | 95 | HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) |
diff --git a/msdos/ChangeLog b/msdos/ChangeLog index 6575282689c..87a135cad2d 100644 --- a/msdos/ChangeLog +++ b/msdos/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-02-08 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * sedlibmk.inp: Sync with changes in lib/Makefile.in. | ||
| 4 | (HAVE_SECURE_GETENV, GNULIB_SECURE_GETENV): Edit to appropriate values. | ||
| 5 | |||
| 1 | 2012-12-30 Eli Zaretskii <eliz@gnu.org> | 6 | 2012-12-30 Eli Zaretskii <eliz@gnu.org> |
| 2 | 7 | ||
| 3 | * sed1v2.inp (TEMACS_LDFLAGS2): Remove editing. | 8 | * sed1v2.inp (TEMACS_LDFLAGS2): Remove editing. |
diff --git a/msdos/sedlibmk.inp b/msdos/sedlibmk.inp index 6c380fba844..27057d10fc8 100644 --- a/msdos/sedlibmk.inp +++ b/msdos/sedlibmk.inp | |||
| @@ -271,6 +271,7 @@ am__cd = cd | |||
| 271 | /^GNULIB_RMDIR *=/s/@GNULIB_RMDIR@/0/ | 271 | /^GNULIB_RMDIR *=/s/@GNULIB_RMDIR@/0/ |
| 272 | /^GNULIB_RPMATCH *=/s/@GNULIB_RPMATCH@/0/ | 272 | /^GNULIB_RPMATCH *=/s/@GNULIB_RPMATCH@/0/ |
| 273 | /^GNULIB_SCANF *=/s/@GNULIB_SCANF@/0/ | 273 | /^GNULIB_SCANF *=/s/@GNULIB_SCANF@/0/ |
| 274 | /^GNULIB_SECURE_GETENV *=/s/@GNULIB_SECURE_GETENV@/0/ | ||
| 274 | /^GNULIB_SELECT *=/s/@GNULIB_SELECT@/0/ | 275 | /^GNULIB_SELECT *=/s/@GNULIB_SELECT@/0/ |
| 275 | /^GNULIB_SETENV *=/s/@GNULIB_SETENV@/0/ | 276 | /^GNULIB_SETENV *=/s/@GNULIB_SETENV@/0/ |
| 276 | /^GNULIB_SETHOSTNAME *=/s/@GNULIB_SETHOSTNAME@/0/ | 277 | /^GNULIB_SETHOSTNAME *=/s/@GNULIB_SETHOSTNAME@/0/ |
| @@ -405,6 +406,7 @@ am__cd = cd | |||
| 405 | /^HAVE_REALPATH *=/s/@HAVE_REALPATH@/0/ | 406 | /^HAVE_REALPATH *=/s/@HAVE_REALPATH@/0/ |
| 406 | /^HAVE_RENAMEAT *=/s/@HAVE_RENAMEAT@/0/ | 407 | /^HAVE_RENAMEAT *=/s/@HAVE_RENAMEAT@/0/ |
| 407 | /^HAVE_RPMATCH *=/s/@HAVE_RPMATCH@/0/ | 408 | /^HAVE_RPMATCH *=/s/@HAVE_RPMATCH@/0/ |
| 409 | /^HAVE_SECURE_GETENV *=/s/@HAVE_SECURE_GETENV@/0/ | ||
| 408 | /^HAVE_SETENV *=/s/@HAVE_SETENV@/1/ | 410 | /^HAVE_SETENV *=/s/@HAVE_SETENV@/1/ |
| 409 | /^HAVE_SETHOSTNAME *=/s/@HAVE_SETHOSTNAME@/0/ | 411 | /^HAVE_SETHOSTNAME *=/s/@HAVE_SETHOSTNAME@/0/ |
| 410 | /^HAVE_SIGACTION *=/s/@HAVE_SIGACTION@/1/ | 412 | /^HAVE_SIGACTION *=/s/@HAVE_SIGACTION@/1/ |
diff --git a/src/ChangeLog b/src/ChangeLog index 46f872ba29d..05d69382855 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,25 @@ | |||
| 1 | 2013-02-09 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Minor hashing refactoring. | ||
| 4 | * fns.c (SXHASH_REDUCE): Move to lisp.h. | ||
| 5 | (sxhash_float): Return EMACS_UINT, for consistency with the other | ||
| 6 | hash functions. | ||
| 7 | * lisp.h (INTMASK): Now a macro, since SXHASH_REDUCE is now a | ||
| 8 | non-static inline function and therefore can't use static vars. | ||
| 9 | (SXHASH_REDUCE): Move here from fns.c, and make it inline. | ||
| 10 | * profiler.c (hashfn_profiler): Use SXHASH_REDUCE, to be consistent | ||
| 11 | with the other hash functions. | ||
| 12 | |||
| 13 | 2013-02-09 Eli Zaretskii <eliz@gnu.org> | ||
| 14 | |||
| 15 | * callproc.c (Fcall_process_region) [WINDOWSNT]: Make sure the | ||
| 16 | XXXXXX part of the temporary file pattern is not downcased even | ||
| 17 | when w32-downcase-file-names is non-nil. (Bug#13661) | ||
| 18 | |||
| 19 | * xdisp.c (decode_mode_spec): Remove handling of %t. | ||
| 20 | |||
| 21 | * msdos.c (careadlinkatcwd): Remove. | ||
| 22 | |||
| 1 | 2013-02-08 Stefan Monnier <monnier@iro.umontreal.ca> | 23 | 2013-02-08 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 24 | ||
| 3 | * lread.c (skip_dyn_bytes): New function (bug#12598). | 25 | * lread.c (skip_dyn_bytes): New function (bug#12598). |
diff --git a/src/callproc.c b/src/callproc.c index ea79da7ff5a..cb11ee0cc53 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -1016,8 +1016,26 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r | |||
| 1016 | { | 1016 | { |
| 1017 | USE_SAFE_ALLOCA; | 1017 | USE_SAFE_ALLOCA; |
| 1018 | Lisp_Object pattern = Fexpand_file_name (Vtemp_file_name_pattern, tmpdir); | 1018 | Lisp_Object pattern = Fexpand_file_name (Vtemp_file_name_pattern, tmpdir); |
| 1019 | Lisp_Object encoded_tem = ENCODE_FILE (pattern); | 1019 | Lisp_Object encoded_tem; |
| 1020 | char *tempfile = SAFE_ALLOCA (SBYTES (encoded_tem) + 1); | 1020 | char *tempfile; |
| 1021 | |||
| 1022 | #ifdef WINDOWSNT | ||
| 1023 | /* Cannot use the result of Fexpand_file_name, because it | ||
| 1024 | downcases the XXXXXX part of the pattern, and mktemp then | ||
| 1025 | doesn't recognize it. */ | ||
| 1026 | if (!NILP (Vw32_downcase_file_names)) | ||
| 1027 | { | ||
| 1028 | Lisp_Object dirname = Ffile_name_directory (pattern); | ||
| 1029 | |||
| 1030 | if (NILP (dirname)) | ||
| 1031 | pattern = Vtemp_file_name_pattern; | ||
| 1032 | else | ||
| 1033 | pattern = concat2 (dirname, Vtemp_file_name_pattern); | ||
| 1034 | } | ||
| 1035 | #endif | ||
| 1036 | |||
| 1037 | encoded_tem = ENCODE_FILE (pattern); | ||
| 1038 | tempfile = SAFE_ALLOCA (SBYTES (encoded_tem) + 1); | ||
| 1021 | memcpy (tempfile, SDATA (encoded_tem), SBYTES (encoded_tem) + 1); | 1039 | memcpy (tempfile, SDATA (encoded_tem), SBYTES (encoded_tem) + 1); |
| 1022 | coding_systems = Qt; | 1040 | coding_systems = Qt; |
| 1023 | 1041 | ||
| @@ -4045,10 +4045,6 @@ sweep_weak_hash_tables (void) | |||
| 4045 | 4045 | ||
| 4046 | #define SXHASH_MAX_LEN 7 | 4046 | #define SXHASH_MAX_LEN 7 |
| 4047 | 4047 | ||
| 4048 | /* Hash X, returning a value that fits into a Lisp integer. */ | ||
| 4049 | #define SXHASH_REDUCE(X) \ | ||
| 4050 | ((((X) ^ (X) >> (BITS_PER_EMACS_INT - FIXNUM_BITS))) & INTMASK) | ||
| 4051 | |||
| 4052 | /* Return a hash for string PTR which has length LEN. The hash value | 4048 | /* Return a hash for string PTR which has length LEN. The hash value |
| 4053 | can be any EMACS_UINT value. */ | 4049 | can be any EMACS_UINT value. */ |
| 4054 | 4050 | ||
| @@ -4081,7 +4077,7 @@ sxhash_string (char const *ptr, ptrdiff_t len) | |||
| 4081 | 4077 | ||
| 4082 | /* Return a hash for the floating point value VAL. */ | 4078 | /* Return a hash for the floating point value VAL. */ |
| 4083 | 4079 | ||
| 4084 | static EMACS_INT | 4080 | static EMACS_UINT |
| 4085 | sxhash_float (double val) | 4081 | sxhash_float (double val) |
| 4086 | { | 4082 | { |
| 4087 | EMACS_UINT hash = 0; | 4083 | EMACS_UINT hash = 0; |
diff --git a/src/lisp.h b/src/lisp.h index 787457b4872..997ef458ec5 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -227,7 +227,7 @@ enum enum_USE_LSB_TAG { USE_LSB_TAG = 0 }; | |||
| 227 | 227 | ||
| 228 | /* Lisp integers use 2 tags, to give them one extra bit, thus | 228 | /* Lisp integers use 2 tags, to give them one extra bit, thus |
| 229 | extending their range from, e.g., -2^28..2^28-1 to -2^29..2^29-1. */ | 229 | extending their range from, e.g., -2^28..2^28-1 to -2^29..2^29-1. */ |
| 230 | static EMACS_INT const INTMASK = EMACS_INT_MAX >> (INTTYPEBITS - 1); | 230 | #define INTMASK (EMACS_INT_MAX >> (INTTYPEBITS - 1)) |
| 231 | #define case_Lisp_Int case Lisp_Int0: case Lisp_Int1 | 231 | #define case_Lisp_Int case Lisp_Int0: case Lisp_Int1 |
| 232 | #define LISP_INT_TAG_P(x) (((x) & ~Lisp_Int1) == 0) | 232 | #define LISP_INT_TAG_P(x) (((x) & ~Lisp_Int1) == 0) |
| 233 | 233 | ||
| @@ -1309,6 +1309,14 @@ sxhash_combine (EMACS_UINT x, EMACS_UINT y) | |||
| 1309 | return (x << 4) + (x >> (BITS_PER_EMACS_INT - 4)) + y; | 1309 | return (x << 4) + (x >> (BITS_PER_EMACS_INT - 4)) + y; |
| 1310 | } | 1310 | } |
| 1311 | 1311 | ||
| 1312 | /* Hash X, returning a value that fits into a fixnum. */ | ||
| 1313 | |||
| 1314 | LISP_INLINE EMACS_UINT | ||
| 1315 | SXHASH_REDUCE (EMACS_UINT x) | ||
| 1316 | { | ||
| 1317 | return (x ^ x >> (BITS_PER_EMACS_INT - FIXNUM_BITS)) & INTMASK; | ||
| 1318 | } | ||
| 1319 | |||
| 1312 | /* These structures are used for various misc types. */ | 1320 | /* These structures are used for various misc types. */ |
| 1313 | 1321 | ||
| 1314 | struct Lisp_Misc_Any /* Supertype of all Misc types. */ | 1322 | struct Lisp_Misc_Any /* Supertype of all Misc types. */ |
diff --git a/src/msdos.c b/src/msdos.c index 1b2deaf7478..527a75c8c2f 100644 --- a/src/msdos.c +++ b/src/msdos.c | |||
| @@ -3957,14 +3957,6 @@ careadlinkat (int fd, char const *filename, | |||
| 3957 | return buffer; | 3957 | return buffer; |
| 3958 | } | 3958 | } |
| 3959 | 3959 | ||
| 3960 | ssize_t | ||
| 3961 | careadlinkatcwd (int fd, char const *filename, char *buffer, | ||
| 3962 | size_t buffer_size) | ||
| 3963 | { | ||
| 3964 | (void) fd; | ||
| 3965 | return readlink (filename, buffer, buffer_size); | ||
| 3966 | } | ||
| 3967 | |||
| 3968 | 3960 | ||
| 3969 | #if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2 | 3961 | #if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2 |
| 3970 | 3962 | ||
diff --git a/src/profiler.c b/src/profiler.c index f6503cf182e..85d9c1ca88a 100644 --- a/src/profiler.c +++ b/src/profiler.c | |||
| @@ -560,7 +560,7 @@ hashfn_profiler (struct hash_table_test *ht, Lisp_Object bt) | |||
| 560 | ? XHASH (XCDR (XCDR (f))) : XHASH (f)); | 560 | ? XHASH (XCDR (XCDR (f))) : XHASH (f)); |
| 561 | hash = sxhash_combine (hash, hash1); | 561 | hash = sxhash_combine (hash, hash1); |
| 562 | } | 562 | } |
| 563 | return (hash & INTMASK); | 563 | return SXHASH_REDUCE (hash); |
| 564 | } | 564 | } |
| 565 | else | 565 | else |
| 566 | return XHASH (bt); | 566 | return XHASH (bt); |
diff --git a/src/xdisp.c b/src/xdisp.c index 8a96a3eadc7..83a58aee32d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -21630,9 +21630,6 @@ decode_mode_spec (struct window *w, register int c, int field_width, | |||
| 21630 | return "@"; | 21630 | return "@"; |
| 21631 | } | 21631 | } |
| 21632 | 21632 | ||
| 21633 | case 't': /* indicate TEXT or BINARY */ | ||
| 21634 | return "T"; | ||
| 21635 | |||
| 21636 | case 'z': | 21633 | case 'z': |
| 21637 | /* coding-system (not including end-of-line format) */ | 21634 | /* coding-system (not including end-of-line format) */ |
| 21638 | case 'Z': | 21635 | case 'Z': |