commit 1b76d9168336ede8976b980aeaed64ae2908501a (HEAD, refs/remotes/origin/master) Merge: bca4930 2e5a89f Author: John Wiegley Date: Mon Jan 18 22:59:51 2016 -0800 - commit bca49307c8ea3f96d6eede375a7f42091ae5d5af Merge: 1400165 6e79b63 Author: John Wiegley Date: Mon Jan 18 22:56:34 2016 -0800 ; Merge from origin/emacs-25 The following commit was skipped: 6e79b63 ; Auto-commit of loaddefs files. commit 140016558bcb462692d8b9f2f3f866e0f337d218 Merge: 7823745 3ae7934 Author: John Wiegley Date: Mon Jan 18 22:56:34 2016 -0800 Merge from origin/emacs-25 3ae7934 ; * etc/NEWS: Mark entries that don't need further treatment. 6165c36 * lisp/files.el (dir-locals--all-files): Respect absolute file-names 2ffdf15 * lisp/help-fns.el (describe-variable): Fix a left-over parenthesis 71ecd62 * lisp/dired-x.el (dired-omit-here-always): Use add-dir-local-variable f0b82b3 * lisp/files.el (dir-locals--all-files): Use completion instead of wildcards 86e4513 Fix incompatbilities with MS-Windows 2000 and older 4e96521 Mention in PROBLEMS an issue with MS-Windows NT4 15c23aa Ensure 8-byte aligned memory allocation on MS-Windows 9X 39afa42 Fix tests for active region in hideif.el 05df666 Fix interactive specs in some hideif.el commands commit 7823745acbe9b87eea2db4ef434e379fc903ec35 Merge: 6acd2aa bb0cd31 Author: John Wiegley Date: Mon Jan 18 22:56:33 2016 -0800 ; Merge from origin/emacs-25 The following commit was skipped: bb0cd31 Merge branch 'emacs-25' of git.sv.gnu.org:/srv/git/emacs into emacs-25 commit 6acd2aa02c6f0eb9d3fadce0bb48183837beafd8 Merge: 564c84f 549a765 Author: John Wiegley Date: Mon Jan 18 22:56:33 2016 -0800 - commit 564c84f4b12482aefe86539d2471607565c3ee7c Author: Paul Eggert Date: Sun Jan 3 15:00:49 2016 -0800 Avoid stdio in SIGINT handler * admin/merge-gnulib (GNULIB_MODULES): Add ignore-value. * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. * lib/ignore-value.h: New file, from gnulib. * src/keyboard.c: Include it. (write_stdout, read_stdin): New functions. (handle_interrupt): Use them instead of printf and getchar, and avoid fflush when handling signals. diff --git a/admin/merge-gnulib b/admin/merge-gnulib index 363bb23..40b5b78 100755 --- a/admin/merge-gnulib +++ b/admin/merge-gnulib @@ -32,7 +32,7 @@ GNULIB_MODULES=' dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday gitlog-to-changelog - intprops largefile lstat + ignore-value intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qcopy-acl readlink readlinkat sig2str socklen stat-time stdalign stddef stdio diff --git a/lib/gnulib.mk b/lib/gnulib.mk index 97ed5b1..b920cbb 100644 --- a/lib/gnulib.mk +++ b/lib/gnulib.mk @@ -21,7 +21,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=flexmember --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=setenv --avoid=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib --avoid=unsetenv --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt binary-io byteswap c-ctype c-strcase careadlinkat close-stream count-one-bits count-trailing-zeros crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday gitlog-to-changelog intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qcopy-acl readlink readlinkat sig2str socklen stat-time stdalign stddef stdio stpcpy strftime strtoimax strtoumax symlink sys_stat sys_time time time_r time_rz timegm timer-time timespec-add timespec-sub unsetenv update-copyright utimens vla warnings +# Reproduce by: gnulib-tool --import --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=flexmember --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=setenv --avoid=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib --avoid=unsetenv --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt binary-io byteswap c-ctype c-strcase careadlinkat close-stream count-one-bits count-trailing-zeros crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday gitlog-to-changelog ignore-value intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qcopy-acl readlink readlinkat sig2str socklen stat-time stdalign stddef stdio stpcpy strftime strtoimax strtoumax symlink sys_stat sys_time time time_r time_rz timegm timer-time timespec-add timespec-sub unsetenv update-copyright utimens vla warnings MOSTLYCLEANFILES += core *.stackdump @@ -567,6 +567,13 @@ EXTRA_libgnu_a_SOURCES += group-member.c ## end gnulib module group-member +## begin gnulib module ignore-value + + +EXTRA_DIST += ignore-value.h + +## end gnulib module ignore-value + ## begin gnulib module intprops diff --git a/lib/ignore-value.h b/lib/ignore-value.h new file mode 100644 index 0000000..6713d96 --- /dev/null +++ b/lib/ignore-value.h @@ -0,0 +1,50 @@ +/* ignore a function return without a compiler warning. -*- coding: utf-8 -*- + + Copyright (C) 2008-2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Jim Meyering, Eric Blake and Pádraig Brady. */ + +/* Use "ignore_value" to avoid a warning when using a function declared with + gcc's warn_unused_result attribute, but for which you really do want to + ignore the result. Traditionally, people have used a "(void)" cast to + indicate that a function's return value is deliberately unused. However, + if the function is declared with __attribute__((warn_unused_result)), + gcc issues a warning even with the cast. + + Caution: most of the time, you really should heed gcc's warning, and + check the return value. However, in those exceptional cases in which + you're sure you know what you're doing, use this function. + + For the record, here's one of the ignorable warnings: + "copy.c:233: warning: ignoring return value of 'fchown', + declared with attribute warn_unused_result". */ + +#ifndef _GL_IGNORE_VALUE_H +#define _GL_IGNORE_VALUE_H + +/* Normally casting an expression to void discards its value, but GCC + versions 3.4 and newer have __attribute__ ((__warn_unused_result__)) + which may cause unwanted diagnostics in that case. Use __typeof__ + and __extension__ to work around the problem, if the workaround is + known to be needed. */ +#if 3 < __GNUC__ + (4 <= __GNUC_MINOR__) +# define ignore_value(x) \ + (__extension__ ({ __typeof__ (x) __x = (x); (void) __x; })) +#else +# define ignore_value(x) ((void) (x)) +#endif + +#endif diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index 69920a8..27ca70a 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 @@ -91,6 +91,7 @@ AC_DEFUN([gl_EARLY], # Code from module gettimeofday: # Code from module gitlog-to-changelog: # Code from module group-member: + # Code from module ignore-value: # Code from module include_next: # Code from module intprops: # Code from module inttypes-incomplete: @@ -905,6 +906,7 @@ AC_DEFUN([gl_FILE_LIST], [ lib/gettimeofday.c lib/gl_openssl.h lib/group-member.c + lib/ignore-value.h lib/intprops.h lib/inttypes.in.h lib/lstat.c diff --git a/src/keyboard.c b/src/keyboard.c index 83b004b..c8a9728 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -64,6 +64,8 @@ along with GNU Emacs. If not, see . */ #include #include +#include + #ifdef HAVE_WINDOW_SYSTEM #include TERM_HEADER #endif /* HAVE_WINDOW_SYSTEM */ @@ -10206,6 +10208,21 @@ deliver_interrupt_signal (int sig) deliver_process_signal (sig, handle_interrupt_signal); } +/* Output MSG directly to standard output, without buffering. Ignore + failures. This is safe in a signal handler. */ +static void +write_stdout (char const *msg) +{ + ignore_value (write (STDOUT_FILENO, msg, strlen (msg))); +} + +/* Read a byte from stdin, without buffering. Safe in signal handlers. */ +static int +read_stdin (void) +{ + char c; + return read (STDIN_FILENO, &c, 1) == 1 ? c : EOF; +} /* If Emacs is stuck because `inhibit-quit' is true, then keep track of the number of times C-g has been requested. If C-g is pressed @@ -10242,9 +10259,9 @@ handle_interrupt (bool in_signal_handler) sigemptyset (&blocked); sigaddset (&blocked, SIGINT); pthread_sigmask (SIG_BLOCK, &blocked, 0); + fflush (stdout); } - fflush (stdout); reset_all_sys_modes (); #ifdef SIGTSTP @@ -10260,8 +10277,9 @@ handle_interrupt (bool in_signal_handler) /* Perhaps should really fork an inferior shell? But that would not provide any way to get back to the original shell, ever. */ - printf ("No support for stopping a process on this operating system;\n"); - printf ("you can continue or abort.\n"); + write_stdout ("No support for stopping a process" + " on this operating system;\n" + "you can continue or abort.\n"); #endif /* not SIGTSTP */ #ifdef MSDOS /* We must remain inside the screen area when the internal terminal @@ -10272,46 +10290,49 @@ handle_interrupt (bool in_signal_handler) the code used for auto-saving doesn't cope with the mark bit. */ if (!gc_in_progress) { - printf ("Auto-save? (y or n) "); - fflush (stdout); - if (((c = getchar ()) & ~040) == 'Y') + write_stdout ("Auto-save? (y or n) "); + c = read_stdin (); + if ((c & 040) == 'Y') { Fdo_auto_save (Qt, Qnil); #ifdef MSDOS - printf ("\r\nAuto-save done"); -#else /* not MSDOS */ - printf ("Auto-save done\n"); -#endif /* not MSDOS */ + write_stdout ("\r\nAuto-save done"); +#else + write_stdout ("Auto-save done\n"); +#endif } - while (c != '\n') c = getchar (); + while (c != '\n') + c = read_stdin (); } else { /* During GC, it must be safe to reenable quitting again. */ Vinhibit_quit = Qnil; + write_stdout + ( #ifdef MSDOS - printf ("\r\n"); -#endif /* not MSDOS */ - printf ("Garbage collection in progress; cannot auto-save now\r\n"); - printf ("but will instead do a real quit after garbage collection ends\r\n"); - fflush (stdout); + "\r\n" +#endif + "Garbage collection in progress; cannot auto-save now\r\n" + "but will instead do a real quit" + " after garbage collection ends\r\n"); } #ifdef MSDOS - printf ("\r\nAbort? (y or n) "); -#else /* not MSDOS */ - printf ("Abort (and dump core)? (y or n) "); -#endif /* not MSDOS */ - fflush (stdout); - if (((c = getchar ()) & ~040) == 'Y') + write_stdout ("\r\nAbort? (y or n) "); +#else + write_stdout ("Abort (and dump core)? (y or n) "); +#endif + c = read_stdin (); + if ((c & ~040) == 'Y') emacs_abort (); - while (c != '\n') c = getchar (); + while (c != '\n') + c = read_stdin (); #ifdef MSDOS - printf ("\r\nContinuing...\r\n"); + write_stdout ("\r\nContinuing...\r\n"); #else /* not MSDOS */ - printf ("Continuing...\n"); + write_stdout ("Continuing...\n"); #endif /* not MSDOS */ - fflush (stdout); init_all_sys_modes (); } else commit 9e0fc619541f57b71711e8855d2b19c942b107e6 Author: Jens Lechtenboerger Date: Sun Jan 3 01:10:34 2016 +0000 Refactor mml-smime.el, mml1991.el, mml2015.el (Maybe this is the last merge from Gnus git to Emacs git) Cf. discussion on ding mailing list, messages in . Common code from the three files mml-smime.el, mml1991.el, and mml2015.el is moved to mml-sec.el. Auxiliary functions are added to gnus-util.el. The code is supported by test cases with necessary test keys. Documentation in message.texi is updated. * doc/misc/message.texi (Security, Using S/MIME): Update for refactoring mml-smime.el, mml1991.el, mml2015.el. (Using OpenPGP): Rename from "Using PGP/MIME"; update contents. (Passphrase caching, Encrypt-to-self, Bcc Warning): New sections. * lisp/gnus/gnus-util.el (gnus-test-list, gnus-subsetp, gnus-setdiff): New functions. * lisp/gnus/mml-sec.el: Require gnus-util and epg. (epa--select-keys): Autoload. (mml-signencrypt-style-alist, mml-secure-cache-passphrase): Doc fix. (mml-secure-openpgp-signers): New user option; make mml1991-signers and mml2015-signers obsolete aliases to it. (mml-secure-smime-signers): New user option; make mml-smime-signers an obsolete alias to it. (mml-secure-openpgp-encrypt-to-self): New user option; make mml1991-encrypt-to-self and mml2015-encrypt-to-self obsolete aliases to it. (mml-secure-smime-encrypt-to-self): New user option; make mml-smime-encrypt-to-self an obsolete alias to it. (mml-secure-openpgp-sign-with-sender): New user option; make mml2015-sign-with-sender an obsolete alias to it. (mml-secure-smime-sign-with-sender): New user option; make mml-smime-sign-with-sender an obsolete alias to it. (mml-secure-openpgp-always-trust): New user option; make mml2015-always-trust an obsolete alias to it. (mml-secure-fail-when-key-problem, mml-secure-key-preferences): New user options. (mml-secure-cust-usage-lookup, mml-secure-cust-fpr-lookup) (mml-secure-cust-record-keys, mml-secure-cust-remove-keys) (mml-secure-add-secret-key-id, mml-secure-clear-secret-key-id-list) (mml-secure-cache-passphrase-p, mml-secure-cache-expiry-interval) (mml-secure-passphrase-callback, mml-secure-check-user-id) (mml-secure-secret-key-exists-p, mml-secure-check-sub-key) (mml-secure-find-usable-keys, mml-secure-select-preferred-keys) (mml-secure-fingerprint, mml-secure-filter-keys) (mml-secure-normalize-cust-name, mml-secure-select-keys) (mml-secure-select-keys-1, mml-secure-signer-names, mml-secure-signers) (mml-secure-self-recipients, mml-secure-recipients) (mml-secure-epg-encrypt, mml-secure-epg-sign): New functions. * lisp/gnus/mml-smime.el: Require epg; refactor declaration and autoloading of epg functions. (mml-smime-use): Doc fix. (mml-smime-cache-passphrase, mml-smime-passphrase-cache-expiry): Obsolete. (mml-smime-get-dns-cert, mml-smime-get-ldap-cert): Use format instead of gnus-format-message. (mml-smime-epg-secret-key-id-list): Remove variable. (mml-smime-epg-passphrase-callback, mml-smime-epg-find-usable-key) (mml-smime-epg-find-usable-secret-key): Remove functions. (mml-smime-epg-sign, mml-smime-epg-encrypt): Refactor. * lisp/gnus/mml1991.el (mml1991-cache-passphrase) (mml1991-passphrase-cache-expiry): Obsolete. (mml1991-epg-secret-key-id-list): Remove variable. (mml1991-epg-passphrase-callback, mml1991-epg-find-usable-key) (mml1991-epg-find-usable-secret-key): Remove functions. (mml1991-epg-sign, mml1991-epg-encrypt): Refactor. * lisp/gnus/mml2015.el (mml2015-cache-passphrase) (mml2015-passphrase-cache-expiry): Obsolete. (mml2015-epg-secret-key-id-list): Remove variable. (mml2015-epg-passphrase-callback, mml2015-epg-check-user-id) (mml2015-epg-check-sub-key, mml2015-epg-find-usable-key) (mml2015-epg-find-usable-secret-key): Remove functions. (mml2015-epg-decrypt, mml2015-epg-clear-decrypt, mml2015-epg-sign) (mml2015-epg-encrypt): Refactor. diff --git a/doc/misc/message.texi b/doc/misc/message.texi index dbc7759..761fb77 100644 --- a/doc/misc/message.texi +++ b/doc/misc/message.texi @@ -938,16 +938,82 @@ Libidn} installed in order to use this functionality. @cindex encrypt @cindex secure -Using the @acronym{MML} language, Message is able to create digitally -signed and digitally encrypted messages. Message (or rather -@acronym{MML}) currently support @acronym{PGP} (RFC 1991), -@acronym{PGP/MIME} (RFC 2015/3156) and @acronym{S/MIME}. +By default, e-mails are transmitted without any protection around the +Internet, which implies that they can be read and changed by lots of +different parties. In particular, they are analyzed under bulk +surveillance, which violates basic human rights. To defend those +rights, digital self-defense is necessary (in addition to legal +changes), and encryption and digital signatures are powerful +techniques for self-defense. In essence, encryption ensures that +only the intended recipient will be able to read a message, while +digital signatures make sure that modifications to messages can be +detected by the recipient. + +Nowadays, there are two major incompatible e-mail encryption +standards, namely @acronym{OpenPGP} and @acronym{S/MIME}. Both of +these standards are implemented by the @uref{https://www.gnupg.org/, +GNU Privacy Guard (GnuPG)}, which needs to be installed as external +software in addition to GNU Emacs. Before you can start to encrypt, +decrypt, and sign messages, you need to create a so-called key-pair, +which consists of a private key and a public key. Your @emph{public} key +(also known as @emph{certificate}, in particular with @acronym{S/MIME}), is +used by others (a) to encrypt messages intended for you and (b) to verify +digital signatures created by you. In contrast, you use your @emph{private} +key (a) to decrypt messages and (b) to sign messages. (You may want to +think of your public key as an open safe that you offer to others such +that they can deposit messages and lock the door, while your private +key corresponds to the opening combination for the safe.) + +Thus, you need to perform the following steps for e-mail encryption, +typically outside Emacs. See, for example, the +@uref{https://www.gnupg.org/gph/en/manual.html, The GNU Privacy +Handbook} for details covering the standard @acronym{OpenPGP} with +@acronym{GnuPG}. +@enumerate +@item +Install GnuPG. +@item +Create a key-pair for your own e-mail address. +@item +Distribute your public key, e.g., via upload to key servers. +@item +Import the public keys for the recipients to which you want to send +encrypted e-mails. +@end enumerate + +Whether to use the standard @acronym{OpenPGP} or @acronym{S/MIME} is +beyond the scope of this documentation. Actually, you can use one +standard for one set of recipients and the other standard for +different recipients (depending their preferences or capabilities). + +In case you are not familiar with all those acronyms: The standard +@acronym{OpenPGP} is also called @acronym{PGP} (Pretty Good Privacy). +The command line tools offered by @acronym{GnuPG} for +@acronym{OpenPGP} are called @command{gpg} and @command{gpg2}, while +the one for @acronym{S/MIME} is called @command{gpgsm}. An +alternative, but discouraged, tool for @acronym{S/MIME} is +@command{openssl}. To make matters worse, e-mail messages can be +formed in two different ways with @acronym{OpenPGP}, namely +@acronym{PGP} (RFC 1991/4880) and @acronym{PGP/MIME} (RFC 2015/3156). + +The good news, however, is the following: In GNU Emacs, Message +supports all those variants, comes with reasonable defaults that can +be customized according to your needs, and invokes the proper command +line tools behind the scenes for encryption, decryption, as well as +creation and verification of digital signatures. + +Message uses the @acronym{MML} language for the creation of signed +and/or encrypted messages as explained in the following. + @menu * Signing and encryption:: Signing and encrypting commands. * Using S/MIME:: Using S/MIME -* Using PGP/MIME:: Using PGP/MIME +* Using OpenPGP:: Using OpenPGP +* Passphrase caching:: How to cache passphrases * PGP Compatibility:: Compatibility with older implementations +* Encrypt-to-self:: Reading your own encrypted messages +* Bcc Warning:: Do not use encryption with Bcc headers @end menu @node Signing and encryption @@ -1041,11 +1107,45 @@ programs are required to make things work, and some small general hints. @node Using S/MIME @subsection Using S/MIME -@emph{Note!} This section assume you have a basic familiarity with -modern cryptography, @acronym{S/MIME}, various PKCS standards, OpenSSL and -so on. +@acronym{S/MIME} requires an external implementation, such as +@uref{https://www.gnupg.org/, GNU Privacy Guard} or +@uref{https://www.openssl.org/, OpenSSL}. The default Emacs interface +to the S/MIME implementation is EasyPG (@pxref{Top,,EasyPG Assistant +User's Manual, epa, EasyPG Assistant User's Manual}), which has been +included in Emacs since version 23 and which relies on the command +line tool @command{gpgsm} provided by @acronym{GnuPG}. That tool +implements certificate management, including certificate revocation +and expiry, while such tasks need to be performed manually, if OpenSSL +is used. + +The choice between EasyPG and OpenSSL is controlled by the variable +@code{mml-smime-use}, which needs to be set to the value @code{epg} +for EasyPG. Depending on your version of Emacs that value may be the +default; if not, you can either customize that variable or place the +following line in your @file{.emacs} file (that line needs to be +placed above other code related to message/gnus/encryption): + +@lisp +(require 'epg) +@end lisp + +Moreover, you may want to customize the variables +@code{mml-default-encrypt-method} and +@code{mml-default-sign-method} to the string @code{"smime"}. + +That's all if you want to use S/MIME with EasyPG, and that's the +recommended way of using S/MIME with Message. + +If you think about using OpenSSL instead of EasyPG, please read the +BUGS section in the manual for the @command{smime} command coming with +OpenSSL first. If you still want to use OpenSSL, the following +applies. + +@emph{Note!} The remainder of this section assumes you have a basic +familiarity with modern cryptography, @acronym{S/MIME}, various PKCS +standards, OpenSSL and so on. -The @acronym{S/MIME} support in Message (and @acronym{MML}) require +The @acronym{S/MIME} support in Message (and @acronym{MML}) can use OpenSSL@. OpenSSL performs the actual @acronym{S/MIME} sign/encrypt operations. OpenSSL can be found at @uref{http://www.openssl.org/}. OpenSSL 0.9.6 and later should work. Version 0.9.5a cannot extract mail @@ -1101,26 +1201,44 @@ you use unencrypted keys (e.g., if they are on a secure storage, or if you are on a secure single user machine) simply press @code{RET} at the passphrase prompt. -@node Using PGP/MIME -@subsection Using PGP/MIME +@node Using OpenPGP +@subsection Using OpenPGP -@acronym{PGP/MIME} requires an external OpenPGP implementation, such -as @uref{http://www.gnupg.org/, GNU Privacy Guard}. Pre-OpenPGP +Use of OpenPGP requires an external software, such +as @uref{https://www.gnupg.org/, GNU Privacy Guard}. Pre-OpenPGP implementations such as PGP 2.x and PGP 5.x are also supported. The default Emacs interface to the PGP implementation is EasyPG (@pxref{Top,,EasyPG Assistant User's Manual, epa, EasyPG Assistant User's Manual}), but PGG (@pxref{Top, ,PGG, pgg, PGG Manual}) and Mailcrypt are also supported. @xref{PGP Compatibility}. +As stated earlier, messages encrypted with OpenPGP can be formatted +according to two different standards, namely @acronym{PGP} or +@acronym{PGP/MIME}. The variables +@code{mml-default-encrypt-method} and +@code{mml-default-sign-method} determine which variant to prefer, +@acronym{PGP/MIME} by default. + +@node Passphrase caching +@subsection Passphrase caching + @cindex gpg-agent -Message internally calls GnuPG (the @command{gpg} command) to perform +Message with EasyPG internally calls GnuPG (the @command{gpg} or +@command{gpgsm} command) to perform data encryption, and in certain cases (decrypting or signing for -example), @command{gpg} requires user's passphrase. Currently the -recommended way to supply your passphrase to @command{gpg} is to use the +example), @command{gpg}/@command{gpgsm} requires user's passphrase. +Currently the recommended way to supply your passphrase is to use the @command{gpg-agent} program. -To use @command{gpg-agent} in Emacs, you need to run the following -command from the shell before starting Emacs. +In particular, the @command{gpg-agent} program supports passphrase +caching so that you do not need to enter your passphrase for every +decryption/sign operation. @xref{Agent Options, , , gnupg, Using the +GNU Privacy Guard}. + +How to use @command{gpg-agent} in Emacs depends on your version of +GnuPG. With GnuPG version 2.1, @command{gpg-agent} is started +automatically if necessary. With older versions you may need to run +the following command from the shell before starting Emacs. @example eval `gpg-agent --daemon` @@ -1135,11 +1253,10 @@ GNU Privacy Guard}. Once your @command{gpg-agent} is set up, it will ask you for a passphrase as needed for @command{gpg}. Under the X Window System, you will see a new passphrase input dialog appear. The dialog is -provided by PIN Entry (the @command{pinentry} command), and as of -version 0.7.2, @command{pinentry} cannot cooperate with Emacs on a -single tty. So, if you are using a text console, you may need to put -a passphrase into gpg-agent's cache beforehand. The following command -does the trick. +provided by PIN Entry (the @command{pinentry} command), reasonably +recent versions of which can also cooperate with Emacs on a text +console. If that does not work, you may need to put a passphrase into +gpg-agent's cache beforehand. The following command does the trick. @example gpg --use-agent --sign < /dev/null > /dev/null @@ -1181,6 +1298,38 @@ message that can be understood by PGP version 2. (Refer to @uref{http://www.gnupg.org/gph/en/pgp2x.html} for more information about the problem.) +@node Encrypt-to-self +@subsection Encrypt-to-self + +By default, messages are encrypted to all recipients (@code{To}, +@code{Cc}, @code{Bcc} headers). Thus, you will not be able to decrypt +your own messages. To make sure that messages are also encrypted to +your own key(s), several alternative solutions exist: +@enumerate +@item +Use the @code{encrypt-to} option in the file @file{gpg.conf} (for +OpenPGP) or @file{gpgsm.conf} (for @acronym{S/MIME} with EasyPG). +@xref{Invoking GPG, , , gnupg, Using the GNU Privacy Guard}, or +@xref{Invoking GPGSM, , , gnupg, Using the GNU Privacy Guard}. +@item +Include your own e-mail address (for which you created a key-pair) +among the recipients. +@item +Customize the variable @code{mml-secure-openpgp-encrypt-to-self} (for +OpenPGP) or @code{mml-secure-smime-encrypt-to-self} (for +@acronym{S/MIME} with EasyPG). +@end enumerate + +@node Bcc Warning +@subsection Bcc Warning + +The @code{Bcc} header is meant to hide recipients of messages. +However, when encrypted messages are used, the e-mail addresses of all +@code{Bcc}-headers are given away to all recipients without +warning, which is a bug, see +@uref{https://debbugs.gnu.org/cgi/bugreport.cgi?bug=18718}. + + @node Various Commands @section Various Commands diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index ea5f315..31645fc 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -1996,6 +1996,14 @@ to case differences." (defun gnus-timer--function (timer) (elt timer 5))) +(defun gnus-test-list (list predicate) + "To each element of LIST apply PREDICATE. +Return nil if LIST is no list or is empty or some test returns nil; +otherwise, return t." + (when (and list (listp list)) + (let ((result (mapcar predicate list))) + (not (memq nil result))))) + (defun gnus-subsetp (list1 list2) "Return t if LIST1 is a subset of LIST2. Similar to `subsetp' but use member for element test so that this works for @@ -2006,6 +2014,13 @@ lists of strings." (gnus-subsetp (cdr list1) list2)) t))) +(defun gnus-setdiff (list1 list2) + "Return member-based set difference of LIST1 and LIST2." + (when (and list1 (listp list1) (listp list2)) + (if (member (car list1) list2) + (gnus-setdiff (cdr list1) list2) + (cons (car list1) (gnus-setdiff (cdr list1) list2))))) + (provide 'gnus-util) ;;; gnus-util.el ends here diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el index dbd3162..0a5f472 100644 --- a/lisp/gnus/mml-sec.el +++ b/lisp/gnus/mml-sec.el @@ -25,7 +25,9 @@ (eval-when-compile (require 'cl)) -(autoload 'gnus-subsetp "gnus-util") +(require 'gnus-util) +(require 'epg) + (autoload 'mail-strip-quoted-names "mail-utils") (autoload 'mml2015-sign "mml2015") (autoload 'mml2015-encrypt "mml2015") @@ -40,6 +42,7 @@ (autoload 'mml-smime-encrypt-query "mml-smime") (autoload 'mml-smime-verify "mml-smime") (autoload 'mml-smime-verify-test "mml-smime") +(autoload 'epa--select-keys "epa") (defvar mml-sign-alist '(("smime" mml-smime-sign-buffer mml-smime-sign-query) @@ -91,7 +94,7 @@ signs and encrypt the message in one step. Note that the output generated by using a `combined' mode is NOT understood by all PGP implementations, in particular PGP version -2 does not support it! See Info node `(message)Security' for +2 does not support it! See Info node `(message) Security' for details." :version "22.1" :group 'message @@ -111,7 +114,9 @@ details." (if (boundp 'password-cache) password-cache t) - "If t, cache passphrase." + "If t, cache OpenPGP or S/MIME passphrases inside Emacs. +Passphrase caching in Emacs is NOT recommended. Use gpg-agent instead. +See Info node `(message) Security'." :group 'message :type 'boolean) @@ -425,6 +430,529 @@ If called with a prefix argument, only encrypt (do NOT sign)." (interactive "P") (mml-secure-message "pgpauto" (if dontsign 'encrypt 'signencrypt))) +;;; Common functionality for mml1991.el, mml2015.el, mml-smime.el + +(define-obsolete-variable-alias 'mml1991-signers 'mml-secure-openpgp-signers) +(define-obsolete-variable-alias 'mml2015-signers 'mml-secure-openpgp-signers) +(defcustom mml-secure-openpgp-signers nil + "A list of your own key ID(s) which will be used to sign OpenPGP messages. +If set, it is added to the setting of `mml-secure-openpgp-sign-with-sender'." + :group 'mime-security + :type '(repeat (string :tag "Key ID"))) + +(define-obsolete-variable-alias 'mml-smime-signers 'mml-secure-smime-signers) +(defcustom mml-secure-smime-signers nil + "A list of your own key ID(s) which will be used to sign S/MIME messages. +If set, it is added to the setting of `mml-secure-smime-sign-with-sender'." + :group 'mime-security + :type '(repeat (string :tag "Key ID"))) + +(define-obsolete-variable-alias + 'mml1991-encrypt-to-self 'mml-secure-openpgp-encrypt-to-self) +(define-obsolete-variable-alias + 'mml2015-encrypt-to-self 'mml-secure-openpgp-encrypt-to-self) +(defcustom mml-secure-openpgp-encrypt-to-self nil + "List of own key ID(s) or t; determines additional recipients with OpenPGP. +If t, also encrypt to key for message sender; if list, encrypt to those keys. +With this variable, you can ensure that you can decrypt your own messages. +Alternatives to this variable include Bcc'ing the message to yourself or +using the encrypt-to or hidden-encrypt-to option in gpg.conf (see man gpg(1)). +Note that this variable and the encrypt-to option give away your identity +for *every* encryption without warning, which is not what you want if you are +using, e.g., remailers. +Also, use of Bcc gives away your identity for *every* encryption without +warning, which is a bug, see: +https://debbugs.gnu.org/cgi/bugreport.cgi?bug=18718" + :group 'mime-security + :type '(choice (const :tag "None" nil) + (const :tag "From address" t) + (repeat (string :tag "Key ID")))) + +(define-obsolete-variable-alias + 'mml-smime-encrypt-to-self 'mml-secure-smime-encrypt-to-self) +(defcustom mml-secure-smime-encrypt-to-self nil + "List of own key ID(s) or t; determines additional recipients with S/MIME. +If t, also encrypt to key for message sender; if list, encrypt to those keys. +With this variable, you can ensure that you can decrypt your own messages. +Alternatives to this variable include Bcc'ing the message to yourself or +using the encrypt-to option in gpgsm.conf (see man gpgsm(1)). +Note that this variable and the encrypt-to option give away your identity +for *every* encryption without warning, which is not what you want if you are +using, e.g., remailers. +Also, use of Bcc gives away your identity for *every* encryption without +warning, which is a bug, see: +https://debbugs.gnu.org/cgi/bugreport.cgi?bug=18718" + :group 'mime-security + :type '(choice (const :tag "None" nil) + (const :tag "From address" t) + (repeat (string :tag "Key ID")))) + +(define-obsolete-variable-alias + 'mml2015-sign-with-sender 'mml-secure-openpgp-sign-with-sender) +;mml1991-sign-with-sender did never exist. +(defcustom mml-secure-openpgp-sign-with-sender nil + "If t, use message sender to find an OpenPGP key to sign with." + :group 'mime-security + :type 'boolean) + +(define-obsolete-variable-alias + 'mml-smime-sign-with-sender 'mml-secure-smime-sign-with-sender) +(defcustom mml-secure-smime-sign-with-sender nil + "If t, use message sender to find an S/MIME key to sign with." + :group 'mime-security + :type 'boolean) + +(define-obsolete-variable-alias + 'mml2015-always-trust 'mml-secure-openpgp-always-trust) +;mml1991-always-trust did never exist. +(defcustom mml-secure-openpgp-always-trust t + "If t, skip key validation of GnuPG on encryption." + :group 'mime-security + :type 'boolean) + +(defcustom mml-secure-fail-when-key-problem nil + "If t, raise an error if some key is missing or several keys exist. +Otherwise, ask the user." + :group 'mime-security + :type 'boolean) + +(defcustom mml-secure-key-preferences + '((OpenPGP (sign) (encrypt)) (CMS (sign) (encrypt))) + "Protocol- and usage-specific fingerprints of preferred keys. +This variable is only relevant if a recipient owns multiple key pairs (for +encryption) or you own multiple key pairs (for signing). In such cases, +you will be asked which key(s) should be used, and your choice can be +customized in this variable." + :group 'mime-security + :type '(alist :key-type (symbol :tag "Protocol") :value-type + (alist :key-type (symbol :tag "Usage") :value-type + (alist :key-type (string :tag "Name") :value-type + (repeat (string :tag "Fingerprint")))))) + +(defun mml-secure-cust-usage-lookup (context usage) + "Return preferences for CONTEXT and USAGE." + (let* ((protocol (epg-context-protocol context)) + (protocol-prefs (cdr (assoc protocol mml-secure-key-preferences)))) + (assoc usage protocol-prefs))) + +(defun mml-secure-cust-fpr-lookup (context usage name) + "Return fingerprints of preferred keys for CONTEXT, USAGE, and NAME." + (let* ((usage-prefs (mml-secure-cust-usage-lookup context usage)) + (fprs (assoc name (cdr usage-prefs)))) + (when fprs + (cdr fprs)))) + +(defun mml-secure-cust-record-keys (context usage name keys &optional save) + "For CONTEXT, USAGE, and NAME record fingerprint(s) of KEYS. +If optional SAVE is not nil, save customized fingerprints. +Return keys." + (assert keys) + (let* ((usage-prefs (mml-secure-cust-usage-lookup context usage)) + (curr-fprs (cdr (assoc name (cdr usage-prefs)))) + (key-fprs (mapcar 'mml-secure-fingerprint keys)) + (new-fprs (gnus-union curr-fprs key-fprs :test 'equal))) + (if curr-fprs + (setcdr (assoc name (cdr usage-prefs)) new-fprs) + (setcdr usage-prefs (cons (cons name new-fprs) (cdr usage-prefs)))) + (when save + (customize-save-variable + 'mml-secure-key-preferences mml-secure-key-preferences)) + keys)) + +(defun mml-secure-cust-remove-keys (context usage name) + "Remove keys for CONTEXT, USAGE, and NAME. +Return t if a customization for NAME was present (and has been removed)." + (let* ((usage-prefs (mml-secure-cust-usage-lookup context usage)) + (current (assoc name usage-prefs))) + (when current + (setcdr usage-prefs (remove current (cdr usage-prefs))) + t))) + +(defvar mml-secure-secret-key-id-list nil) + +(defun mml-secure-add-secret-key-id (key-id) + "Record KEY-ID in list of secret keys." + (add-to-list 'mml-secure-secret-key-id-list key-id)) + +(defun mml-secure-clear-secret-key-id-list () + "Remove passwords from cache and clear list of secret keys." + ;; Loosely based on code inside mml2015-epg-encrypt, + ;; mml2015-epg-clear-decrypt, and mml2015-epg-decrypt + (dolist (key-id mml-secure-secret-key-id-list nil) + (password-cache-remove key-id)) + (setq mml-secure-secret-key-id-list nil)) + +(defvar mml1991-cache-passphrase) +(defvar mml1991-passphrase-cache-expiry) + +(defun mml-secure-cache-passphrase-p (protocol) + "Return t if OpenPGP or S/MIME passphrases should be cached for PROTOCOL. +Passphrase caching in Emacs is NOT recommended. Use gpg-agent instead." + (or (and (eq 'OpenPGP protocol) + (or mml-secure-cache-passphrase + (and (boundp 'mml2015-cache-passphrase) + mml2015-cache-passphrase) + (and (boundp 'mml1991-cache-passphrase) + mml1991-cache-passphrase))) + (and (eq 'CMS protocol) + (or mml-secure-cache-passphrase + (and (boundp 'mml-smime-cache-passphrase) + mml-smime-cache-passphrase))))) + +(defun mml-secure-cache-expiry-interval (protocol) + "Return time in seconds to cache passphrases for PROTOCOL. +Passphrase caching in Emacs is NOT recommended. Use gpg-agent instead." + (or (and (eq 'OpenPGP protocol) + (or (and (boundp 'mml2015-passphrase-cache-expiry) + mml2015-passphrase-cache-expiry) + (and (boundp 'mml1991-passphrase-cache-expiry) + mml1991-passphrase-cache-expiry) + mml-secure-passphrase-cache-expiry)) + (and (eq 'CMS protocol) + (or (and (boundp 'mml-smime-passphrase-cache-expiry) + mml-smime-passphrase-cache-expiry) + mml-secure-passphrase-cache-expiry)))) + +(defun mml-secure-passphrase-callback (context key-id standard) + "Ask for passphrase in CONTEXT for KEY-ID for STANDARD. +The passphrase is read and cached." + ;; Based on mml2015-epg-passphrase-callback. + (if (eq key-id 'SYM) + (epg-passphrase-callback-function context key-id nil) + (let* ((password-cache-key-id + (if (eq key-id 'PIN) + "PIN" + key-id)) + (entry (assoc key-id epg-user-id-alist)) + (passphrase + (password-read + (if (eq key-id 'PIN) + "Passphrase for PIN: " + (if entry + (format "Passphrase for %s %s: " key-id (cdr entry)) + (format "Passphrase for %s: " key-id))) + ;; TODO: With mml-smime.el, password-cache-key-id is not passed + ;; as argument to password-read. + ;; Is that on purpose? If so, the following needs to be placed + ;; inside an if statement. + password-cache-key-id))) + (when passphrase + (let ((password-cache-expiry (mml-secure-cache-expiry-interval + (epg-context-protocol context)))) + (password-cache-add password-cache-key-id passphrase)) + (mml-secure-add-secret-key-id password-cache-key-id) + (copy-sequence passphrase))))) + +(defun mml-secure-check-user-id (key recipient) + "Check whether KEY has a non-revoked, non-expired UID for RECIPIENT." + ;; Based on mml2015-epg-check-user-id. + (let ((uids (epg-key-user-id-list key))) + (catch 'break + (dolist (uid uids nil) + (if (and (stringp (epg-user-id-string uid)) + (equal (car (mail-header-parse-address + (epg-user-id-string uid))) + (car (mail-header-parse-address + recipient))) + (not (memq (epg-user-id-validity uid) + '(revoked expired)))) + (throw 'break t)))))) + +(defun mml-secure-secret-key-exists-p (context subkey) + "Return t if keyring for CONTEXT contains secret key for public SUBKEY." + (let* ((fpr (epg-sub-key-fingerprint subkey)) + (candidates (epg-list-keys context fpr 'secret)) + (candno (length candidates))) + ;; If two or more subkeys with the same fingerprint exist, something is + ;; terribly wrong. + (when (>= candno 2) + (error "Found %d secret keys with same fingerprint %s" candno fpr)) + (= 1 candno))) + +(defun mml-secure-check-sub-key (context key usage &optional fingerprint) + "Check whether in CONTEXT the public KEY has a usable subkey for USAGE. +This is the case if KEY is not disabled, and there is a subkey for +USAGE that is neither revoked nor expired. Additionally, if optional +FINGERPRINT is present and if it is not the primary key's fingerprint, then +the returned subkey must have that FINGERPRINT. FINGERPRINT must consist of +hexadecimal digits only (no leading \"0x\" allowed). +If USAGE is not `encrypt', then additionally an appropriate secret key must +be present in the keyring." + ;; Based on mml2015-epg-check-sub-key, extended by + ;; - check for secret keys if usage is not 'encrypt and + ;; - check for new argument FINGERPRINT. + (let* ((subkeys (epg-key-sub-key-list key)) + (primary (car subkeys)) + (fpr (epg-sub-key-fingerprint primary))) + ;; The primary key will be marked as disabled, when the entire + ;; key is disabled (see 12 Field, Format of colon listings, in + ;; gnupg/doc/DETAILS) + (unless (memq 'disabled (epg-sub-key-capability primary)) + (catch 'break + (dolist (subkey subkeys nil) + (if (and (memq usage (epg-sub-key-capability subkey)) + (not (memq (epg-sub-key-validity subkey) + '(revoked expired))) + (or (eq 'encrypt usage) ; Encryption works with public key. + ;; In contrast, signing requires secret key. + (mml-secure-secret-key-exists-p context subkey)) + (or (not fingerprint) + (gnus-string-match-p (concat fingerprint "$") fpr) + (gnus-string-match-p (concat fingerprint "$") + (epg-sub-key-fingerprint subkey)))) + (throw 'break t))))))) + +(defun mml-secure-find-usable-keys (context name usage &optional justone) + "In CONTEXT return a list of keys for NAME and USAGE. +If USAGE is `encrypt' public keys are returned, otherwise secret ones. +Only non-revoked and non-expired keys are returned whose primary key is +not disabled. +NAME can be an e-mail address or a key ID. +If NAME just consists of hexadecimal digits (possibly prefixed by \"0x\"), it +is treated as key ID for which at most one key must exist in the keyring. +Otherwise, NAME is treated as user ID, for which no keys are returned if it +is expired or revoked. +If optional JUSTONE is not nil, return the first key instead of a list." + (let* ((keys (epg-list-keys context name)) + (iskeyid (string-match "\\(0x\\)?\\([0-9a-fA-F]\\{8,\\}\\)" name)) + (fingerprint (match-string 2 name)) + result) + (when (and iskeyid (>= (length keys) 2)) + (error + "Name %s (for %s) looks like a key ID but multiple keys found" + name usage)) + (catch 'break + (dolist (key keys result) + (if (and (or iskeyid + (mml-secure-check-user-id key name)) + (mml-secure-check-sub-key context key usage fingerprint)) + (if justone + (throw 'break key) + (push key result))))))) + +(defun mml-secure-select-preferred-keys (context names usage) + "Return list of preferred keys in CONTEXT for NAMES and USAGE. +This inspects the keyrings to find keys for each name in NAMES. If several +keys are found for a name, `mml-secure-select-keys' is used to look for +customized preferences or have the user select preferable ones. +When `mml-secure-fail-when-key-problem' is t, fail with an error in +case of missing, outdated, or multiple keys." + ;; Loosely based on code appearing inside mml2015-epg-sign and + ;; mml2015-epg-encrypt. + (apply + #'nconc + (mapcar + (lambda (name) + (let* ((keys (mml-secure-find-usable-keys context name usage)) + (keyno (length keys))) + (cond ((= 0 keyno) + (when (or mml-secure-fail-when-key-problem + (not (y-or-n-p + (format "No %s key for %s; skip it? " + usage name)))) + (error "No %s key for %s" usage name))) + ((= 1 keyno) keys) + (t (mml-secure-select-keys context name keys usage))))) + names))) + +(defun mml-secure-fingerprint (key) + "Return fingerprint for public KEY." + (epg-sub-key-fingerprint (car (epg-key-sub-key-list key)))) + +(defun mml-secure-filter-keys (keys fprs) + "Filter KEYS to subset with fingerprints in FPRS." + (when keys + (if (member (mml-secure-fingerprint (car keys)) fprs) + (cons (car keys) (mml-secure-filter-keys (cdr keys) fprs)) + (mml-secure-filter-keys (cdr keys) fprs)))) + +(defun mml-secure-normalize-cust-name (name) + "Normalize NAME to be used for customization. +Currently, remove ankle brackets." + (if (string-match "^<\\(.*\\)>$" name) + (match-string 1 name) + name)) + +(defun mml-secure-select-keys (context name keys usage) + "In CONTEXT for NAME select among KEYS for USAGE. +KEYS should be a list with multiple entries. +NAME is normalized first as customized keys are inspected. +When `mml-secure-fail-when-key-problem' is t, fail with an error in case of +outdated or multiple keys." + (let* ((nname (mml-secure-normalize-cust-name name)) + (fprs (mml-secure-cust-fpr-lookup context usage nname)) + (usable-fprs (mapcar 'mml-secure-fingerprint keys))) + (if fprs + (if (gnus-subsetp fprs usable-fprs) + (mml-secure-filter-keys keys fprs) + (mml-secure-cust-remove-keys context usage nname) + (let ((diff (gnus-setdiff fprs usable-fprs))) + (if mml-secure-fail-when-key-problem + (error "Customization of %s keys for %s outdated" usage nname) + (mml-secure-select-keys-1 + context nname keys usage (format "\ +Customized keys + (%s) +for %s not available any more. +Select anew. " + diff nname))))) + (if mml-secure-fail-when-key-problem + (error "Multiple %s keys for %s" usage nname) + (mml-secure-select-keys-1 + context nname keys usage (format "\ +Multiple %s keys for: + %s +Select preferred one(s). " + usage nname)))))) + +(defun mml-secure-select-keys-1 (context name keys usage message) + "In CONTEXT for NAME let user select among KEYS for USAGE, showing MESSAGE. +Return selected keys." + (let* ((selected (epa--select-keys message keys)) + (selno (length selected)) + ;; TODO: y-or-n-p does not always resize the echo area but may + ;; truncate the message. Why? The following does not help. + ;; yes-or-no-p shows full message, though. + (message-truncate-lines nil)) + (if selected + (if (y-or-n-p + (format "%d %s key(s) selected. Store for %s? " + selno usage name)) + (mml-secure-cust-record-keys context usage name selected 'save) + selected) + (unless (y-or-n-p + (format "No %s key for %s; skip it? " usage name)) + (error "No %s key for %s" usage name))))) + +(defun mml-secure-signer-names (protocol sender) + "Determine signer names for PROTOCOL and message from SENDER. +Returned names may be e-mail addresses or key IDs and are determined based +on `mml-secure-openpgp-signers' and `mml-secure-openpgp-sign-with-sender' with +OpenPGP or `mml-secure-smime-signers' and `mml-secure-smime-sign-with-sender' +with S/MIME." + (if (eq 'OpenPGP protocol) + (append mml-secure-openpgp-signers + (if (and mml-secure-openpgp-sign-with-sender sender) + (list (concat "<" sender ">")))) + (append mml-secure-smime-signers + (if (and mml-secure-smime-sign-with-sender sender) + (list (concat "<" sender ">")))))) + +(defun mml-secure-signers (context signer-names) + "Determine signing keys in CONTEXT from SIGNER-NAMES. +If `mm-sign-option' is `guided', the user is asked to choose. +Otherwise, `mml-secure-select-preferred-keys' is used." + ;; Based on code appearing inside mml2015-epg-sign and + ;; mml2015-epg-encrypt. + (if (eq mm-sign-option 'guided) + (epa-select-keys context "\ +Select keys for signing. +If no one is selected, default secret key is used. " + signer-names t) + (mml-secure-select-preferred-keys context signer-names 'sign))) + +(defun mml-secure-self-recipients (protocol sender) + "Determine additional recipients based on encrypt-to-self variables. +PROTOCOL specifies OpenPGP or S/MIME for a message from SENDER." + (let ((encrypt-to-self + (if (eq 'OpenPGP protocol) + mml-secure-openpgp-encrypt-to-self + mml-secure-smime-encrypt-to-self))) + (when encrypt-to-self + (if (listp encrypt-to-self) + encrypt-to-self + (list sender))))) + +(defun mml-secure-recipients (protocol context config sender) + "Determine encryption recipients. +PROTOCOL specifies OpenPGP or S/MIME with matching CONTEXT and CONFIG +for a message from SENDER." + ;; Based on code appearing inside mml2015-epg-encrypt. + (let ((recipients + (apply #'nconc + (mapcar + (lambda (recipient) + (or (epg-expand-group config recipient) + (list (concat "<" recipient ">")))) + (split-string + (or (message-options-get 'message-recipients) + (message-options-set 'message-recipients + (read-string "Recipients: "))) + "[ \f\t\n\r\v,]+"))))) + (nconc recipients (mml-secure-self-recipients protocol sender)) + (if (eq mm-encrypt-option 'guided) + (setq recipients + (epa-select-keys context "\ +Select recipients for encryption. +If no one is selected, symmetric encryption will be performed. " + recipients)) + (setq recipients + (mml-secure-select-preferred-keys context recipients 'encrypt)) + (unless recipients + (error "No recipient specified"))) + recipients)) + +(defun mml-secure-epg-encrypt (protocol cont &optional sign) + ;; Based on code appearing inside mml2015-epg-encrypt. + (let* ((context (epg-make-context protocol)) + (config (epg-configuration)) + (sender (message-options-get 'message-sender)) + (recipients (mml-secure-recipients protocol context config sender)) + (signer-names (mml-secure-signer-names protocol sender)) + cipher signers) + (when sign + (setq signers (mml-secure-signers context signer-names)) + (epg-context-set-signers context signers)) + (when (eq 'OpenPGP protocol) + (epg-context-set-armor context t) + (epg-context-set-textmode context t)) + (when (mml-secure-cache-passphrase-p protocol) + (epg-context-set-passphrase-callback + context + (cons 'mml-secure-passphrase-callback protocol))) + (condition-case error + (setq cipher + (if (eq 'OpenPGP protocol) + (epg-encrypt-string context (buffer-string) recipients sign + mml-secure-openpgp-always-trust) + (epg-encrypt-string context (buffer-string) recipients)) + mml-secure-secret-key-id-list nil) + (error + (mml-secure-clear-secret-key-id-list) + (signal (car error) (cdr error)))) + cipher)) + +(defun mml-secure-epg-sign (protocol mode) + ;; Based on code appearing inside mml2015-epg-sign. + (let* ((context (epg-make-context protocol)) + (sender (message-options-get 'message-sender)) + (signer-names (mml-secure-signer-names protocol sender)) + (signers (mml-secure-signers context signer-names)) + signature micalg) + (when (eq 'OpenPGP protocol) + (epg-context-set-armor context t) + (epg-context-set-textmode context t)) + (epg-context-set-signers context signers) + (when (mml-secure-cache-passphrase-p protocol) + (epg-context-set-passphrase-callback + context + (cons 'mml-secure-passphrase-callback protocol))) + (condition-case error + (setq signature + (if (eq 'OpenPGP protocol) + (epg-sign-string context (buffer-string) mode) + (epg-sign-string context + (mm-replace-in-string (buffer-string) + "\n" "\r\n") t)) + mml-secure-secret-key-id-list nil) + (error + (mml-secure-clear-secret-key-id-list) + (signal (car error) (cdr error)))) + (if (epg-context-result-for context 'sign) + (setq micalg (epg-new-signature-digest-algorithm + (car (epg-context-result-for context 'sign))))) + (cons signature micalg))) + (provide 'mml-sec) ;;; mml-sec.el ends here diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el index b19c9e8..a40595e 100644 --- a/lisp/gnus/mml-smime.el +++ b/lisp/gnus/mml-smime.el @@ -32,9 +32,17 @@ (autoload 'message-narrow-to-headers "message") (autoload 'message-fetch-field "message") +;; Prefer epg over openssl if it is available as epg uses GnuPG's gpgsm, +;; which features full-fledged certificate management, while openssl requires +;; major manual efforts for certificate revocation and expiry and has bugs +;; as documented under man smime(1). +(ignore-errors (require 'epg)) + (defcustom mml-smime-use (if (featurep 'epg) 'epg 'openssl) - "Whether to use OpenSSL or EPG to decrypt S/MIME messages. -Defaults to EPG if it's loaded." + "Whether to use OpenSSL or EasyPG (EPG) to handle S/MIME messages. +Defaults to EPG if it's available. +If you think about using OpenSSL, please read the BUGS section in the manual +for the `smime' command coming with OpenSSL first. EasyPG is recommended." :group 'mime-security :type '(choice (const :tag "EPG" epg) (const :tag "OpenSSL" openssl))) @@ -57,6 +65,9 @@ Defaults to EPG if it's loaded." "If t, cache passphrase." :group 'mime-security :type 'boolean) +(make-obsolete-variable 'mml-smime-cache-passphrase + 'mml-secure-cache-passphrase + "25.1") (defcustom mml-smime-passphrase-cache-expiry mml-secure-passphrase-cache-expiry "How many seconds the passphrase is cached. @@ -64,6 +75,9 @@ Whether the passphrase is cached at all is controlled by `mml-smime-cache-passphrase'." :group 'mime-security :type 'integer) +(make-obsolete-variable 'mml-smime-passphrase-cache-expiry + 'mml-secure-passphrase-cache-expiry + "25.1") (defcustom mml-smime-signers nil "A list of your own key ID which will be used to sign a message." @@ -202,7 +216,7 @@ Whether the passphrase is cached at all is controlled by ""))))) (if (setq cert (smime-cert-by-dns who)) (setq result (list 'certfile (buffer-name cert))) - (setq bad (gnus-format-message "`%s' not found. " who)))) + (setq bad (format "`%s' not found. " who)))) (quit)) result)) @@ -221,7 +235,7 @@ Whether the passphrase is cached at all is controlled by ""))))) (if (setq cert (smime-cert-by-ldap who)) (setq result (list 'certfile (buffer-name cert))) - (setq bad (gnus-format-message "`%s' not found. " who)))) + (setq bad (format "`%s' not found. " who)))) (quit)) result)) @@ -317,82 +331,28 @@ Whether the passphrase is cached at all is controlled by (defvar inhibit-redisplay) (defvar password-cache-expiry) -(autoload 'epg-make-context "epg") -(autoload 'epg-passphrase-callback-function "epg") -(declare-function epg-context-set-signers "epg" (context signers)) -(declare-function epg-context-result-for "epg" (context name)) -(declare-function epg-new-signature-digest-algorithm "epg" (cl-x) t) -(declare-function epg-verify-result-to-string "epg" (verify-result)) -(declare-function epg-list-keys "epg" (context &optional name mode)) -(declare-function epg-verify-string "epg" - (context signature &optional signed-text)) -(declare-function epg-sign-string "epg" (context plain &optional mode)) -(declare-function epg-encrypt-string "epg" - (context plain recipients &optional sign always-trust)) -(declare-function epg-context-set-passphrase-callback "epg" - (context passphrase-callback)) -(declare-function epg-sub-key-fingerprint "epg" (cl-x) t) -(declare-function epg-configuration "epg-config" ()) -(declare-function epg-expand-group "epg-config" (config group)) -(declare-function epa-select-keys "epa" - (context prompt &optional names secret)) - -(defvar mml-smime-epg-secret-key-id-list nil) - -(defun mml-smime-epg-passphrase-callback (context key-id ignore) - (if (eq key-id 'SYM) - (epg-passphrase-callback-function context key-id nil) - (let* (entry - (passphrase - (password-read - (if (eq key-id 'PIN) - "Passphrase for PIN: " - (if (setq entry (assoc key-id epg-user-id-alist)) - (format "Passphrase for %s %s: " key-id (cdr entry)) - (format "Passphrase for %s: " key-id))) - (if (eq key-id 'PIN) - "PIN" - key-id)))) - (when passphrase - (let ((password-cache-expiry mml-smime-passphrase-cache-expiry)) - (password-cache-add key-id passphrase)) - (setq mml-smime-epg-secret-key-id-list - (cons key-id mml-smime-epg-secret-key-id-list)) - (copy-sequence passphrase))))) - -(declare-function epg-key-sub-key-list "epg" (key) t) -(declare-function epg-sub-key-capability "epg" (sub-key) t) -(declare-function epg-sub-key-validity "epg" (sub-key) t) - -(defun mml-smime-epg-find-usable-key (keys usage) - (catch 'found - (while keys - (let ((pointer (epg-key-sub-key-list (car keys)))) - (while pointer - (if (and (memq usage (epg-sub-key-capability (car pointer))) - (not (memq (epg-sub-key-validity (car pointer)) - '(revoked expired)))) - (throw 'found (car keys))) - (setq pointer (cdr pointer)))) - (setq keys (cdr keys))))) - -;; XXX: since gpg --list-secret-keys does not return validity of each -;; key, `mml-smime-epg-find-usable-key' defined above is not enough for -;; secret keys. The function `mml-smime-epg-find-usable-secret-key' -;; below looks at appropriate public keys to check usability. -(defun mml-smime-epg-find-usable-secret-key (context name usage) - (let ((secret-keys (epg-list-keys context name t)) - secret-key) - (while (and (not secret-key) secret-keys) - (if (mml-smime-epg-find-usable-key - (epg-list-keys context (epg-sub-key-fingerprint - (car (epg-key-sub-key-list - (car secret-keys))))) - usage) - (setq secret-key (car secret-keys) - secret-keys nil) - (setq secret-keys (cdr secret-keys)))) - secret-key)) +(eval-when-compile + (autoload 'epg-make-context "epg") + (autoload 'epg-context-set-armor "epg") + (autoload 'epg-context-set-signers "epg") + (autoload 'epg-context-result-for "epg") + (autoload 'epg-new-signature-digest-algorithm "epg") + (autoload 'epg-verify-result-to-string "epg") + (autoload 'epg-list-keys "epg") + (autoload 'epg-decrypt-string "epg") + (autoload 'epg-verify-string "epg") + (autoload 'epg-sign-string "epg") + (autoload 'epg-encrypt-string "epg") + (autoload 'epg-passphrase-callback-function "epg") + (autoload 'epg-context-set-passphrase-callback "epg") + (autoload 'epg-sub-key-fingerprint "epg") + (autoload 'epg-configuration "epg-config") + (autoload 'epg-expand-group "epg-config") + (autoload 'epa-select-keys "epa")) + +(declare-function epg-key-sub-key-list "ext:epg" (key)) +(declare-function epg-sub-key-capability "ext:epg" (sub-key)) +(declare-function epg-sub-key-validity "ext:epg" (sub-key)) (autoload 'mml-compute-boundary "mml") @@ -401,146 +361,37 @@ Whether the passphrase is cached at all is controlled by (declare-function message-options-set "message" (symbol value)) (defun mml-smime-epg-sign (cont) - (let* ((inhibit-redisplay t) - (context (epg-make-context 'CMS)) - (boundary (mml-compute-boundary cont)) - (sender (message-options-get 'message-sender)) - (signer-names (or mml-smime-signers - (if (and mml-smime-sign-with-sender sender) - (list (concat "<" sender ">"))))) - signer-key - (signers - (or (message-options-get 'mml-smime-epg-signers) - (message-options-set - 'mml-smime-epg-signers - (if (eq mm-sign-option 'guided) - (epa-select-keys context "\ -Select keys for signing. -If no one is selected, default secret key is used. " - signer-names - t) - (if (or sender mml-smime-signers) - (delq nil - (mapcar - (lambda (signer) - (setq signer-key - (mml-smime-epg-find-usable-secret-key - context signer 'sign)) - (unless (or signer-key - (y-or-n-p - (format - "No secret key for %s; skip it? " - signer))) - (error "No secret key for %s" signer)) - signer-key) - signer-names))))))) - signature micalg) - (epg-context-set-signers context signers) - (if mml-smime-cache-passphrase - (epg-context-set-passphrase-callback - context - #'mml-smime-epg-passphrase-callback)) - (condition-case error - (setq signature (epg-sign-string context - (mm-replace-in-string (buffer-string) - "\n" "\r\n") - t) - mml-smime-epg-secret-key-id-list nil) - (error - (while mml-smime-epg-secret-key-id-list - (password-cache-remove (car mml-smime-epg-secret-key-id-list)) - (setq mml-smime-epg-secret-key-id-list - (cdr mml-smime-epg-secret-key-id-list))) - (signal (car error) (cdr error)))) - (if (epg-context-result-for context 'sign) - (setq micalg (epg-new-signature-digest-algorithm - (car (epg-context-result-for context 'sign))))) + (let ((inhibit-redisplay t) + (boundary (mml-compute-boundary cont))) (goto-char (point-min)) - (insert (format "Content-Type: multipart/signed; boundary=\"%s\";\n" - boundary)) - (if micalg - (insert (format "\tmicalg=%s; " - (downcase - (cdr (assq micalg - epg-digest-algorithm-alist)))))) - (insert "protocol=\"application/pkcs7-signature\"\n") - (insert (format "\n--%s\n" boundary)) - (goto-char (point-max)) - (insert (format "\n--%s\n" boundary)) - (insert "Content-Type: application/pkcs7-signature; name=smime.p7s + (let* ((pair (mml-secure-epg-sign 'CMS cont)) + (signature (car pair)) + (micalg (cdr pair))) + (insert (format "Content-Type: multipart/signed; boundary=\"%s\";\n" + boundary)) + (if micalg + (insert (format "\tmicalg=%s; " + (downcase + (cdr (assq micalg + epg-digest-algorithm-alist)))))) + (insert "protocol=\"application/pkcs7-signature\"\n") + (insert (format "\n--%s\n" boundary)) + (goto-char (point-max)) + (insert (format "\n--%s\n" boundary)) + (insert "Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=smime.p7s ") - (insert (base64-encode-string signature) "\n") - (goto-char (point-max)) - (insert (format "--%s--\n" boundary)) - (goto-char (point-max)))) + (insert (base64-encode-string signature) "\n") + (goto-char (point-max)) + (insert (format "--%s--\n" boundary)) + (goto-char (point-max))))) (defun mml-smime-epg-encrypt (cont) (let* ((inhibit-redisplay t) - (context (epg-make-context 'CMS)) - (config (epg-configuration)) - (recipients (message-options-get 'mml-smime-epg-recipients)) - cipher signers - (sender (message-options-get 'message-sender)) - (signer-names (or mml-smime-signers - (if (and mml-smime-sign-with-sender sender) - (list (concat "<" sender ">"))))) (boundary (mml-compute-boundary cont)) - recipient-key) - (unless recipients - (setq recipients - (apply #'nconc - (mapcar - (lambda (recipient) - (or (epg-expand-group config recipient) - (list recipient))) - (split-string - (or (message-options-get 'message-recipients) - (message-options-set 'message-recipients - (read-string "Recipients: "))) - "[ \f\t\n\r\v,]+")))) - (when mml-smime-encrypt-to-self - (unless signer-names - (error "Neither message sender nor mml-smime-signers are set")) - (setq recipients (nconc recipients signer-names))) - (if (eq mm-encrypt-option 'guided) - (setq recipients - (epa-select-keys context "\ -Select recipients for encryption. -If no one is selected, symmetric encryption will be performed. " - recipients)) - (setq recipients - (mapcar - (lambda (recipient) - (setq recipient-key (mml-smime-epg-find-usable-key - (epg-list-keys context recipient) - 'encrypt)) - (unless (or recipient-key - (y-or-n-p - (format "No public key for %s; skip it? " - recipient))) - (error "No public key for %s" recipient)) - recipient-key) - recipients)) - (unless recipients - (error "No recipient specified"))) - (message-options-set 'mml-smime-epg-recipients recipients)) - (if mml-smime-cache-passphrase - (epg-context-set-passphrase-callback - context - #'mml-smime-epg-passphrase-callback)) - (condition-case error - (setq cipher - (epg-encrypt-string context (buffer-string) recipients) - mml-smime-epg-secret-key-id-list nil) - (error - (while mml-smime-epg-secret-key-id-list - (password-cache-remove (car mml-smime-epg-secret-key-id-list)) - (setq mml-smime-epg-secret-key-id-list - (cdr mml-smime-epg-secret-key-id-list))) - (signal (car error) (cdr error)))) + (cipher (mml-secure-epg-encrypt 'CMS cont))) (delete-region (point-min) (point-max)) (goto-char (point-min)) (insert "\ diff --git a/lisp/gnus/mml1991.el b/lisp/gnus/mml1991.el index 6469636..bb5c940 100644 --- a/lisp/gnus/mml1991.el +++ b/lisp/gnus/mml1991.el @@ -63,11 +63,17 @@ (defvar mml1991-cache-passphrase mml-secure-cache-passphrase "If t, cache passphrase.") +(make-obsolete-variable 'mml1991-cache-passphrase + 'mml-secure-cache-passphrase + "25.1") (defvar mml1991-passphrase-cache-expiry mml-secure-passphrase-cache-expiry "How many seconds the passphrase is cached. Whether the passphrase is cached at all is controlled by `mml1991-cache-passphrase'.") +(make-obsolete-variable 'mml1991-passphrase-cache-expiry + 'mml-secure-passphrase-cache-expiry + "25.1") (defvar mml1991-signers nil "A list of your own key ID which will be used to sign a message.") @@ -75,6 +81,7 @@ Whether the passphrase is cached at all is controlled by (defvar mml1991-encrypt-to-self nil "If t, add your own key ID to recipient list when encryption.") + ;;; mailcrypt wrapper (autoload 'mc-sign-generic "mc-toplev") @@ -255,91 +262,9 @@ Whether the passphrase is cached at all is controlled by (autoload 'epg-configuration "epg-config") (autoload 'epg-expand-group "epg-config") -(defvar mml1991-epg-secret-key-id-list nil) - -(defun mml1991-epg-passphrase-callback (context key-id ignore) - (if (eq key-id 'SYM) - (epg-passphrase-callback-function context key-id nil) - (let* ((entry (assoc key-id epg-user-id-alist)) - (passphrase - (password-read - (format "GnuPG passphrase for %s: " - (if entry - (cdr entry) - key-id)) - (if (eq key-id 'PIN) - "PIN" - key-id)))) - (when passphrase - (let ((password-cache-expiry mml1991-passphrase-cache-expiry)) - (password-cache-add key-id passphrase)) - (setq mml1991-epg-secret-key-id-list - (cons key-id mml1991-epg-secret-key-id-list)) - (copy-sequence passphrase))))) - -(defun mml1991-epg-find-usable-key (keys usage) - (catch 'found - (while keys - (let ((pointer (epg-key-sub-key-list (car keys)))) - ;; The primary key will be marked as disabled, when the entire - ;; key is disabled (see 12 Field, Format of colon listings, in - ;; gnupg/doc/DETAILS) - (unless (memq 'disabled (epg-sub-key-capability (car pointer))) - (while pointer - (if (and (memq usage (epg-sub-key-capability (car pointer))) - (not (memq (epg-sub-key-validity (car pointer)) - '(revoked expired)))) - (throw 'found (car keys))) - (setq pointer (cdr pointer))))) - (setq keys (cdr keys))))) - -;; XXX: since gpg --list-secret-keys does not return validity of each -;; key, `mml1991-epg-find-usable-key' defined above is not enough for -;; secret keys. The function `mml1991-epg-find-usable-secret-key' -;; below looks at appropriate public keys to check usability. -(defun mml1991-epg-find-usable-secret-key (context name usage) - (let ((secret-keys (epg-list-keys context name t)) - secret-key) - (while (and (not secret-key) secret-keys) - (if (mml1991-epg-find-usable-key - (epg-list-keys context (epg-sub-key-fingerprint - (car (epg-key-sub-key-list - (car secret-keys))))) - usage) - (setq secret-key (car secret-keys) - secret-keys nil) - (setq secret-keys (cdr secret-keys)))) - secret-key)) - (defun mml1991-epg-sign (cont) - (let ((context (epg-make-context)) - headers cte signer-key signers signature) - (if (eq mm-sign-option 'guided) - (setq signers (epa-select-keys context "Select keys for signing. -If no one is selected, default secret key is used. " - mml1991-signers t)) - (if mml1991-signers - (setq signers (delq nil - (mapcar - (lambda (name) - (setq signer-key - (mml1991-epg-find-usable-secret-key - context name 'sign)) - (unless (or signer-key - (y-or-n-p - (format - "No secret key for %s; skip it? " - name))) - (error "No secret key for %s" name)) - signer-key) - mml1991-signers))))) - (epg-context-set-armor context t) - (epg-context-set-textmode context t) - (epg-context-set-signers context signers) - (if mml1991-cache-passphrase - (epg-context-set-passphrase-callback - context - #'mml1991-epg-passphrase-callback)) + (let ((inhibit-redisplay t) + headers cte) ;; Don't sign headers. (goto-char (point-min)) (when (re-search-forward "^$" nil t) @@ -352,28 +277,21 @@ If no one is selected, default secret key is used. " (when cte (setq cte (intern (downcase cte))) (mm-decode-content-transfer-encoding cte))) - (condition-case error - (setq signature (epg-sign-string context (buffer-string) 'clear) - mml1991-epg-secret-key-id-list nil) - (error - (while mml1991-epg-secret-key-id-list - (password-cache-remove (car mml1991-epg-secret-key-id-list)) - (setq mml1991-epg-secret-key-id-list - (cdr mml1991-epg-secret-key-id-list))) - (signal (car error) (cdr error)))) - (delete-region (point-min) (point-max)) - (mm-with-unibyte-current-buffer - (insert signature) - (goto-char (point-min)) - (while (re-search-forward "\r+$" nil t) - (replace-match "" t t)) - (when cte - (mm-encode-content-transfer-encoding cte)) - (goto-char (point-min)) - (when headers - (insert headers)) - (insert "\n")) - t)) + (let* ((pair (mml-secure-epg-sign 'OpenPGP 'clear)) + (signature (car pair))) + (delete-region (point-min) (point-max)) + (mm-with-unibyte-current-buffer + (insert signature) + (goto-char (point-min)) + (while (re-search-forward "\r+$" nil t) + (replace-match "" t t)) + (when cte + (mm-encode-content-transfer-encoding cte)) + (goto-char (point-min)) + (when headers + (insert headers)) + (insert "\n")) + t))) (defun mml1991-epg-encrypt (cont &optional sign) (goto-char (point-min)) @@ -386,78 +304,7 @@ If no one is selected, default secret key is used. " (delete-region (point-min) (point)) (when cte (mm-decode-content-transfer-encoding (intern (downcase cte)))))) - (let ((context (epg-make-context)) - (recipients - (if (message-options-get 'message-recipients) - (split-string - (message-options-get 'message-recipients) - "[ \f\t\n\r\v,]+"))) - recipient-key signer-key cipher signers config) - (when mml1991-encrypt-to-self - (unless mml1991-signers - (error "mml1991-signers is not set")) - (setq recipients (nconc recipients mml1991-signers))) - ;; We should remove this check if epg-0.0.6 is released. - (if (and (condition-case nil - (require 'epg-config) - (error)) - (functionp #'epg-expand-group)) - (setq config (epg-configuration) - recipients - (apply #'nconc - (mapcar (lambda (recipient) - (or (epg-expand-group config recipient) - (list recipient))) - recipients)))) - (if (eq mm-encrypt-option 'guided) - (setq recipients - (epa-select-keys context "Select recipients for encryption. -If no one is selected, symmetric encryption will be performed. " - recipients)) - (setq recipients - (delq nil (mapcar - (lambda (name) - (setq recipient-key (mml1991-epg-find-usable-key - (epg-list-keys context name) - 'encrypt)) - (unless (or recipient-key - (y-or-n-p - (format "No public key for %s; skip it? " - name))) - (error "No public key for %s" name)) - recipient-key) - recipients))) - (unless recipients - (error "No recipient specified"))) - (when sign - (if (eq mm-sign-option 'guided) - (setq signers (epa-select-keys context "Select keys for signing. -If no one is selected, default secret key is used. " - mml1991-signers t)) - (if mml1991-signers - (setq signers (delq nil - (mapcar - (lambda (name) - (mml1991-epg-find-usable-secret-key - context name 'sign)) - mml1991-signers))))) - (epg-context-set-signers context signers)) - (epg-context-set-armor context t) - (epg-context-set-textmode context t) - (if mml1991-cache-passphrase - (epg-context-set-passphrase-callback - context - #'mml1991-epg-passphrase-callback)) - (condition-case error - (setq cipher - (epg-encrypt-string context (buffer-string) recipients sign) - mml1991-epg-secret-key-id-list nil) - (error - (while mml1991-epg-secret-key-id-list - (password-cache-remove (car mml1991-epg-secret-key-id-list)) - (setq mml1991-epg-secret-key-id-list - (cdr mml1991-epg-secret-key-id-list))) - (signal (car error) (cdr error)))) + (let ((cipher (mml-secure-epg-encrypt 'OpenPGP cont sign))) (delete-region (point-min) (point-max)) (insert "\n" cipher)) t) diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el index 10ba126..e2e9977 100644 --- a/lisp/gnus/mml2015.el +++ b/lisp/gnus/mml2015.el @@ -111,6 +111,9 @@ Valid packages include `epg', `pgg' and `mailcrypt'.") "If t, cache passphrase." :group 'mime-security :type 'boolean) +(make-obsolete-variable 'mml2015-cache-passphrase + 'mml-secure-cache-passphrase + "25.1") (defcustom mml2015-passphrase-cache-expiry mml-secure-passphrase-cache-expiry "How many seconds the passphrase is cached. @@ -118,6 +121,9 @@ Whether the passphrase is cached at all is controlled by `mml2015-cache-passphrase'." :group 'mime-security :type 'integer) +(make-obsolete-variable 'mml2015-passphrase-cache-expiry + 'mml-secure-passphrase-cache-expiry + "25.1") (defcustom mml2015-signers nil "A list of your own key ID(s) which will be used to sign a message. @@ -774,99 +780,6 @@ If set, it overrides the setting of `mml2015-sign-with-sender'." (autoload 'epg-expand-group "epg-config") (autoload 'epa-select-keys "epa") -(defvar mml2015-epg-secret-key-id-list nil) - -(defun mml2015-epg-passphrase-callback (context key-id ignore) - (if (eq key-id 'SYM) - (epg-passphrase-callback-function context key-id nil) - (let* ((password-cache-key-id - (if (eq key-id 'PIN) - "PIN" - key-id)) - entry - (passphrase - (password-read - (if (eq key-id 'PIN) - "Passphrase for PIN: " - (if (setq entry (assoc key-id epg-user-id-alist)) - (format "Passphrase for %s %s: " key-id (cdr entry)) - (format "Passphrase for %s: " key-id))) - password-cache-key-id))) - (when passphrase - (let ((password-cache-expiry mml2015-passphrase-cache-expiry)) - (password-cache-add password-cache-key-id passphrase)) - (setq mml2015-epg-secret-key-id-list - (cons password-cache-key-id mml2015-epg-secret-key-id-list)) - (copy-sequence passphrase))))) - -(defun mml2015-epg-check-user-id (key recipient) - (let ((pointer (epg-key-user-id-list key)) - result) - (while pointer - (if (and (equal (car (mail-header-parse-address - (epg-user-id-string (car pointer)))) - (car (mail-header-parse-address - recipient))) - (not (memq (epg-user-id-validity (car pointer)) - '(revoked expired)))) - (setq result t - pointer nil) - (setq pointer (cdr pointer)))) - result)) - -(defun mml2015-epg-check-sub-key (key usage) - (let ((pointer (epg-key-sub-key-list key)) - result) - ;; The primary key will be marked as disabled, when the entire - ;; key is disabled (see 12 Field, Format of colon listings, in - ;; gnupg/doc/DETAILS) - (unless (memq 'disabled (epg-sub-key-capability (car pointer))) - (while pointer - (if (and (memq usage (epg-sub-key-capability (car pointer))) - (not (memq (epg-sub-key-validity (car pointer)) - '(revoked expired)))) - (setq result t - pointer nil) - (setq pointer (cdr pointer))))) - result)) - -(defun mml2015-epg-find-usable-key (context name usage - &optional name-is-key-id) - (let ((keys (epg-list-keys context name)) - key) - (while keys - (if (and (or name-is-key-id - ;; Non email user-id can be supplied through - ;; mml2015-signers if mml2015-encrypt-to-self is set. - ;; Treat it as valid, as it is user's intention. - (not (string-match "\\`<" name)) - (mml2015-epg-check-user-id (car keys) name)) - (mml2015-epg-check-sub-key (car keys) usage)) - (setq key (car keys) - keys nil) - (setq keys (cdr keys)))) - key)) - -;; XXX: since gpg --list-secret-keys does not return validity of each -;; key, `mml2015-epg-find-usable-key' defined above is not enough for -;; secret keys. The function `mml2015-epg-find-usable-secret-key' -;; below looks at appropriate public keys to check usability. -(defun mml2015-epg-find-usable-secret-key (context name usage) - (let ((secret-keys (epg-list-keys context name t)) - secret-key) - (while (and (not secret-key) secret-keys) - (if (mml2015-epg-find-usable-key - context - (epg-sub-key-fingerprint - (car (epg-key-sub-key-list - (car secret-keys)))) - usage - t) - (setq secret-key (car secret-keys) - secret-keys nil) - (setq secret-keys (cdr secret-keys)))) - secret-key)) - (autoload 'gnus-create-image "gnus-ems") (defun mml2015-epg-key-image (key-id) @@ -921,18 +834,15 @@ If set, it overrides the setting of `mml2015-sign-with-sender'." mm-security-handle 'gnus-info "Corrupted") (throw 'error handle)) (setq context (epg-make-context)) - (if mml2015-cache-passphrase + (if (or mml2015-cache-passphrase mml-secure-cache-passphrase) (epg-context-set-passphrase-callback context - #'mml2015-epg-passphrase-callback)) + (cons 'mml-secure-passphrase-callback 'OpenPGP))) (condition-case error (setq plain (epg-decrypt-string context (mm-get-part child)) - mml2015-epg-secret-key-id-list nil) + mml-secure-secret-key-id-list nil) (error - (while mml2015-epg-secret-key-id-list - (password-cache-remove (car mml2015-epg-secret-key-id-list)) - (setq mml2015-epg-secret-key-id-list - (cdr mml2015-epg-secret-key-id-list))) + (mml-secure-clear-secret-key-id-list) (mm-set-handle-multipart-parameter mm-security-handle 'gnus-info "Failed") (if (eq (car error) 'quit) @@ -968,18 +878,15 @@ If set, it overrides the setting of `mml2015-sign-with-sender'." (let ((inhibit-redisplay t) (context (epg-make-context)) plain) - (if mml2015-cache-passphrase + (if (or mml2015-cache-passphrase mml-secure-cache-passphrase) (epg-context-set-passphrase-callback context - #'mml2015-epg-passphrase-callback)) + (cons 'mml-secure-passphrase-callback 'OpenPGP))) (condition-case error (setq plain (epg-decrypt-string context (buffer-string)) - mml2015-epg-secret-key-id-list nil) + mml-secure-secret-key-id-list nil) (error - (while mml2015-epg-secret-key-id-list - (password-cache-remove (car mml2015-epg-secret-key-id-list)) - (setq mml2015-epg-secret-key-id-list - (cdr mml2015-epg-secret-key-id-list))) + (mml-secure-clear-secret-key-id-list) (mm-set-handle-multipart-parameter mm-security-handle 'gnus-info "Failed") (if (eq (car error) 'quit) @@ -1065,176 +972,37 @@ If set, it overrides the setting of `mml2015-sign-with-sender'." (mml2015-extract-cleartext-signature)))) (defun mml2015-epg-sign (cont) - (let* ((inhibit-redisplay t) - (context (epg-make-context)) - (boundary (mml-compute-boundary cont)) - (sender (message-options-get 'message-sender)) - (signer-names (or mml2015-signers - (if (and mml2015-sign-with-sender sender) - (list (concat "<" sender ">"))))) - signer-key - (signers - (or (message-options-get 'mml2015-epg-signers) - (message-options-set - 'mml2015-epg-signers - (if (eq mm-sign-option 'guided) - (epa-select-keys context "\ -Select keys for signing. -If no one is selected, default secret key is used. " - signer-names - t) - (if (or sender mml2015-signers) - (delq nil - (mapcar - (lambda (signer) - (setq signer-key - (mml2015-epg-find-usable-secret-key - context signer 'sign)) - (unless (or signer-key - (y-or-n-p - (format - "No secret key for %s; skip it? " - signer))) - (error "No secret key for %s" signer)) - signer-key) - signer-names))))))) - signature micalg) - (epg-context-set-armor context t) - (epg-context-set-textmode context t) - (epg-context-set-signers context signers) - (if mml2015-cache-passphrase - (epg-context-set-passphrase-callback - context - #'mml2015-epg-passphrase-callback)) + (let ((inhibit-redisplay t) + (boundary (mml-compute-boundary cont))) ;; Signed data must end with a newline (RFC 3156, 5). (goto-char (point-max)) (unless (bolp) (insert "\n")) - (condition-case error - (setq signature (epg-sign-string context (buffer-string) t) - mml2015-epg-secret-key-id-list nil) - (error - (while mml2015-epg-secret-key-id-list - (password-cache-remove (car mml2015-epg-secret-key-id-list)) - (setq mml2015-epg-secret-key-id-list - (cdr mml2015-epg-secret-key-id-list))) - (signal (car error) (cdr error)))) - (if (epg-context-result-for context 'sign) - (setq micalg (epg-new-signature-digest-algorithm - (car (epg-context-result-for context 'sign))))) - (goto-char (point-min)) - (insert (format "Content-Type: multipart/signed; boundary=\"%s\";\n" - boundary)) - (if micalg - (insert (format "\tmicalg=pgp-%s; " - (downcase - (cdr (assq micalg - epg-digest-algorithm-alist)))))) - (insert "protocol=\"application/pgp-signature\"\n") - (insert (format "\n--%s\n" boundary)) - (goto-char (point-max)) - (insert (format "\n--%s\n" boundary)) - (insert "Content-Type: application/pgp-signature; name=\"signature.asc\"\n\n") - (insert signature) - (goto-char (point-max)) - (insert (format "--%s--\n" boundary)) - (goto-char (point-max)))) + (let* ((pair (mml-secure-epg-sign 'OpenPGP t)) + (signature (car pair)) + (micalg (cdr pair))) + (goto-char (point-min)) + (insert (format "Content-Type: multipart/signed; boundary=\"%s\";\n" + boundary)) + (if micalg + (insert (format "\tmicalg=pgp-%s; " + (downcase + (cdr (assq micalg + epg-digest-algorithm-alist)))))) + (insert "protocol=\"application/pgp-signature\"\n") + (insert (format "\n--%s\n" boundary)) + (goto-char (point-max)) + (insert (format "\n--%s\n" boundary)) + (insert "Content-Type: application/pgp-signature; name=\"signature.asc\"\n\n") + (insert signature) + (goto-char (point-max)) + (insert (format "--%s--\n" boundary)) + (goto-char (point-max))))) (defun mml2015-epg-encrypt (cont &optional sign) (let* ((inhibit-redisplay t) - (context (epg-make-context)) (boundary (mml-compute-boundary cont)) - (config (epg-configuration)) - (recipients (message-options-get 'mml2015-epg-recipients)) - cipher - (sender (message-options-get 'message-sender)) - (signer-names (or mml2015-signers - (if (and mml2015-sign-with-sender sender) - (list (concat "<" sender ">"))))) - signers - recipient-key signer-key) - (unless recipients - (setq recipients - (apply #'nconc - (mapcar - (lambda (recipient) - (or (epg-expand-group config recipient) - (list (concat "<" recipient ">")))) - (split-string - (or (message-options-get 'message-recipients) - (message-options-set 'message-recipients - (read-string "Recipients: "))) - "[ \f\t\n\r\v,]+")))) - (when mml2015-encrypt-to-self - (unless signer-names - (error "Neither message sender nor mml2015-signers are set")) - (setq recipients (nconc recipients signer-names))) - (if (eq mm-encrypt-option 'guided) - (setq recipients - (epa-select-keys context "\ -Select recipients for encryption. -If no one is selected, symmetric encryption will be performed. " - recipients)) - (setq recipients - (delq nil - (mapcar - (lambda (recipient) - (setq recipient-key (mml2015-epg-find-usable-key - context recipient 'encrypt)) - (unless (or recipient-key - (y-or-n-p - (format "No public key for %s; skip it? " - recipient))) - (error "No public key for %s" recipient)) - recipient-key) - recipients))) - (unless recipients - (error "No recipient specified"))) - (message-options-set 'mml2015-epg-recipients recipients)) - (when sign - (setq signers - (or (message-options-get 'mml2015-epg-signers) - (message-options-set - 'mml2015-epg-signers - (if (eq mm-sign-option 'guided) - (epa-select-keys context "\ -Select keys for signing. -If no one is selected, default secret key is used. " - signer-names - t) - (if (or sender mml2015-signers) - (delq nil - (mapcar - (lambda (signer) - (setq signer-key - (mml2015-epg-find-usable-secret-key - context signer 'sign)) - (unless (or signer-key - (y-or-n-p - (format - "No secret key for %s; skip it? " - signer))) - (error "No secret key for %s" signer)) - signer-key) - signer-names))))))) - (epg-context-set-signers context signers)) - (epg-context-set-armor context t) - (epg-context-set-textmode context t) - (if mml2015-cache-passphrase - (epg-context-set-passphrase-callback - context - #'mml2015-epg-passphrase-callback)) - (condition-case error - (setq cipher - (epg-encrypt-string context (buffer-string) recipients sign - mml2015-always-trust) - mml2015-epg-secret-key-id-list nil) - (error - (while mml2015-epg-secret-key-id-list - (password-cache-remove (car mml2015-epg-secret-key-id-list)) - (setq mml2015-epg-secret-key-id-list - (cdr mml2015-epg-secret-key-id-list))) - (signal (car error) (cdr error)))) + (cipher (mml-secure-epg-encrypt 'OpenPGP cont sign))) (delete-region (point-min) (point-max)) (goto-char (point-min)) (insert (format "Content-Type: multipart/encrypted; boundary=\"%s\";\n" commit cd19641ed3236c8d51b882f867c58e719782dbfc Author: Paul Eggert Date: Fri Jan 1 01:12:52 2016 -0800 Merge from gnulib This mostly just updates copyright dates of gnulib files. It also updates to the latest version of texinfo.tex. diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog index a0e0a05..e25d48e 100755 --- a/build-aux/gitlog-to-changelog +++ b/build-aux/gitlog-to-changelog @@ -9,7 +9,7 @@ my $VERSION = '2015-06-11 01:03'; # UTC # If you change this file with Emacs, please let the write hook # do its job. Otherwise, update this string manually. -# Copyright (C) 2008-2015 Free Software Foundation, Inc. +# Copyright (C) 2008-2016 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/build-aux/move-if-change b/build-aux/move-if-change index 3cd87a9..cd744a9 100755 --- a/build-aux/move-if-change +++ b/build-aux/move-if-change @@ -8,7 +8,7 @@ VERSION='2012-01-06 07:23'; # UTC # If you change this file with Emacs, please let the write hook # do its job. Otherwise, update this string manually. -# Copyright (C) 2002-2015 Free Software Foundation, Inc. +# Copyright (C) 2002-2016 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/build-aux/snippet/arg-nonnull.h b/build-aux/snippet/arg-nonnull.h index 0d55e2b..584649f 100644 --- a/build-aux/snippet/arg-nonnull.h +++ b/build-aux/snippet/arg-nonnull.h @@ -1,5 +1,5 @@ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published diff --git a/build-aux/snippet/c++defs.h b/build-aux/snippet/c++defs.h index 585b38a..813f2e2 100644 --- a/build-aux/snippet/c++defs.h +++ b/build-aux/snippet/c++defs.h @@ -1,5 +1,5 @@ /* C++ compatible function declaration macros. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published diff --git a/build-aux/snippet/warn-on-use.h b/build-aux/snippet/warn-on-use.h index 90f4985..2948b47 100644 --- a/build-aux/snippet/warn-on-use.h +++ b/build-aux/snippet/warn-on-use.h @@ -1,5 +1,5 @@ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published diff --git a/build-aux/update-copyright b/build-aux/update-copyright index 8cc36e2..40f7b98 100755 --- a/build-aux/update-copyright +++ b/build-aux/update-copyright @@ -5,7 +5,7 @@ eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" ${1+"$@"}' my $VERSION = '2015-01-15.20:53'; # UTC -# Copyright (C) 2009-2015 Free Software Foundation, Inc. +# Copyright (C) 2009-2016 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index 34fd353..f140bba 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2015-12-17.20} +\def\texinfoversion{2015-12-20.12} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -5410,6 +5410,9 @@ end } \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns + % If not much space left on page, start a new page. + \ifdim\pagetotal>0.8\vsize\vfill\eject\fi + % % Grab any single-column material above us. \output = {% % @@ -5467,7 +5470,7 @@ end % since nobody clobbers \vsize.) \global\doublecolumntopgap = \topskip \global\advance\doublecolumntopgap by -1\baselineskip - \global\advance\vsize by -1\doublecolumntopgap + \advance\vsize by -1\doublecolumntopgap \vsize = 2\vsize \topskip=0pt \global\entrylinedepth=0pt\relax @@ -5537,23 +5540,20 @@ end \penalty0 % \output = {% - % Split the last of the double-column material. Leave it on the - % current page, no automatic page break. + % Split the last of the double-column material. \savemarks \balancecolumns % - % If we end up splitting too much material for the current page, - % though, there will be another page break right after this \output - % invocation ends. Having called \balancecolumns once, we do not + % Having called \balancecolumns once, we do not % want to call it again. Therefore, reset \output to its normal - % definition right away. (We hope \balancecolumns will never be - % called on to balance too much material, but if it is, this makes - % the output somewhat more palatable.) + % definition right away. \global\output = {\onepageout{\pagecontents\PAGE}}% }% \eject \endgroup % started in \begindoublecolumns \restoremarks + % Leave the double-column material on the current page, no automatic + % page break. \box\balancedcolumns % % \pagegoal was set to the doubled \vsize above, since we restarted diff --git a/lib/acl-errno-valid.c b/lib/acl-errno-valid.c index a64d3d3..086f75f 100644 --- a/lib/acl-errno-valid.c +++ b/lib/acl-errno-valid.c @@ -1,6 +1,6 @@ /* Test whether ACLs are well supported on this system. - Copyright 2013-2015 Free Software Foundation, Inc. + Copyright 2013-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/acl-internal.c b/lib/acl-internal.c index c1b7017..569e2f9 100644 --- a/lib/acl-internal.c +++ b/lib/acl-internal.c @@ -1,6 +1,6 @@ /* Test whether a file has a nontrivial ACL. -*- coding: utf-8 -*- - Copyright (C) 2002-2003, 2005-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2005-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/acl-internal.h b/lib/acl-internal.h index 560d146..526e9f0 100644 --- a/lib/acl-internal.h +++ b/lib/acl-internal.h @@ -1,6 +1,6 @@ /* Internal implementation of access control lists. -*- coding: utf-8 -*- - Copyright (C) 2002-2003, 2005-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2005-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/acl.h b/lib/acl.h index 88ea08d..491b1ba 100644 --- a/lib/acl.h +++ b/lib/acl.h @@ -1,6 +1,6 @@ /* acl.c - access control lists - Copyright (C) 2002, 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2002, 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/acl_entries.c b/lib/acl_entries.c index 936a131..9fc9cf5 100644 --- a/lib/acl_entries.c +++ b/lib/acl_entries.c @@ -1,6 +1,6 @@ /* Return the number of entries in an ACL. - Copyright (C) 2002-2003, 2005-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2005-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/alloca.in.h b/lib/alloca.in.h index 906fe92..d457ebb 100644 --- a/lib/alloca.in.h +++ b/lib/alloca.in.h @@ -1,6 +1,6 @@ /* Memory allocation on the stack. - Copyright (C) 1995, 1999, 2001-2004, 2006-2015 Free Software Foundation, + Copyright (C) 1995, 1999, 2001-2004, 2006-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it diff --git a/lib/allocator.h b/lib/allocator.h index c7c851f..1f1eab6 100644 --- a/lib/allocator.h +++ b/lib/allocator.h @@ -1,6 +1,6 @@ /* Memory allocators such as malloc+free. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/at-func.c b/lib/at-func.c index bbbe458..5a8894a 100644 --- a/lib/at-func.c +++ b/lib/at-func.c @@ -1,5 +1,5 @@ /* Define at-style functions like fstatat, unlinkat, fchownat, etc. - Copyright (C) 2006, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/binary-io.h b/lib/binary-io.h index f5b66c7..d5c8233 100644 --- a/lib/binary-io.h +++ b/lib/binary-io.h @@ -1,5 +1,5 @@ /* Binary mode I/O. - Copyright (C) 2001, 2003, 2005, 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2001, 2003, 2005, 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/byteswap.in.h b/lib/byteswap.in.h index db885d8..d965962 100644 --- a/lib/byteswap.in.h +++ b/lib/byteswap.in.h @@ -1,5 +1,5 @@ /* byteswap.h - Byte swapping - Copyright (C) 2005, 2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2005, 2007, 2009-2016 Free Software Foundation, Inc. Written by Oskar Liljeblad , 2005. This program is free software: you can redistribute it and/or modify diff --git a/lib/c-ctype.h b/lib/c-ctype.h index 1512530..717ae78 100644 --- a/lib/c-ctype.h +++ b/lib/c-ctype.h @@ -5,7 +5,7 @@ functions' behaviour depends on the current locale set via setlocale. - Copyright (C) 2000-2003, 2006, 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2000-2003, 2006, 2008-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/c-strcase.h b/lib/c-strcase.h index f25bcca..7e570f5 100644 --- a/lib/c-strcase.h +++ b/lib/c-strcase.h @@ -1,5 +1,5 @@ /* Case-insensitive string comparison functions in C locale. - Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2015 Free Software + Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify diff --git a/lib/c-strcasecmp.c b/lib/c-strcasecmp.c index 6deb6d1..bd113b7 100644 --- a/lib/c-strcasecmp.c +++ b/lib/c-strcasecmp.c @@ -1,5 +1,5 @@ /* c-strcasecmp.c -- case insensitive string comparator in C locale - Copyright (C) 1998-1999, 2005-2006, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 1998-1999, 2005-2006, 2009-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/c-strncasecmp.c b/lib/c-strncasecmp.c index b98e368..c316929 100644 --- a/lib/c-strncasecmp.c +++ b/lib/c-strncasecmp.c @@ -1,5 +1,5 @@ /* c-strncasecmp.c -- case insensitive string comparator in C locale - Copyright (C) 1998-1999, 2005-2006, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 1998-1999, 2005-2006, 2009-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/careadlinkat.c b/lib/careadlinkat.c index f2f5da2..4180de9 100644 --- a/lib/careadlinkat.c +++ b/lib/careadlinkat.c @@ -1,6 +1,6 @@ /* Read symbolic links into a buffer without size limitation, relative to fd. - Copyright (C) 2001, 2003-2004, 2007, 2009-2015 Free Software Foundation, + Copyright (C) 2001, 2003-2004, 2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/lib/careadlinkat.h b/lib/careadlinkat.h index 4eb9fcc..84ede3e 100644 --- a/lib/careadlinkat.h +++ b/lib/careadlinkat.h @@ -1,6 +1,6 @@ /* Read symbolic links into a buffer without size limitation, relative to fd. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/close-stream.c b/lib/close-stream.c index 6e3d865..0c4beae 100644 --- a/lib/close-stream.c +++ b/lib/close-stream.c @@ -1,6 +1,6 @@ /* Close a stream, with nicer error checking than fclose's. - Copyright (C) 1998-2002, 2004, 2006-2015 Free Software Foundation, Inc. + Copyright (C) 1998-2002, 2004, 2006-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/count-one-bits.h b/lib/count-one-bits.h index d54397f..09c2dcb 100644 --- a/lib/count-one-bits.h +++ b/lib/count-one-bits.h @@ -1,5 +1,5 @@ /* count-one-bits.h -- counts the number of 1-bits in a word. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/count-trailing-zeros.h b/lib/count-trailing-zeros.h index 83ce2fb..7e09e64 100644 --- a/lib/count-trailing-zeros.h +++ b/lib/count-trailing-zeros.h @@ -1,5 +1,5 @@ /* count-trailing-zeros.h -- counts the number of trailing 0 bits in a word. - Copyright 2013-2015 Free Software Foundation, Inc. + Copyright 2013-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/dirent.in.h b/lib/dirent.in.h index 154d268..4c62737 100644 --- a/lib/dirent.in.h +++ b/lib/dirent.in.h @@ -1,5 +1,5 @@ /* A GNU-like . - Copyright (C) 2006-2015 Free Software Foundation, Inc. + Copyright (C) 2006-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/dirfd.c b/lib/dirfd.c index c91f8e5..1ea2a63 100644 --- a/lib/dirfd.c +++ b/lib/dirfd.c @@ -1,6 +1,6 @@ /* dirfd.c -- return the file descriptor associated with an open DIR* - Copyright (C) 2001, 2006, 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2001, 2006, 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/dosname.h b/lib/dosname.h index 893baf6..83a953f 100644 --- a/lib/dosname.h +++ b/lib/dosname.h @@ -1,6 +1,6 @@ /* File names on MS-DOS/Windows systems. - Copyright (C) 2000-2001, 2004-2006, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2000-2001, 2004-2006, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/dtotimespec.c b/lib/dtotimespec.c index c28d219..9028044 100644 --- a/lib/dtotimespec.c +++ b/lib/dtotimespec.c @@ -1,6 +1,6 @@ /* Convert double to timespec. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/dup2.c b/lib/dup2.c index 0e13214..c913f47 100644 --- a/lib/dup2.c +++ b/lib/dup2.c @@ -1,6 +1,6 @@ /* Duplicate an open file descriptor to a specified file descriptor. - Copyright (C) 1999, 2004-2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 1999, 2004-2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/errno.in.h b/lib/errno.in.h index affbb97..b8397ee 100644 --- a/lib/errno.in.h +++ b/lib/errno.in.h @@ -1,6 +1,6 @@ /* A POSIX-like . - Copyright (C) 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/euidaccess.c b/lib/euidaccess.c index c7e6cfb..82af941 100644 --- a/lib/euidaccess.c +++ b/lib/euidaccess.c @@ -1,6 +1,6 @@ /* euidaccess -- check if effective user id can access file - Copyright (C) 1990-1991, 1995, 1998, 2000, 2003-2006, 2008-2015 Free + Copyright (C) 1990-1991, 1995, 1998, 2000, 2003-2006, 2008-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/lib/execinfo.in.h b/lib/execinfo.in.h index 4773d38..09f1ddb 100644 --- a/lib/execinfo.in.h +++ b/lib/execinfo.in.h @@ -1,6 +1,6 @@ /* Information about executables. - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/faccessat.c b/lib/faccessat.c index 5bd7ecf..1743fa3 100644 --- a/lib/faccessat.c +++ b/lib/faccessat.c @@ -1,5 +1,5 @@ /* Check the access rights of a file relative to an open directory. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/fcntl.c b/lib/fcntl.c index 23b73e9..1ccc5ac 100644 --- a/lib/fcntl.c +++ b/lib/fcntl.c @@ -1,6 +1,6 @@ /* Provide file descriptor control. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/fcntl.in.h b/lib/fcntl.in.h index e288018..b943973 100644 --- a/lib/fcntl.in.h +++ b/lib/fcntl.in.h @@ -1,6 +1,6 @@ /* Like , but with non-working flags defined to 0. - Copyright (C) 2006-2015 Free Software Foundation, Inc. + Copyright (C) 2006-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/fdatasync.c b/lib/fdatasync.c index bbc3039..3351a0a 100644 --- a/lib/fdatasync.c +++ b/lib/fdatasync.c @@ -1,6 +1,6 @@ /* Emulate fdatasync on platforms that lack it. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public diff --git a/lib/fdopendir.c b/lib/fdopendir.c index 837a821..f30ab24 100644 --- a/lib/fdopendir.c +++ b/lib/fdopendir.c @@ -1,5 +1,5 @@ /* provide a replacement fdopendir function - Copyright (C) 2004-2015 Free Software Foundation, Inc. + Copyright (C) 2004-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/filemode.c b/lib/filemode.c index 3b19507..2250ee0 100644 --- a/lib/filemode.c +++ b/lib/filemode.c @@ -1,6 +1,6 @@ /* filemode.c -- make a string describing file modes - Copyright (C) 1985, 1990, 1993, 1998-2000, 2004, 2006, 2009-2015 Free + Copyright (C) 1985, 1990, 1993, 1998-2000, 2004, 2006, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/lib/filemode.h b/lib/filemode.h index ff0460a..09f345e 100644 --- a/lib/filemode.h +++ b/lib/filemode.h @@ -1,6 +1,6 @@ /* Make a string describing file modes. - Copyright (C) 1998-1999, 2003, 2006, 2009-2015 Free Software Foundation, + Copyright (C) 1998-1999, 2003, 2006, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/lib/fpending.c b/lib/fpending.c index c4b4a51..a503b9f 100644 --- a/lib/fpending.c +++ b/lib/fpending.c @@ -1,5 +1,5 @@ /* fpending.c -- return the number of pending output bytes on a stream - Copyright (C) 2000, 2004, 2006-2007, 2009-2015 Free Software Foundation, + Copyright (C) 2000, 2004, 2006-2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/lib/fpending.h b/lib/fpending.h index 5a1b2ad..61008aa 100644 --- a/lib/fpending.h +++ b/lib/fpending.h @@ -1,6 +1,6 @@ /* Declare __fpending. - Copyright (C) 2000, 2003, 2005-2006, 2009-2015 Free Software Foundation, + Copyright (C) 2000, 2003, 2005-2006, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/lib/fstatat.c b/lib/fstatat.c index 6a9e862..ebbecfd 100644 --- a/lib/fstatat.c +++ b/lib/fstatat.c @@ -1,6 +1,6 @@ /* Work around an fstatat bug on Solaris 9. - Copyright (C) 2006, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/fsync.c b/lib/fsync.c index b51d654..5df79ba 100644 --- a/lib/fsync.c +++ b/lib/fsync.c @@ -7,7 +7,7 @@ Written by Richard W.M. Jones - Copyright (C) 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public diff --git a/lib/ftoastr.c b/lib/ftoastr.c index 5cdaedf..e3a0138 100644 --- a/lib/ftoastr.c +++ b/lib/ftoastr.c @@ -1,6 +1,6 @@ /* floating point to accurate string - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/ftoastr.h b/lib/ftoastr.h index 970c3b1..9207809 100644 --- a/lib/ftoastr.h +++ b/lib/ftoastr.h @@ -1,6 +1,6 @@ /* floating point to accurate string - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/get-permissions.c b/lib/get-permissions.c index 9dfb076..8c70df1 100644 --- a/lib/get-permissions.c +++ b/lib/get-permissions.c @@ -1,6 +1,6 @@ /* Get permissions of a file. -*- coding: utf-8 -*- - Copyright (C) 2002-2003, 2005-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2005-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/getdtablesize.c b/lib/getdtablesize.c index 03eb7ef..d234055 100644 --- a/lib/getdtablesize.c +++ b/lib/getdtablesize.c @@ -1,5 +1,5 @@ /* getdtablesize() function for platforms that don't have it. - Copyright (C) 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify diff --git a/lib/getgroups.c b/lib/getgroups.c index 5563dfb..b040505 100644 --- a/lib/getgroups.c +++ b/lib/getgroups.c @@ -1,6 +1,6 @@ /* provide consistent interface to getgroups for systems that don't allow N==0 - Copyright (C) 1996, 1999, 2003, 2006-2015 Free Software Foundation, Inc. + Copyright (C) 1996, 1999, 2003, 2006-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/getloadavg.c b/lib/getloadavg.c index 0cbca26..a7ffd06 100644 --- a/lib/getloadavg.c +++ b/lib/getloadavg.c @@ -1,6 +1,6 @@ /* Get the system load averages. - Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2015 Free Software + Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2016 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with gnulib. diff --git a/lib/getopt.c b/lib/getopt.c index 212cbf7..8ccb901 100644 --- a/lib/getopt.c +++ b/lib/getopt.c @@ -2,7 +2,7 @@ NOTE: getopt is part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! - Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2015 Free Software + Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/lib/getopt.in.h b/lib/getopt.in.h index 9248f76..0f72182 100644 --- a/lib/getopt.in.h +++ b/lib/getopt.in.h @@ -1,5 +1,5 @@ /* Declarations for getopt. - Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2015 Free Software + Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/lib/getopt1.c b/lib/getopt1.c index 2b1feb6..63db74f 100644 --- a/lib/getopt1.c +++ b/lib/getopt1.c @@ -1,5 +1,5 @@ /* getopt_long and getopt_long_only entry points for GNU getopt. - Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2015 Free Software + Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/lib/getopt_int.h b/lib/getopt_int.h index e893a6e..be4c22e 100644 --- a/lib/getopt_int.h +++ b/lib/getopt_int.h @@ -1,5 +1,5 @@ /* Internal declarations for getopt. - Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2015 Free Software + Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/lib/gettext.h b/lib/gettext.h index 599a14e..00af872 100644 --- a/lib/gettext.h +++ b/lib/gettext.h @@ -1,5 +1,5 @@ /* Convenience header for conditional use of GNU . - Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2015 Free Software + Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify diff --git a/lib/gettime.c b/lib/gettime.c index 1c47e3b..ea58eb0 100644 --- a/lib/gettime.c +++ b/lib/gettime.c @@ -1,6 +1,6 @@ /* gettime -- get the system clock - Copyright (C) 2002, 2004-2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2002, 2004-2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c index e0e2e69..224ca6a 100644 --- a/lib/gettimeofday.c +++ b/lib/gettimeofday.c @@ -1,6 +1,6 @@ /* Provide gettimeofday for systems that don't have it or for which it's broken. - Copyright (C) 2001-2003, 2005-2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2005-2007, 2009-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/gnulib.mk b/lib/gnulib.mk index 17a01af..97ed5b1 100644 --- a/lib/gnulib.mk +++ b/lib/gnulib.mk @@ -1,6 +1,6 @@ ## DO NOT EDIT! GENERATED AUTOMATICALLY! ## Process this file with automake to produce Makefile.in. -# Copyright (C) 2002-2015 Free Software Foundation, Inc. +# Copyright (C) 2002-2016 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/lib/group-member.c b/lib/group-member.c index 23074e4..365e166 100644 --- a/lib/group-member.c +++ b/lib/group-member.c @@ -1,6 +1,6 @@ /* group-member.c -- determine whether group id is in calling user's group list - Copyright (C) 1994, 1997-1998, 2003, 2005-2006, 2009-2015 Free Software + Copyright (C) 1994, 1997-1998, 2003, 2005-2006, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/lib/intprops.h b/lib/intprops.h index ecafaf7..e1a6107 100644 --- a/lib/intprops.h +++ b/lib/intprops.h @@ -1,6 +1,6 @@ /* intprops.h -- properties of integer types - Copyright (C) 2001-2005, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2001-2005, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/inttypes.in.h b/lib/inttypes.in.h index 78846f6..ed09db6 100644 --- a/lib/inttypes.in.h +++ b/lib/inttypes.in.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006-2015 Free Software Foundation, Inc. +/* Copyright (C) 2006-2016 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Derek Price. This file is part of gnulib. diff --git a/lib/lstat.c b/lib/lstat.c index 31dee13..03b0634 100644 --- a/lib/lstat.c +++ b/lib/lstat.c @@ -1,6 +1,6 @@ /* Work around a bug of lstat on some systems - Copyright (C) 1997-2006, 2008-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2006, 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/md5.c b/lib/md5.c index 30525dc..62d247e 100644 --- a/lib/md5.c +++ b/lib/md5.c @@ -1,6 +1,6 @@ /* Functions to compute MD5 message digest of files or memory blocks. according to the definition of MD5 in RFC 1321 from April 1992. - Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2015 Free Software + Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/lib/md5.h b/lib/md5.h index 43add99..a0a8c5e 100644 --- a/lib/md5.h +++ b/lib/md5.h @@ -1,6 +1,6 @@ /* Declaration of functions and data types used for MD5 sum computing library functions. - Copyright (C) 1995-1997, 1999-2001, 2004-2006, 2008-2015 Free Software + Copyright (C) 1995-1997, 1999-2001, 2004-2006, 2008-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/lib/memrchr.c b/lib/memrchr.c index 3827208..e6212e5 100644 --- a/lib/memrchr.c +++ b/lib/memrchr.c @@ -1,6 +1,6 @@ /* memrchr -- find the last occurrence of a byte in a memory block - Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2015 Free Software + Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2016 Free Software Foundation, Inc. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), diff --git a/lib/mkostemp.c b/lib/mkostemp.c index 47ff9d3..31c3e48 100644 --- a/lib/mkostemp.c +++ b/lib/mkostemp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2015 Free Software +/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2016 Free Software Foundation, Inc. This file is derived from the one in the GNU C Library. diff --git a/lib/mktime.c b/lib/mktime.c index 580bc8e..adbf8d4 100644 --- a/lib/mktime.c +++ b/lib/mktime.c @@ -1,5 +1,5 @@ /* Convert a 'struct tm' to a time_t value. - Copyright (C) 1993-2015 Free Software Foundation, Inc. + Copyright (C) 1993-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Paul Eggert . diff --git a/lib/openat-priv.h b/lib/openat-priv.h index f5a3690..ed763db 100644 --- a/lib/openat-priv.h +++ b/lib/openat-priv.h @@ -1,6 +1,6 @@ /* Internals for openat-like functions. - Copyright (C) 2005-2006, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/openat-proc.c b/lib/openat-proc.c index 4e1d341..15a8c79 100644 --- a/lib/openat-proc.c +++ b/lib/openat-proc.c @@ -1,6 +1,6 @@ /* Create /proc/self/fd-related names for subfiles of open directories. - Copyright (C) 2006, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/openat.h b/lib/openat.h index f148adf..edee6c5 100644 --- a/lib/openat.h +++ b/lib/openat.h @@ -1,5 +1,5 @@ /* provide a replacement openat function - Copyright (C) 2004-2006, 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2004-2006, 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/pathmax.h b/lib/pathmax.h index 2f3b64f..aee22f8 100644 --- a/lib/pathmax.h +++ b/lib/pathmax.h @@ -1,5 +1,5 @@ /* Define PATH_MAX somehow. Requires sys/types.h. - Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2015 Free Software + Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify diff --git a/lib/pipe2.c b/lib/pipe2.c index 89b982b..f8912f2 100644 --- a/lib/pipe2.c +++ b/lib/pipe2.c @@ -1,5 +1,5 @@ /* Create a pipe, with specific opening flags. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/pselect.c b/lib/pselect.c index 0a23fdf..56c2eb3 100644 --- a/lib/pselect.c +++ b/lib/pselect.c @@ -1,6 +1,6 @@ /* pselect - synchronous I/O multiplexing - Copyright 2011-2015 Free Software Foundation, Inc. + Copyright 2011-2016 Free Software Foundation, Inc. This file is part of gnulib. diff --git a/lib/pthread_sigmask.c b/lib/pthread_sigmask.c index 982ae60..f67e442 100644 --- a/lib/pthread_sigmask.c +++ b/lib/pthread_sigmask.c @@ -1,5 +1,5 @@ /* POSIX compatible signal blocking for threads. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/putenv.c b/lib/putenv.c index 925bb2f..e67712d 100644 --- a/lib/putenv.c +++ b/lib/putenv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2015 Free Software +/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2016 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C diff --git a/lib/qcopy-acl.c b/lib/qcopy-acl.c index 9db9033..c7bdfbb 100644 --- a/lib/qcopy-acl.c +++ b/lib/qcopy-acl.c @@ -1,6 +1,6 @@ /* Copy access control list from one file to another. -*- coding: utf-8 -*- - Copyright (C) 2002-2003, 2005-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2005-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/readlink.c b/lib/readlink.c index 965c3e2..e6c3925 100644 --- a/lib/readlink.c +++ b/lib/readlink.c @@ -1,5 +1,5 @@ /* Stub for readlink(). - Copyright (C) 2003-2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2003-2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/readlinkat.c b/lib/readlinkat.c index c91cf0e..7006db8 100644 --- a/lib/readlinkat.c +++ b/lib/readlinkat.c @@ -1,5 +1,5 @@ /* Read a symlink relative to an open directory. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/root-uid.h b/lib/root-uid.h index d263f4d..23c630b 100644 --- a/lib/root-uid.h +++ b/lib/root-uid.h @@ -1,6 +1,6 @@ /* The user ID that always has appropriate privileges in the POSIX sense. - Copyright 2012-2015 Free Software Foundation, Inc. + Copyright 2012-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/secure_getenv.c b/lib/secure_getenv.c index 31aad1f..f359ab2 100644 --- a/lib/secure_getenv.c +++ b/lib/secure_getenv.c @@ -1,6 +1,6 @@ /* Look up an environment variable more securely. - Copyright 2013-2015 Free Software Foundation, Inc. + Copyright 2013-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published diff --git a/lib/set-permissions.c b/lib/set-permissions.c index 8e6ecf3..0730754 100644 --- a/lib/set-permissions.c +++ b/lib/set-permissions.c @@ -1,6 +1,6 @@ /* Set permissions of a file. -*- coding: utf-8 -*- - Copyright (C) 2002-2003, 2005-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2005-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/sha1.c b/lib/sha1.c index 4411cee..45f1cbe 100644 --- a/lib/sha1.c +++ b/lib/sha1.c @@ -1,7 +1,7 @@ /* sha1.c - Functions to compute SHA1 message digest of files or memory blocks according to the NIST specification FIPS-180-1. - Copyright (C) 2000-2001, 2003-2006, 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2000-2001, 2003-2006, 2008-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the diff --git a/lib/sha1.h b/lib/sha1.h index b907416..2f2f230 100644 --- a/lib/sha1.h +++ b/lib/sha1.h @@ -1,6 +1,6 @@ /* Declarations of functions and data types used for SHA1 sum library functions. - Copyright (C) 2000-2001, 2003, 2005-2006, 2008-2015 Free Software + Copyright (C) 2000-2001, 2003, 2005-2006, 2008-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it diff --git a/lib/sha256.c b/lib/sha256.c index 9ac8173..0be8fd2 100644 --- a/lib/sha256.c +++ b/lib/sha256.c @@ -1,7 +1,7 @@ /* sha256.c - Functions to compute SHA256 and SHA224 message digest of files or memory blocks according to the NIST specification FIPS-180-2. - Copyright (C) 2005-2006, 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/sha256.h b/lib/sha256.h index dae84f5..fc6d67f 100644 --- a/lib/sha256.h +++ b/lib/sha256.h @@ -1,6 +1,6 @@ /* Declarations of functions and data types used for SHA256 and SHA224 sum library functions. - Copyright (C) 2005-2006, 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/sha512.c b/lib/sha512.c index f48e74b..5494dcb 100644 --- a/lib/sha512.c +++ b/lib/sha512.c @@ -1,7 +1,7 @@ /* sha512.c - Functions to compute SHA512 and SHA384 message digest of files or memory blocks according to the NIST specification FIPS-180-2. - Copyright (C) 2005-2006, 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/sha512.h b/lib/sha512.h index d540887..b8a8251 100644 --- a/lib/sha512.h +++ b/lib/sha512.h @@ -1,6 +1,6 @@ /* Declarations of functions and data types used for SHA512 and SHA384 sum library functions. - Copyright (C) 2005-2006, 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/sig2str.c b/lib/sig2str.c index 58154da..ca8ac78 100644 --- a/lib/sig2str.c +++ b/lib/sig2str.c @@ -1,6 +1,6 @@ /* sig2str.c -- convert between signal names and numbers - Copyright (C) 2002, 2004, 2006, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2002, 2004, 2006, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/sig2str.h b/lib/sig2str.h index ac2f67a..f347170 100644 --- a/lib/sig2str.h +++ b/lib/sig2str.h @@ -1,6 +1,6 @@ /* sig2str.h -- convert between signal names and numbers - Copyright (C) 2002, 2005, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2002, 2005, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/signal.in.h b/lib/signal.in.h index 265b72a..ab0a049 100644 --- a/lib/signal.in.h +++ b/lib/signal.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 2006-2015 Free Software Foundation, Inc. + Copyright (C) 2006-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/stat-time.h b/lib/stat-time.h index b67d179..f5c4cd2 100644 --- a/lib/stat-time.h +++ b/lib/stat-time.h @@ -1,6 +1,6 @@ /* stat-related time functions. - Copyright (C) 2005, 2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2005, 2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/stat.c b/lib/stat.c index 2209826..62e9e0b 100644 --- a/lib/stat.c +++ b/lib/stat.c @@ -1,5 +1,5 @@ /* Work around platform bugs in stat. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/stdalign.in.h b/lib/stdalign.in.h index b16ccc8..9abb9aa 100644 --- a/lib/stdalign.in.h +++ b/lib/stdalign.in.h @@ -1,6 +1,6 @@ /* A substitute for ISO C11 . - Copyright 2011-2015 Free Software Foundation, Inc. + Copyright 2011-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/stddef.in.h b/lib/stddef.in.h index 698307b..c6d2317 100644 --- a/lib/stddef.in.h +++ b/lib/stddef.in.h @@ -1,6 +1,6 @@ /* A substitute for POSIX 2008 , for platforms that have issues. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/stdint.in.h b/lib/stdint.in.h index 378de2e..d241391 100644 --- a/lib/stdint.in.h +++ b/lib/stdint.in.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2002, 2004-2015 Free Software Foundation, Inc. +/* Copyright (C) 2001-2002, 2004-2016 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. diff --git a/lib/stdio.in.h b/lib/stdio.in.h index ec43874..9b31365 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 2004, 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2004, 2007-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index 428a119..70dc88d 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 1995, 2001-2004, 2006-2015 Free Software Foundation, Inc. + Copyright (C) 1995, 2001-2004, 2006-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/stpcpy.c b/lib/stpcpy.c index 559d2f2..ec3996e 100644 --- a/lib/stpcpy.c +++ b/lib/stpcpy.c @@ -1,5 +1,5 @@ /* stpcpy.c -- copy a string and return pointer to end of new string - Copyright (C) 1992, 1995, 1997-1998, 2006, 2009-2015 Free Software + Copyright (C) 1992, 1995, 1997-1998, 2006, 2009-2016 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. diff --git a/lib/strftime.c b/lib/strftime.c index d1ca346..10d3eb4 100644 --- a/lib/strftime.c +++ b/lib/strftime.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2001, 2003-2007, 2009-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2001, 2003-2007, 2009-2016 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. diff --git a/lib/strftime.h b/lib/strftime.h index 2ce6cc5..17445e1 100644 --- a/lib/strftime.h +++ b/lib/strftime.h @@ -1,6 +1,6 @@ /* declarations for strftime.c - Copyright (C) 2002, 2004, 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2002, 2004, 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/string.in.h b/lib/string.in.h index 2abd6bc..7fb00c1 100644 --- a/lib/string.in.h +++ b/lib/string.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 1995-1996, 2001-2015 Free Software Foundation, Inc. + Copyright (C) 1995-1996, 2001-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/strtoimax.c b/lib/strtoimax.c index 8ff65ce..223412b 100644 --- a/lib/strtoimax.c +++ b/lib/strtoimax.c @@ -1,6 +1,6 @@ /* Convert string representation of a number into an intmax_t value. - Copyright (C) 1999, 2001-2004, 2006, 2009-2015 Free Software Foundation, + Copyright (C) 1999, 2001-2004, 2006, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/lib/strtol.c b/lib/strtol.c index 1bc1439..b0215fc 100644 --- a/lib/strtol.c +++ b/lib/strtol.c @@ -1,6 +1,6 @@ /* Convert string representation of a number into an integer value. - Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2015 Free Software + Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2016 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C diff --git a/lib/strtoll.c b/lib/strtoll.c index d712349..d0f7b62 100644 --- a/lib/strtoll.c +++ b/lib/strtoll.c @@ -1,5 +1,5 @@ /* Function to parse a 'long long int' from text. - Copyright (C) 1995-1997, 1999, 2001, 2009-2015 Free Software Foundation, + Copyright (C) 1995-1997, 1999, 2001, 2009-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/lib/strtoul.c b/lib/strtoul.c index 2051777..6a5d4dd 100644 --- a/lib/strtoul.c +++ b/lib/strtoul.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1997, 2009-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1997, 2009-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify diff --git a/lib/strtoull.c b/lib/strtoull.c index 5cd2554..16da823 100644 --- a/lib/strtoull.c +++ b/lib/strtoull.c @@ -1,5 +1,5 @@ /* Function to parse an 'unsigned long long int' from text. - Copyright (C) 1995-1997, 1999, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 1995-1997, 1999, 2009-2016 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@gnu.org. diff --git a/lib/symlink.c b/lib/symlink.c index 14356c3..d8684b6 100644 --- a/lib/symlink.c +++ b/lib/symlink.c @@ -1,5 +1,5 @@ /* Stub for symlink(). - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h index fd7a291..f7b260d 100644 --- a/lib/sys_select.in.h +++ b/lib/sys_select.in.h @@ -1,5 +1,5 @@ /* Substitute for . - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h index 9f5e853..72d9537 100644 --- a/lib/sys_stat.in.h +++ b/lib/sys_stat.in.h @@ -1,5 +1,5 @@ /* Provide a more complete sys/stat header file. - Copyright (C) 2005-2015 Free Software Foundation, Inc. + Copyright (C) 2005-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/sys_time.in.h b/lib/sys_time.in.h index c556c5d..1623a1d 100644 --- a/lib/sys_time.in.h +++ b/lib/sys_time.in.h @@ -1,6 +1,6 @@ /* Provide a more complete sys/time.h. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/sys_types.in.h b/lib/sys_types.in.h index 814bc17..8ab0545 100644 --- a/lib/sys_types.in.h +++ b/lib/sys_types.in.h @@ -1,6 +1,6 @@ /* Provide a more complete sys/types.h. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/tempname.c b/lib/tempname.c index 69c572f..b1e9880 100644 --- a/lib/tempname.c +++ b/lib/tempname.c @@ -1,6 +1,6 @@ /* tempname.c - generate the name of a temporary file. - Copyright (C) 1991-2003, 2005-2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 1991-2003, 2005-2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/tempname.h b/lib/tempname.h index e609360..be01c51 100644 --- a/lib/tempname.h +++ b/lib/tempname.h @@ -1,6 +1,6 @@ /* Create a temporary file or directory. - Copyright (C) 2006, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/time-internal.h b/lib/time-internal.h index 6bf3f8d..0635f28 100644 --- a/lib/time-internal.h +++ b/lib/time-internal.h @@ -1,6 +1,6 @@ /* Time internal interface - Copyright 2015 Free Software Foundation, Inc. + Copyright 2015-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/time.in.h b/lib/time.in.h index a90552c..865c114 100644 --- a/lib/time.in.h +++ b/lib/time.in.h @@ -1,6 +1,6 @@ /* A more-standard . - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/time_r.c b/lib/time_r.c index 0b512de..dc1e161 100644 --- a/lib/time_r.c +++ b/lib/time_r.c @@ -1,6 +1,6 @@ /* Reentrant time functions like localtime_r. - Copyright (C) 2003, 2006-2007, 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2003, 2006-2007, 2010-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/time_rz.c b/lib/time_rz.c index a89b7e7..bc80127 100644 --- a/lib/time_rz.c +++ b/lib/time_rz.c @@ -1,6 +1,6 @@ /* Time zone functions such as tzalloc and localtime_rz - Copyright 2015 Free Software Foundation, Inc. + Copyright 2015-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/timegm.c b/lib/timegm.c index 11c485f..86bdac3 100644 --- a/lib/timegm.c +++ b/lib/timegm.c @@ -1,6 +1,6 @@ /* Convert UTC calendar time to simple time. Like mktime but assumes UTC. - Copyright (C) 1994, 1997, 2003-2004, 2006-2007, 2009-2015 Free Software + Copyright (C) 1994, 1997, 2003-2004, 2006-2007, 2009-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software; you can redistribute it and/or modify diff --git a/lib/timespec-add.c b/lib/timespec-add.c index e8f6aac..b093946 100644 --- a/lib/timespec-add.c +++ b/lib/timespec-add.c @@ -1,6 +1,6 @@ /* Add two struct timespec values. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/timespec-sub.c b/lib/timespec-sub.c index 392ec15..63cc142 100644 --- a/lib/timespec-sub.c +++ b/lib/timespec-sub.c @@ -1,6 +1,6 @@ /* Subtract two struct timespec values. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/timespec.h b/lib/timespec.h index 9ec495a..601394b 100644 --- a/lib/timespec.h +++ b/lib/timespec.h @@ -1,6 +1,6 @@ /* timespec -- System time interface - Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2015 Free Software + Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/lib/u64.h b/lib/u64.h index 0e569d0..1ece978 100644 --- a/lib/u64.h +++ b/lib/u64.h @@ -1,6 +1,6 @@ /* uint64_t-like operations that work even on hosts lacking uint64_t - Copyright (C) 2006, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/unistd.in.h b/lib/unistd.in.h index 958fea2..c3af07a 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -1,5 +1,5 @@ /* Substitute for and wrapper around . - Copyright (C) 2003-2015 Free Software Foundation, Inc. + Copyright (C) 2003-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/utimens.c b/lib/utimens.c index 7386dcf..ece9b07 100644 --- a/lib/utimens.c +++ b/lib/utimens.c @@ -1,6 +1,6 @@ /* Set file access and modification times. - Copyright (C) 2003-2015 Free Software Foundation, Inc. + Copyright (C) 2003-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the diff --git a/lib/utimens.h b/lib/utimens.h index cbd06cc..a92cad4 100644 --- a/lib/utimens.h +++ b/lib/utimens.h @@ -1,6 +1,6 @@ /* Set file access and modification times. - Copyright 2012-2015 Free Software Foundation, Inc. + Copyright 2012-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the diff --git a/lib/verify.h b/lib/verify.h index 60eba49..2f43837 100644 --- a/lib/verify.h +++ b/lib/verify.h @@ -1,6 +1,6 @@ /* Compile-time assert-like macros. - Copyright (C) 2005-2006, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/vla.h b/lib/vla.h index 9e46a2f..381de9e 100644 --- a/lib/vla.h +++ b/lib/vla.h @@ -1,6 +1,6 @@ /* vla.h - variable length arrays - Copyright 2014-2015 Free Software Foundation, Inc. + Copyright 2014-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/xalloc-oversized.h b/lib/xalloc-oversized.h index 0e579de..d81a847 100644 --- a/lib/xalloc-oversized.h +++ b/lib/xalloc-oversized.h @@ -1,6 +1,6 @@ /* xalloc-oversized.h -- memory allocation size checking - Copyright (C) 1990-2000, 2003-2004, 2006-2015 Free Software Foundation, Inc. + Copyright (C) 1990-2000, 2003-2004, 2006-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/m4/00gnulib.m4 b/m4/00gnulib.m4 index c7103ed..bb37e32 100644 --- a/m4/00gnulib.m4 +++ b/m4/00gnulib.m4 @@ -1,5 +1,5 @@ # 00gnulib.m4 serial 3 -dnl Copyright (C) 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/absolute-header.m4 b/m4/absolute-header.m4 index bc19dfc..7ffc38d 100644 --- a/m4/absolute-header.m4 +++ b/m4/absolute-header.m4 @@ -1,5 +1,5 @@ # absolute-header.m4 serial 16 -dnl Copyright (C) 2006-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/acl.m4 b/m4/acl.m4 index 75fc9ce..0f96337 100644 --- a/m4/acl.m4 +++ b/m4/acl.m4 @@ -1,7 +1,7 @@ # acl.m4 - check for access control list (ACL) primitives # serial 21 -# Copyright (C) 2002, 2004-2015 Free Software Foundation, Inc. +# Copyright (C) 2002, 2004-2016 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/m4/alloca.m4 b/m4/alloca.m4 index 8408bed..2382ff1 100644 --- a/m4/alloca.m4 +++ b/m4/alloca.m4 @@ -1,5 +1,5 @@ # alloca.m4 serial 14 -dnl Copyright (C) 2002-2004, 2006-2007, 2009-2015 Free Software Foundation, +dnl Copyright (C) 2002-2004, 2006-2007, 2009-2016 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/m4/byteswap.m4 b/m4/byteswap.m4 index ec5d46c..27f0fd6 100644 --- a/m4/byteswap.m4 +++ b/m4/byteswap.m4 @@ -1,5 +1,5 @@ # byteswap.m4 serial 4 -dnl Copyright (C) 2005, 2007, 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2007, 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/c-strtod.m4 b/m4/c-strtod.m4 index b5d8ca0..ed04e2c 100644 --- a/m4/c-strtod.m4 +++ b/m4/c-strtod.m4 @@ -1,6 +1,6 @@ # c-strtod.m4 serial 15 -# Copyright (C) 2004-2006, 2009-2015 Free Software Foundation, Inc. +# Copyright (C) 2004-2006, 2009-2016 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/m4/clock_time.m4 b/m4/clock_time.m4 index a903e58..bb20344 100644 --- a/m4/clock_time.m4 +++ b/m4/clock_time.m4 @@ -1,5 +1,5 @@ # clock_time.m4 serial 10 -dnl Copyright (C) 2002-2006, 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/close-stream.m4 b/m4/close-stream.m4 index a7a2efe..ddda027 100644 --- a/m4/close-stream.m4 +++ b/m4/close-stream.m4 @@ -1,5 +1,5 @@ #serial 4 -dnl Copyright (C) 2006-2007, 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2007, 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/count-one-bits.m4 b/m4/count-one-bits.m4 index e450e13..8db3bf1 100644 --- a/m4/count-one-bits.m4 +++ b/m4/count-one-bits.m4 @@ -1,5 +1,5 @@ # count-one-bits.m4 serial 3 -dnl Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/count-trailing-zeros.m4 b/m4/count-trailing-zeros.m4 index abd1e50..1b815ce 100644 --- a/m4/count-trailing-zeros.m4 +++ b/m4/count-trailing-zeros.m4 @@ -1,5 +1,5 @@ # count-trailing-zeros.m4 -dnl Copyright (C) 2013-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2013-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/dirent_h.m4 b/m4/dirent_h.m4 index 7abd1d0..68836a4 100644 --- a/m4/dirent_h.m4 +++ b/m4/dirent_h.m4 @@ -1,5 +1,5 @@ # dirent_h.m4 serial 16 -dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/dirfd.m4 b/m4/dirfd.m4 index ce56cff..e9532e6 100644 --- a/m4/dirfd.m4 +++ b/m4/dirfd.m4 @@ -2,7 +2,7 @@ dnl Find out how to get the file descriptor associated with an open DIR*. -# Copyright (C) 2001-2006, 2008-2015 Free Software Foundation, Inc. +# Copyright (C) 2001-2006, 2008-2016 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/m4/dup2.m4 b/m4/dup2.m4 index 59028e0..63d6d8e 100644 --- a/m4/dup2.m4 +++ b/m4/dup2.m4 @@ -1,5 +1,5 @@ #serial 24 -dnl Copyright (C) 2002, 2005, 2007, 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2005, 2007, 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/environ.m4 b/m4/environ.m4 index 4dbf947..9a0ea7e 100644 --- a/m4/environ.m4 +++ b/m4/environ.m4 @@ -1,5 +1,5 @@ # environ.m4 serial 6 -dnl Copyright (C) 2001-2004, 2006-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2004, 2006-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/errno_h.m4 b/m4/errno_h.m4 index cfaa687..b111fce 100644 --- a/m4/errno_h.m4 +++ b/m4/errno_h.m4 @@ -1,5 +1,5 @@ # errno_h.m4 serial 12 -dnl Copyright (C) 2004, 2006, 2008-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2004, 2006, 2008-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/euidaccess.m4 b/m4/euidaccess.m4 index e23e9c3..9913f84 100644 --- a/m4/euidaccess.m4 +++ b/m4/euidaccess.m4 @@ -1,5 +1,5 @@ # euidaccess.m4 serial 15 -dnl Copyright (C) 2002-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/execinfo.m4 b/m4/execinfo.m4 index 2db4922..2f13a1f 100644 --- a/m4/execinfo.m4 +++ b/m4/execinfo.m4 @@ -1,6 +1,6 @@ # Check for GNU-style execinfo.h. -dnl Copyright 2012-2015 Free Software Foundation, Inc. +dnl Copyright 2012-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/extensions.m4 b/m4/extensions.m4 index 35bc49c..6d378ec 100644 --- a/m4/extensions.m4 +++ b/m4/extensions.m4 @@ -1,7 +1,7 @@ # serial 13 -*- Autoconf -*- # Enable extensions on systems that normally disable them. -# Copyright (C) 2003, 2006-2015 Free Software Foundation, Inc. +# Copyright (C) 2003, 2006-2016 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4 index 7280065..fe282a5 100644 --- a/m4/extern-inline.m4 +++ b/m4/extern-inline.m4 @@ -1,6 +1,6 @@ dnl 'extern inline' a la ISO C99. -dnl Copyright 2012-2015 Free Software Foundation, Inc. +dnl Copyright 2012-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/faccessat.m4 b/m4/faccessat.m4 index 941cb02..dafce87 100644 --- a/m4/faccessat.m4 +++ b/m4/faccessat.m4 @@ -1,7 +1,7 @@ # serial 6 # See if we need to provide faccessat replacement. -dnl Copyright (C) 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/fcntl.m4 b/m4/fcntl.m4 index 76dd867..0037e5f 100644 --- a/m4/fcntl.m4 +++ b/m4/fcntl.m4 @@ -1,5 +1,5 @@ # fcntl.m4 serial 8 -dnl Copyright (C) 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/fcntl_h.m4 b/m4/fcntl_h.m4 index b279162..ef0d78d 100644 --- a/m4/fcntl_h.m4 +++ b/m4/fcntl_h.m4 @@ -1,6 +1,6 @@ # serial 15 # Configure fcntl.h. -dnl Copyright (C) 2006-2007, 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2007, 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/fdatasync.m4 b/m4/fdatasync.m4 index 35b09a8..5a32e74 100644 --- a/m4/fdatasync.m4 +++ b/m4/fdatasync.m4 @@ -1,5 +1,5 @@ # fdatasync.m4 serial 4 -dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/fdopendir.m4 b/m4/fdopendir.m4 index 317eac9..cadbee3 100644 --- a/m4/fdopendir.m4 +++ b/m4/fdopendir.m4 @@ -1,7 +1,7 @@ # serial 10 # See if we need to provide fdopendir. -dnl Copyright (C) 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/filemode.m4 b/m4/filemode.m4 index e2a195c..839fcc1 100644 --- a/m4/filemode.m4 +++ b/m4/filemode.m4 @@ -1,5 +1,5 @@ # filemode.m4 serial 8 -dnl Copyright (C) 2002, 2005-2006, 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2005-2006, 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/fpending.m4 b/m4/fpending.m4 index 4781db1..a446156 100644 --- a/m4/fpending.m4 +++ b/m4/fpending.m4 @@ -1,6 +1,6 @@ # serial 21 -# Copyright (C) 2000-2001, 2004-2015 Free Software Foundation, Inc. +# Copyright (C) 2000-2001, 2004-2016 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/m4/fstatat.m4 b/m4/fstatat.m4 index e5f9f90..84177f0 100644 --- a/m4/fstatat.m4 +++ b/m4/fstatat.m4 @@ -1,5 +1,5 @@ # fstatat.m4 serial 3 -dnl Copyright (C) 2004-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2004-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/fsync.m4 b/m4/fsync.m4 index bc2b093..405d43d 100644 --- a/m4/fsync.m4 +++ b/m4/fsync.m4 @@ -1,5 +1,5 @@ # fsync.m4 serial 2 -dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/getdtablesize.m4 b/m4/getdtablesize.m4 index 25e9968..1bf4db0 100644 --- a/m4/getdtablesize.m4 +++ b/m4/getdtablesize.m4 @@ -1,5 +1,5 @@ # getdtablesize.m4 serial 6 -dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/getgroups.m4 b/m4/getgroups.m4 index 16e72c7..4b1573d 100644 --- a/m4/getgroups.m4 +++ b/m4/getgroups.m4 @@ -3,7 +3,7 @@ dnl From Jim Meyering. dnl A wrapper around AC_FUNC_GETGROUPS. -# Copyright (C) 1996-1997, 1999-2004, 2008-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-1997, 1999-2004, 2008-2016 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4 index 1234ba9..76547d1 100644 --- a/m4/getloadavg.m4 +++ b/m4/getloadavg.m4 @@ -1,6 +1,6 @@ # Check for getloadavg. -# Copyright (C) 1992-1996, 1999-2000, 2002-2003, 2006, 2008-2015 Free Software +# Copyright (C) 1992-1996, 1999-2000, 2002-2003, 2006, 2008-2016 Free Software # Foundation, Inc. # This file is free software; the Free Software Foundation diff --git a/m4/getopt.m4 b/m4/getopt.m4 index e76e501..ce6ec67 100644 --- a/m4/getopt.m4 +++ b/m4/getopt.m4 @@ -1,5 +1,5 @@ # getopt.m4 serial 44 -dnl Copyright (C) 2002-2006, 2008-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2008-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/gettime.m4 b/m4/gettime.m4 index cd499ff..9843ed4 100644 --- a/m4/gettime.m4 +++ b/m4/gettime.m4 @@ -1,5 +1,5 @@ # gettime.m4 serial 8 -dnl Copyright (C) 2002, 2004-2006, 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2004-2006, 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4 index ce246e1..4ae5d63 100644 --- a/m4/gettimeofday.m4 +++ b/m4/gettimeofday.m4 @@ -1,6 +1,6 @@ # serial 21 -# Copyright (C) 2001-2003, 2005, 2007, 2009-2015 Free Software Foundation, Inc. +# Copyright (C) 2001-2003, 2005, 2007, 2009-2016 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index 50ef974..f8454c8 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -1,5 +1,5 @@ # gnulib-common.m4 serial 36 -dnl Copyright (C) 2007-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index 349c0dc..69920a8 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 @@ -1,5 +1,5 @@ # DO NOT EDIT! GENERATED AUTOMATICALLY! -# Copyright (C) 2002-2015 Free Software Foundation, Inc. +# Copyright (C) 2002-2016 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/m4/gnulib-tool.m4 b/m4/gnulib-tool.m4 index fede1fc..0d2ee44 100644 --- a/m4/gnulib-tool.m4 +++ b/m4/gnulib-tool.m4 @@ -1,5 +1,5 @@ # gnulib-tool.m4 serial 2 -dnl Copyright (C) 2004-2005, 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2004-2005, 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/group-member.m4 b/m4/group-member.m4 index 526a67a..9e7e3e1 100644 --- a/m4/group-member.m4 +++ b/m4/group-member.m4 @@ -1,6 +1,6 @@ # serial 14 -# Copyright (C) 1999-2001, 2003-2007, 2009-2015 Free Software Foundation, Inc. +# Copyright (C) 1999-2001, 2003-2007, 2009-2016 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/m4/include_next.m4 b/m4/include_next.m4 index 233d254..db0f2c0 100644 --- a/m4/include_next.m4 +++ b/m4/include_next.m4 @@ -1,5 +1,5 @@ # include_next.m4 serial 23 -dnl Copyright (C) 2006-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/inttypes.m4 b/m4/inttypes.m4 index 4209ffd..61cdb1a 100644 --- a/m4/inttypes.m4 +++ b/m4/inttypes.m4 @@ -1,5 +1,5 @@ # inttypes.m4 serial 26 -dnl Copyright (C) 2006-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/largefile.m4 b/m4/largefile.m4 index b7a6c48..8bbdfaa 100644 --- a/m4/largefile.m4 +++ b/m4/largefile.m4 @@ -1,6 +1,6 @@ # Enable large files on systems where this is not the default. -# Copyright 1992-1996, 1998-2015 Free Software Foundation, Inc. +# Copyright 1992-1996, 1998-2016 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/m4/longlong.m4 b/m4/longlong.m4 index d57bc70..36d8b12 100644 --- a/m4/longlong.m4 +++ b/m4/longlong.m4 @@ -1,5 +1,5 @@ # longlong.m4 serial 17 -dnl Copyright (C) 1999-2007, 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 1999-2007, 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/lstat.m4 b/m4/lstat.m4 index adf752c..e143d5c 100644 --- a/m4/lstat.m4 +++ b/m4/lstat.m4 @@ -1,6 +1,6 @@ # serial 27 -# Copyright (C) 1997-2001, 2003-2015 Free Software Foundation, Inc. +# Copyright (C) 1997-2001, 2003-2016 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/m4/manywarnings.m4 b/m4/manywarnings.m4 index b4e38d9..12d68da 100644 --- a/m4/manywarnings.m4 +++ b/m4/manywarnings.m4 @@ -1,5 +1,5 @@ # manywarnings.m4 serial 7 -dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/md5.m4 b/m4/md5.m4 index 0bb9036..f81f42a 100644 --- a/m4/md5.m4 +++ b/m4/md5.m4 @@ -1,5 +1,5 @@ # md5.m4 serial 14 -dnl Copyright (C) 2002-2006, 2008-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2008-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/memrchr.m4 b/m4/memrchr.m4 index f3f74b8..6e7df5c 100644 --- a/m4/memrchr.m4 +++ b/m4/memrchr.m4 @@ -1,5 +1,5 @@ # memrchr.m4 serial 10 -dnl Copyright (C) 2002-2003, 2005-2007, 2009-2015 Free Software Foundation, +dnl Copyright (C) 2002-2003, 2005-2007, 2009-2016 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/m4/mkostemp.m4 b/m4/mkostemp.m4 index cc1b65c..1f44a03 100644 --- a/m4/mkostemp.m4 +++ b/m4/mkostemp.m4 @@ -1,5 +1,5 @@ # mkostemp.m4 serial 2 -dnl Copyright (C) 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/mktime.m4 b/m4/mktime.m4 index 3f0e1ee..78f16ba 100644 --- a/m4/mktime.m4 +++ b/m4/mktime.m4 @@ -1,5 +1,5 @@ # serial 25 -dnl Copyright (C) 2002-2003, 2005-2007, 2009-2015 Free Software Foundation, +dnl Copyright (C) 2002-2003, 2005-2007, 2009-2016 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/m4/multiarch.m4 b/m4/multiarch.m4 index fc575c1..43b5d05 100644 --- a/m4/multiarch.m4 +++ b/m4/multiarch.m4 @@ -1,5 +1,5 @@ # multiarch.m4 serial 7 -dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/nocrash.m4 b/m4/nocrash.m4 index 5628318..ecc55c6 100644 --- a/m4/nocrash.m4 +++ b/m4/nocrash.m4 @@ -1,5 +1,5 @@ # nocrash.m4 serial 4 -dnl Copyright (C) 2005, 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/off_t.m4 b/m4/off_t.m4 index 0eb1467..282751b 100644 --- a/m4/off_t.m4 +++ b/m4/off_t.m4 @@ -1,5 +1,5 @@ # off_t.m4 serial 1 -dnl Copyright (C) 2012-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2012-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/pathmax.m4 b/m4/pathmax.m4 index 0e3db7a..6f8e59a 100644 --- a/m4/pathmax.m4 +++ b/m4/pathmax.m4 @@ -1,5 +1,5 @@ # pathmax.m4 serial 10 -dnl Copyright (C) 2002-2003, 2005-2006, 2009-2015 Free Software Foundation, +dnl Copyright (C) 2002-2003, 2005-2006, 2009-2016 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/m4/pipe2.m4 b/m4/pipe2.m4 index 0b64651..c09fcee 100644 --- a/m4/pipe2.m4 +++ b/m4/pipe2.m4 @@ -1,5 +1,5 @@ # pipe2.m4 serial 2 -dnl Copyright (C) 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/pselect.m4 b/m4/pselect.m4 index df00705..2c620de 100644 --- a/m4/pselect.m4 +++ b/m4/pselect.m4 @@ -1,5 +1,5 @@ # pselect.m4 serial 2 -dnl Copyright (C) 2011-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/pthread_sigmask.m4 b/m4/pthread_sigmask.m4 index 2598856..5b3e1ca 100644 --- a/m4/pthread_sigmask.m4 +++ b/m4/pthread_sigmask.m4 @@ -1,5 +1,5 @@ # pthread_sigmask.m4 serial 16 -dnl Copyright (C) 2011-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/putenv.m4 b/m4/putenv.m4 index 73a5f46..c3c30d8 100644 --- a/m4/putenv.m4 +++ b/m4/putenv.m4 @@ -1,5 +1,5 @@ # putenv.m4 serial 20 -dnl Copyright (C) 2002-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/readlink.m4 b/m4/readlink.m4 index 88c9bfe..ede0378 100644 --- a/m4/readlink.m4 +++ b/m4/readlink.m4 @@ -1,5 +1,5 @@ # readlink.m4 serial 12 -dnl Copyright (C) 2003, 2007, 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2007, 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/readlinkat.m4 b/m4/readlinkat.m4 index 3477602..428b183 100644 --- a/m4/readlinkat.m4 +++ b/m4/readlinkat.m4 @@ -1,7 +1,7 @@ # serial 5 # See if we need to provide readlinkat replacement. -dnl Copyright (C) 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/secure_getenv.m4 b/m4/secure_getenv.m4 index 6afe89f..00194c8 100644 --- a/m4/secure_getenv.m4 +++ b/m4/secure_getenv.m4 @@ -1,5 +1,5 @@ # Look up an environment variable more securely. -dnl Copyright 2013-2015 Free Software Foundation, Inc. +dnl Copyright 2013-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/sha1.m4 b/m4/sha1.m4 index 9d6aa0c..fbcb788 100644 --- a/m4/sha1.m4 +++ b/m4/sha1.m4 @@ -1,5 +1,5 @@ # sha1.m4 serial 12 -dnl Copyright (C) 2002-2006, 2008-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2008-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/sha256.m4 b/m4/sha256.m4 index a12cd7e..91f63b7 100644 --- a/m4/sha256.m4 +++ b/m4/sha256.m4 @@ -1,5 +1,5 @@ # sha256.m4 serial 8 -dnl Copyright (C) 2005, 2008-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2008-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/sha512.m4 b/m4/sha512.m4 index 77c76a8..3247e0a 100644 --- a/m4/sha512.m4 +++ b/m4/sha512.m4 @@ -1,5 +1,5 @@ # sha512.m4 serial 9 -dnl Copyright (C) 2005-2006, 2008-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2005-2006, 2008-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/sig2str.m4 b/m4/sig2str.m4 index 71cfa4b..83acddd 100644 --- a/m4/sig2str.m4 +++ b/m4/sig2str.m4 @@ -1,5 +1,5 @@ # serial 7 -dnl Copyright (C) 2002, 2005-2006, 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2005-2006, 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/signal_h.m4 b/m4/signal_h.m4 index f737c36..bcfd7b4 100644 --- a/m4/signal_h.m4 +++ b/m4/signal_h.m4 @@ -1,5 +1,5 @@ # signal_h.m4 serial 18 -dnl Copyright (C) 2007-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/socklen.m4 b/m4/socklen.m4 index bcabed3..634c43a 100644 --- a/m4/socklen.m4 +++ b/m4/socklen.m4 @@ -1,5 +1,5 @@ # socklen.m4 serial 10 -dnl Copyright (C) 2005-2007, 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2005-2007, 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/ssize_t.m4 b/m4/ssize_t.m4 index 25bd451..3e7b9e6 100644 --- a/m4/ssize_t.m4 +++ b/m4/ssize_t.m4 @@ -1,5 +1,5 @@ # ssize_t.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2001-2003, 2006, 2010-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2003, 2006, 2010-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/st_dm_mode.m4 b/m4/st_dm_mode.m4 index 6543bf6..1cfe68e 100644 --- a/m4/st_dm_mode.m4 +++ b/m4/st_dm_mode.m4 @@ -1,6 +1,6 @@ # serial 6 -# Copyright (C) 1998-1999, 2001, 2009-2015 Free Software Foundation, Inc. +# Copyright (C) 1998-1999, 2001, 2009-2016 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/m4/stat-time.m4 b/m4/stat-time.m4 index 9c8ceec..231cb74 100644 --- a/m4/stat-time.m4 +++ b/m4/stat-time.m4 @@ -1,6 +1,6 @@ # Checks for stat-related time functions. -# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2015 Free Software +# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2016 Free Software # Foundation, Inc. # This file is free software; the Free Software Foundation diff --git a/m4/stat.m4 b/m4/stat.m4 index d1b3768..a794975 100644 --- a/m4/stat.m4 +++ b/m4/stat.m4 @@ -1,6 +1,6 @@ # serial 11 -# Copyright (C) 2009-2015 Free Software Foundation, Inc. +# Copyright (C) 2009-2016 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/m4/stdalign.m4 b/m4/stdalign.m4 index 033b0d3..49980cd 100644 --- a/m4/stdalign.m4 +++ b/m4/stdalign.m4 @@ -1,6 +1,6 @@ # Check for stdalign.h that conforms to C11. -dnl Copyright 2011-2015 Free Software Foundation, Inc. +dnl Copyright 2011-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/stddef_h.m4 b/m4/stddef_h.m4 index 2310502..c045c65 100644 --- a/m4/stddef_h.m4 +++ b/m4/stddef_h.m4 @@ -1,6 +1,6 @@ dnl A placeholder for , for platforms that have issues. # stddef_h.m4 serial 5 -dnl Copyright (C) 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/stdint.m4 b/m4/stdint.m4 index 4011a49..0f40ce8 100644 --- a/m4/stdint.m4 +++ b/m4/stdint.m4 @@ -1,5 +1,5 @@ # stdint.m4 serial 43 -dnl Copyright (C) 2001-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4 index f60cc21..0e38758 100644 --- a/m4/stdio_h.m4 +++ b/m4/stdio_h.m4 @@ -1,5 +1,5 @@ # stdio_h.m4 serial 46 -dnl Copyright (C) 2007-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4 index 0b4c623e..19107c4 100644 --- a/m4/stdlib_h.m4 +++ b/m4/stdlib_h.m4 @@ -1,5 +1,5 @@ # stdlib_h.m4 serial 42 -dnl Copyright (C) 2007-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/stpcpy.m4 b/m4/stpcpy.m4 index 7e28bee..70bbfd8 100644 --- a/m4/stpcpy.m4 +++ b/m4/stpcpy.m4 @@ -1,5 +1,5 @@ # stpcpy.m4 serial 8 -dnl Copyright (C) 2002, 2007, 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2007, 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/strftime.m4 b/m4/strftime.m4 index 4557626..9598e72 100644 --- a/m4/strftime.m4 +++ b/m4/strftime.m4 @@ -1,6 +1,6 @@ # serial 33 -# Copyright (C) 1996-1997, 1999-2007, 2009-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-1997, 1999-2007, 2009-2016 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/m4/string_h.m4 b/m4/string_h.m4 index 55d09ef..0c5ec6f 100644 --- a/m4/string_h.m4 +++ b/m4/string_h.m4 @@ -1,6 +1,6 @@ # Configure a GNU-like replacement for . -# Copyright (C) 2007-2015 Free Software Foundation, Inc. +# Copyright (C) 2007-2016 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/m4/strtoimax.m4 b/m4/strtoimax.m4 index fde732a..9d920ab 100644 --- a/m4/strtoimax.m4 +++ b/m4/strtoimax.m4 @@ -1,5 +1,5 @@ # strtoimax.m4 serial 14 -dnl Copyright (C) 2002-2004, 2006, 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2004, 2006, 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/strtoll.m4 b/m4/strtoll.m4 index 666f44a..3ad665e 100644 --- a/m4/strtoll.m4 +++ b/m4/strtoll.m4 @@ -1,5 +1,5 @@ # strtoll.m4 serial 7 -dnl Copyright (C) 2002, 2004, 2006, 2008-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2004, 2006, 2008-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/strtoull.m4 b/m4/strtoull.m4 index 4267bd7..78a67c7 100644 --- a/m4/strtoull.m4 +++ b/m4/strtoull.m4 @@ -1,5 +1,5 @@ # strtoull.m4 serial 7 -dnl Copyright (C) 2002, 2004, 2006, 2008-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2004, 2006, 2008-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/strtoumax.m4 b/m4/strtoumax.m4 index 5312ef4..1a5ee4b 100644 --- a/m4/strtoumax.m4 +++ b/m4/strtoumax.m4 @@ -1,5 +1,5 @@ # strtoumax.m4 serial 12 -dnl Copyright (C) 2002-2004, 2006, 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2004, 2006, 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/symlink.m4 b/m4/symlink.m4 index a59e2f0..d15d915 100644 --- a/m4/symlink.m4 +++ b/m4/symlink.m4 @@ -1,7 +1,7 @@ # serial 6 # See if we need to provide symlink replacement. -dnl Copyright (C) 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/sys_select_h.m4 b/m4/sys_select_h.m4 index 5ec5919..23526e5 100644 --- a/m4/sys_select_h.m4 +++ b/m4/sys_select_h.m4 @@ -1,5 +1,5 @@ # sys_select_h.m4 serial 20 -dnl Copyright (C) 2006-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/sys_socket_h.m4 b/m4/sys_socket_h.m4 index eaeabe7..ae500c7 100644 --- a/m4/sys_socket_h.m4 +++ b/m4/sys_socket_h.m4 @@ -1,5 +1,5 @@ # sys_socket_h.m4 serial 23 -dnl Copyright (C) 2005-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2005-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/sys_stat_h.m4 b/m4/sys_stat_h.m4 index 6c909e8..3d43b6f 100644 --- a/m4/sys_stat_h.m4 +++ b/m4/sys_stat_h.m4 @@ -1,5 +1,5 @@ # sys_stat_h.m4 serial 28 -*- Autoconf -*- -dnl Copyright (C) 2006-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/sys_time_h.m4 b/m4/sys_time_h.m4 index 28c8b1a..3061a9c 100644 --- a/m4/sys_time_h.m4 +++ b/m4/sys_time_h.m4 @@ -1,7 +1,7 @@ # Configure a replacement for . # serial 8 -# Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. +# Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/m4/sys_types_h.m4 b/m4/sys_types_h.m4 index 2232aec..b0aabb4 100644 --- a/m4/sys_types_h.m4 +++ b/m4/sys_types_h.m4 @@ -1,5 +1,5 @@ # sys_types_h.m4 serial 5 -dnl Copyright (C) 2011-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/tempname.m4 b/m4/tempname.m4 index b1694d6..acf4c8d 100644 --- a/m4/tempname.m4 +++ b/m4/tempname.m4 @@ -1,6 +1,6 @@ #serial 5 -# Copyright (C) 2006-2007, 2009-2015 Free Software Foundation, Inc. +# Copyright (C) 2006-2007, 2009-2016 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/m4/time_h.m4 b/m4/time_h.m4 index 754b469..eb2a631 100644 --- a/m4/time_h.m4 +++ b/m4/time_h.m4 @@ -1,6 +1,6 @@ # Configure a more-standard replacement for . -# Copyright (C) 2000-2001, 2003-2007, 2009-2015 Free Software Foundation, Inc. +# Copyright (C) 2000-2001, 2003-2007, 2009-2016 Free Software Foundation, Inc. # serial 9 diff --git a/m4/time_r.m4 b/m4/time_r.m4 index 8df7e13..21b4a2c 100644 --- a/m4/time_r.m4 +++ b/m4/time_r.m4 @@ -1,6 +1,6 @@ dnl Reentrant time functions: localtime_r, gmtime_r. -dnl Copyright (C) 2003, 2006-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2006-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/time_rz.m4 b/m4/time_rz.m4 index 0c1f2c3..9b1db1b 100644 --- a/m4/time_rz.m4 +++ b/m4/time_rz.m4 @@ -1,6 +1,6 @@ dnl Time zone functions: tzalloc, localtime_rz, etc. -dnl Copyright (C) 2015 Free Software Foundation, Inc. +dnl Copyright (C) 2015-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/timegm.m4 b/m4/timegm.m4 index 8e68b99..752aa43 100644 --- a/m4/timegm.m4 +++ b/m4/timegm.m4 @@ -1,5 +1,5 @@ # timegm.m4 serial 11 -dnl Copyright (C) 2003, 2007, 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2007, 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/timer_time.m4 b/m4/timer_time.m4 index 962bbd2..114f92a 100644 --- a/m4/timer_time.m4 +++ b/m4/timer_time.m4 @@ -1,5 +1,5 @@ # timer_time.m4 serial 3 -dnl Copyright (C) 2011-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/timespec.m4 b/m4/timespec.m4 index 06b3533..2482518 100644 --- a/m4/timespec.m4 +++ b/m4/timespec.m4 @@ -1,6 +1,6 @@ #serial 15 -# Copyright (C) 2000-2001, 2003-2007, 2009-2015 Free Software Foundation, Inc. +# Copyright (C) 2000-2001, 2003-2007, 2009-2016 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/m4/tm_gmtoff.m4 b/m4/tm_gmtoff.m4 index 71a88f9..ce0671f 100644 --- a/m4/tm_gmtoff.m4 +++ b/m4/tm_gmtoff.m4 @@ -1,5 +1,5 @@ # tm_gmtoff.m4 serial 3 -dnl Copyright (C) 2002, 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4 index b3c581f..544dadb 100644 --- a/m4/unistd_h.m4 +++ b/m4/unistd_h.m4 @@ -1,5 +1,5 @@ # unistd_h.m4 serial 68 -dnl Copyright (C) 2006-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/utimbuf.m4 b/m4/utimbuf.m4 index 7c33ae9..d2473bf 100644 --- a/m4/utimbuf.m4 +++ b/m4/utimbuf.m4 @@ -1,6 +1,6 @@ # serial 9 -# Copyright (C) 1998-2001, 2003-2004, 2007, 2009-2015 Free Software Foundation, +# Copyright (C) 1998-2001, 2003-2004, 2007, 2009-2016 Free Software Foundation, # Inc. # # This file is free software; the Free Software Foundation diff --git a/m4/utimens.m4 b/m4/utimens.m4 index b022cfd..211b1fc 100644 --- a/m4/utimens.m4 +++ b/m4/utimens.m4 @@ -1,4 +1,4 @@ -dnl Copyright (C) 2003-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2003-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/utimes.m4 b/m4/utimes.m4 index e26a576..a016723 100644 --- a/m4/utimes.m4 +++ b/m4/utimes.m4 @@ -1,7 +1,7 @@ # Detect some bugs in glibc's implementation of utimes. # serial 3 -dnl Copyright (C) 2003-2005, 2009-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2003-2005, 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/vararrays.m4 b/m4/vararrays.m4 index 6e09c7b..93fd66e 100644 --- a/m4/vararrays.m4 +++ b/m4/vararrays.m4 @@ -4,7 +4,7 @@ # From Paul Eggert -# Copyright (C) 2001, 2009-2015 Free Software Foundation, Inc. +# Copyright (C) 2001, 2009-2016 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/m4/warnings.m4 b/m4/warnings.m4 index 5ae01de..924e21d 100644 --- a/m4/warnings.m4 +++ b/m4/warnings.m4 @@ -1,5 +1,5 @@ # warnings.m4 serial 11 -dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/wchar_t.m4 b/m4/wchar_t.m4 index dc964e6..2db8c3f 100644 --- a/m4/wchar_t.m4 +++ b/m4/wchar_t.m4 @@ -1,5 +1,5 @@ # wchar_t.m4 serial 4 (gettext-0.18.2) -dnl Copyright (C) 2002-2003, 2008-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2003, 2008-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. commit 394c81c092829cf82c41b859b3a246952854056b Author: YAMAMOTO Mitsuharu Date: Thu Dec 31 11:28:16 2015 +0900 Move variables to inner loop, preparing for Mac port merge * src/keyboard.c (command_loop_1): Move variables `cmd', `keybuf', and `i' to inner loop. diff --git a/src/keyboard.c b/src/keyboard.c index c3aa76a..83b004b 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1234,9 +1234,6 @@ static void adjust_point_for_property (ptrdiff_t, bool); Lisp_Object command_loop_1 (void) { - Lisp_Object cmd; - Lisp_Object keybuf[30]; - int i; EMACS_INT prev_modiff = 0; struct buffer *prev_buffer = NULL; bool already_adjusted = 0; @@ -1280,6 +1277,10 @@ command_loop_1 (void) while (1) { + Lisp_Object cmd; + Lisp_Object keybuf[30]; + int i; + if (! FRAME_LIVE_P (XFRAME (selected_frame))) Fkill_emacs (Qnil); commit 2e5a89fad151f8efa97aea3f400823a95bee6289 Author: Paul Eggert Date: Mon Jan 18 21:31:09 2016 -0800 Minor improvements to (random t) documentation * doc/lispref/numbers.texi (Random Numbers): * src/fns.c (Frandom): Omit unnecessary details about randomness fallback. Say that it is a fallback. diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi index 3a9483a..28eb6b1 100644 --- a/doc/lispref/numbers.texi +++ b/doc/lispref/numbers.texi @@ -1252,9 +1252,9 @@ any integer representable in Lisp, i.e., an integer between (@pxref{Integer Basics}). If @var{limit} is @code{t}, it means to choose a new seed as if Emacs -were restarting. The new seed will be set from the system entropy, if -that is available, or from the current time and Emacs process's PID -(@pxref{System Environment, emacs-pid}) if not. +were restarting, typically from the system entropy. On systems +lacking entropy pools, choose the seed from less-random volatile data +such as the current time. If @var{limit} is a string, it means to choose a new seed based on the string's contents. diff --git a/src/fns.c b/src/fns.c index 19fa440..86ad333 100644 --- a/src/fns.c +++ b/src/fns.c @@ -51,7 +51,7 @@ and `most-positive-fixnum', inclusive, are equally likely. With positive integer LIMIT, return random number in interval [0,LIMIT). With argument t, set the random number seed from the system's entropy -pool, or from the current time and pid if entropy is unavailable. +pool if available, otherwise from less-random volatile data such as the time. With a string argument, set the seed based on the string's contents. Other values of LIMIT are ignored. commit 0ed8b42d22bbcacd03c3f82bee9f855815b8b284 Author: Dmitry Gutov Date: Tue Jan 19 08:05:23 2016 +0300 ; Fix a typo diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 969f2ed..53f8a6b 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -1894,7 +1894,7 @@ It will be properly highlighted even when the call omits parens.") (point) end))) (define-obsolete-function-alias - 'ruby-syntax-propertize-function 'ruby-syntax-properize "25.1") + 'ruby-syntax-propertize-function 'ruby-syntax-propertize "25.1") (defun ruby-syntax-propertize-heredoc (limit) (let ((ppss (syntax-ppss)) commit 2ac78c2346c94f30bf0253321ba4e4628a03ed72 Author: Dmitry Gutov Date: Tue Jan 19 08:03:41 2016 +0300 Rename methods in Ruby etags example file * test/etags/ruby-src/test.rb: Rename the example methods to correspond to the common terminology used in Ruby. * test/etags/CTAGS.good: * test/etags/ETAGS.good_1: * test/etags/ETAGS.good_2: * test/etags/ETAGS.good_3: * test/etags/ETAGS.good_4: * test/etags/ETAGS.good_5: * test/etags/ETAGS.good_6: Adjust accordingly. diff --git a/test/etags/CTAGS.good b/test/etags/CTAGS.good index 245f670..86b019a 100644 --- a/test/etags/CTAGS.good +++ b/test/etags/CTAGS.good @@ -438,7 +438,7 @@ Cjava_entries c-src/etags.c /^Cjava_entries (FILE *inf)$/ Cjava_help c-src/etags.c 551 Cjava_suffixes c-src/etags.c 549 ClassExample ruby-src/test.rb /^ class ClassExample$/ -ClassExample.singleton_class_method ruby-src/test.rb /^ def ClassExample.singleton_class_method$/ +ClassExample.class_method ruby-src/test.rb /^ def ClassExample.class_method$/ Clear/p ada-src/2ataspri.adb /^ procedure Clear (Cell : in out TAS_Cell) is$/ Clear/p ada-src/2ataspri.ads /^ procedure Clear (Cell : in out TAS_Cell)/ Cobol_help c-src/etags.c 558 @@ -939,7 +939,7 @@ Metags c-src/etags.c /^main (int argc, char **argv)$/ Mfail cp-src/fail.C /^main()$/ Mkai-test.pl perl-src/kai-test.pl /^package main;$/ ModuleExample ruby-src/test.rb /^module ModuleExample$/ -ModuleExample.singleton_module_method ruby-src/test.rb /^ def ModuleExample.singleton_module_method$/ +ModuleExample.module_class_method ruby-src/test.rb /^ def ModuleExample.module_class_method$/ More_Lisp_Bits c-src/emacs/src/lisp.h 801 MoveLayerAfter lua-src/allegro.lua /^function MoveLayerAfter (this_one)$/ MoveLayerBefore lua-src/allegro.lua /^function MoveLayerBefore (this_one)$/ @@ -2620,10 +2620,10 @@ childDidExit objc-src/Subprocess.m /^- childDidExit$/ chunks_free c-src/emacs/src/gmalloc.c 313 chunks_used c-src/emacs/src/gmalloc.c 311 cjava c-src/etags.c 2936 -class_method ruby-src/test.rb /^ def class_method$/ -class_method_equals= ruby-src/test.rb /^ def class_method_equals=$/ -class_method_exclamation! ruby-src/test.rb /^ def class_method_exclamation!$/ -class_method_question? ruby-src/test.rb /^ def class_method_question?$/ +instance_method ruby-src/test.rb /^ def instance_method$/ +instance_method_equals= ruby-src/test.rb /^ def instance_method_equals=$/ +instance_method_exclamation! ruby-src/test.rb /^ def instance_method_exclamation!$/ +instance_method_question? ruby-src/test.rb /^ def instance_method_question?$/ classifyLine php-src/lce_functions.php /^ function classifyLine($line)$/ clear cp-src/conway.hpp /^ void clear(void) { alive = 0; }$/ clear-abbrev-table c-src/abbrev.c /^DEFUN ("clear-abbrev-table", Fclear_abbrev_table, / @@ -3450,7 +3450,7 @@ miti html-src/softwarelibero.html /^Sfatiamo alcuni miti$/ modifier_names c-src/emacs/src/keyboard.c 6319 modifier_symbols c-src/emacs/src/keyboard.c 6327 modify_event_symbol c-src/emacs/src/keyboard.c /^modify_event_symbol (ptrdiff_t symbol_num, int mod/ -module_method ruby-src/test.rb /^ def module_method$/ +module_instance_method ruby-src/test.rb /^ def module_instance_method$/ more_aligned_int c.c 165 morecore_nolock c-src/emacs/src/gmalloc.c /^morecore_nolock (size_t size)$/ morecore_recursing c-src/emacs/src/gmalloc.c 604 diff --git a/test/etags/ETAGS.good_1 b/test/etags/ETAGS.good_1 index 2ae4ec4..dac2091 100644 --- a/test/etags/ETAGS.good_1 +++ b/test/etags/ETAGS.good_1 @@ -2980,11 +2980,11 @@ class Configure(760,24879 ruby-src/test.rb,594 module ModuleExample1,0 class ClassExample2,21 - def class_method3,44 - def ClassExample.singleton_class_method6,116 - def class_method_exclamation!9,221 - def class_method_question?12,319 - def class_method_equals=class_method_equals=15,411 + def instance_method3,44 + def ClassExample.class_method6,116 + def instance_method_exclamation!9,221 + def instance_method_question?12,319 + def instance_method_equals=class_method_equals=15,411 def `(18,499 def +(21,589 def [](24,637 @@ -2994,8 +2994,8 @@ module ModuleExample1,0 def <=(<=36,869 def <=>(<=>39,940 def ===(===42,987 - def module_method46,1048 - def ModuleExample.singleton_module_method49,1110 + def module_instance_method46,1048 + def ModuleExample.module_class_method49,1110 ruby-src/test1.ruby,37 class A1,0 diff --git a/test/etags/ETAGS.good_2 b/test/etags/ETAGS.good_2 index 3ec5b21..e5dbefb 100644 --- a/test/etags/ETAGS.good_2 +++ b/test/etags/ETAGS.good_2 @@ -3551,11 +3551,11 @@ class Configure(760,24879 ruby-src/test.rb,594 module ModuleExample1,0 class ClassExample2,21 - def class_method3,44 - def ClassExample.singleton_class_method6,116 - def class_method_exclamation!9,221 - def class_method_question?12,319 - def class_method_equals=class_method_equals=15,411 + def instance_method3,44 + def ClassExample.class_method6,116 + def instance_method_exclamation!9,221 + def instance_method_question?12,319 + def instance_method_equals=class_method_equals=15,411 def `(18,499 def +(21,589 def [](24,637 @@ -3565,8 +3565,8 @@ module ModuleExample1,0 def <=(<=36,869 def <=>(<=>39,940 def ===(===42,987 - def module_method46,1048 - def ModuleExample.singleton_module_method49,1110 + def module_instance_method46,1048 + def ModuleExample.module_class_method49,1110 ruby-src/test1.ruby,37 class A1,0 diff --git a/test/etags/ETAGS.good_3 b/test/etags/ETAGS.good_3 index 43b84ee..804440a 100644 --- a/test/etags/ETAGS.good_3 +++ b/test/etags/ETAGS.good_3 @@ -3324,11 +3324,11 @@ class Configure(760,24879 ruby-src/test.rb,594 module ModuleExample1,0 class ClassExample2,21 - def class_method3,44 - def ClassExample.singleton_class_method6,116 - def class_method_exclamation!9,221 - def class_method_question?12,319 - def class_method_equals=class_method_equals=15,411 + def instance_method3,44 + def ClassExample.class_method6,116 + def instance_method_exclamation!9,221 + def instance_method_question?12,319 + def instance_method_equals=class_method_equals=15,411 def `(18,499 def +(21,589 def [](24,637 @@ -3338,8 +3338,8 @@ module ModuleExample1,0 def <=(<=36,869 def <=>(<=>39,940 def ===(===42,987 - def module_method46,1048 - def ModuleExample.singleton_module_method49,1110 + def module_instance_method46,1048 + def ModuleExample.module_class_method49,1110 ruby-src/test1.ruby,37 class A1,0 diff --git a/test/etags/ETAGS.good_4 b/test/etags/ETAGS.good_4 index 434fe13..3b904eb 100644 --- a/test/etags/ETAGS.good_4 +++ b/test/etags/ETAGS.good_4 @@ -3144,11 +3144,11 @@ class Configure(760,24879 ruby-src/test.rb,594 module ModuleExample1,0 class ClassExample2,21 - def class_method3,44 - def ClassExample.singleton_class_method6,116 - def class_method_exclamation!9,221 - def class_method_question?12,319 - def class_method_equals=class_method_equals=15,411 + def instance_method3,44 + def ClassExample.class_method6,116 + def instance_method_exclamation!9,221 + def instance_method_question?12,319 + def instance_method_equals=class_method_equals=15,411 def `(18,499 def +(21,589 def [](24,637 @@ -3158,8 +3158,8 @@ module ModuleExample1,0 def <=(<=36,869 def <=>(<=>39,940 def ===(===42,987 - def module_method46,1048 - def ModuleExample.singleton_module_method49,1110 + def module_instance_method46,1048 + def ModuleExample.module_class_method49,1110 ruby-src/test1.ruby,37 class A1,0 diff --git a/test/etags/ETAGS.good_5 b/test/etags/ETAGS.good_5 index 425e252..c3a2778 100644 --- a/test/etags/ETAGS.good_5 +++ b/test/etags/ETAGS.good_5 @@ -4059,11 +4059,11 @@ class Configure(760,24879 ruby-src/test.rb,594 module ModuleExample1,0 class ClassExample2,21 - def class_method3,44 - def ClassExample.singleton_class_method6,116 - def class_method_exclamation!9,221 - def class_method_question?12,319 - def class_method_equals=class_method_equals=15,411 + def instance_method3,44 + def ClassExample.class_method6,116 + def instance_method_exclamation!9,221 + def instance_method_question?12,319 + def instance_method_equals=class_method_equals=15,411 def `(18,499 def +(21,589 def [](24,637 @@ -4073,8 +4073,8 @@ module ModuleExample1,0 def <=(<=36,869 def <=>(<=>39,940 def ===(===42,987 - def module_method46,1048 - def ModuleExample.singleton_module_method49,1110 + def module_instance_method46,1048 + def ModuleExample.module_class_method49,1110 ruby-src/test1.ruby,37 class A1,0 diff --git a/test/etags/ETAGS.good_6 b/test/etags/ETAGS.good_6 index 39522db..2014283 100644 --- a/test/etags/ETAGS.good_6 +++ b/test/etags/ETAGS.good_6 @@ -4059,11 +4059,11 @@ class Configure(760,24879 ruby-src/test.rb,594 module ModuleExample1,0 class ClassExample2,21 - def class_method3,44 - def ClassExample.singleton_class_method6,116 - def class_method_exclamation!9,221 - def class_method_question?12,319 - def class_method_equals=class_method_equals=15,411 + def instance_method3,44 + def ClassExample.class_method6,116 + def instance_method_exclamation!9,221 + def instance_method_question?12,319 + def instance_method_equals=class_method_equals=15,411 def `(18,499 def +(21,589 def [](24,637 @@ -4073,8 +4073,8 @@ module ModuleExample1,0 def <=(<=36,869 def <=>(<=>39,940 def ===(===42,987 - def module_method46,1048 - def ModuleExample.singleton_module_method49,1110 + def module_instance_method46,1048 + def ModuleExample.module_class_method49,1110 ruby-src/test1.ruby,37 class A1,0 diff --git a/test/etags/ruby-src/test.rb b/test/etags/ruby-src/test.rb index 9254c5b..adb2cb1 100644 --- a/test/etags/ruby-src/test.rb +++ b/test/etags/ruby-src/test.rb @@ -1,19 +1,19 @@ module ModuleExample class ClassExample - def class_method - puts "in class_method" + def instance_method + puts "in instane_method" end - def ClassExample.singleton_class_method - puts "in singleton_class_method" + def ClassExample.class_method + puts "in class_method" end - def class_method_exclamation! - puts "in class_method_exclamation!" + def instance_method_exclamation! + puts "in instance_method_exclamation!" end - def class_method_question? - puts "in class_method_question?" + def instance_method_question? + puts "in instance_method_question?" end - def class_method_equals= - puts "in class_method_equals=" + def instance_method_equals= + puts "in instance_method_equals=" end def `(command) return "just testing a backquote override" @@ -43,12 +43,16 @@ module ModuleExample self == y end end - def module_method - puts "in module_method" + def module_instance_method + puts "in module_instance_method" end - def ModuleExample.singleton_module_method - puts "in singleton_module_method" + def ModuleExample.module_class_method + puts "in module_class_method" end end -ModuleExample::ClassExample.singleton_class_method +ModuleExample::ClassExample.class_method + +# Local Variables: +# ruby-indent-level: 4 +# End: commit 29da1cb3e7d54f93c0b4f6de00e9fda294a0cdff Author: Dmitry Gutov Date: Tue Jan 19 07:58:46 2016 +0300 Propertize backtick in 'def `(abc)' as symbol constituent * lisp/progmodes/ruby-mode.el (ruby-syntax-propertize): Propertize backtick in 'def `(abc)' as symbol constituent. (ruby-syntax-propertize-function): Rename to ruby-syntax-propertize. diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 8f08b7c..969f2ed 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -1830,7 +1830,7 @@ It will be properly highlighted even when the call omits parens.") "\\)\\s *") "Regexp to match text that can be followed by a regular expression.")) -(defun ruby-syntax-propertize-function (start end) +(defun ruby-syntax-propertize (start end) "Syntactic keywords for Ruby mode. See `syntax-propertize-function'." (let (case-fold-search) (goto-char start) @@ -1856,6 +1856,8 @@ It will be properly highlighted even when the call omits parens.") (zerop (skip-syntax-backward "w_"))) (memq (preceding-char) '(?@ ?$)))) (string-to-syntax "_")))) + ;; Backtick method redefinition. + ("^[ \t]*def +\\(`\\)" (1 "_")) ;; Regular expressions. Start with matching unescaped slash. ("\\(?:\\=\\|[^\\]\\)\\(?:\\\\\\\\\\)*\\(/\\)" (1 (let ((state (save-excursion (syntax-ppss (match-beginning 1))))) @@ -1891,6 +1893,9 @@ It will be properly highlighted even when the call omits parens.") (1 (prog1 "|" (ruby-syntax-propertize-percent-literal end))))) (point) end))) +(define-obsolete-function-alias + 'ruby-syntax-propertize-function 'ruby-syntax-properize "25.1") + (defun ruby-syntax-propertize-heredoc (limit) (let ((ppss (syntax-ppss)) (res '())) @@ -2252,7 +2257,7 @@ See `font-lock-syntax-table'.") (setq-local font-lock-keywords ruby-font-lock-keywords) (setq-local font-lock-syntax-table ruby-font-lock-syntax-table) - (setq-local syntax-propertize-function #'ruby-syntax-propertize-function)) + (setq-local syntax-propertize-function #'ruby-syntax-propertize)) ;;; Invoke ruby-mode when appropriate commit 874a10b13fb2438322ac1c9b437720ada713631b Author: Eli Zaretskii Date: Mon Jan 18 21:53:34 2016 +0200 Fix scrolling under scroll-preserve-screen-position on TTY * src/window.c (window_scroll_line_based): When setting point to preserve screen coordinates, don't let cursor enter either of the two scroll margins. (Bug#22395) diff --git a/src/window.c b/src/window.c index 1a75342..2eacc3a 100644 --- a/src/window.c +++ b/src/window.c @@ -5212,6 +5212,7 @@ window_scroll_line_based (Lisp_Object window, int n, bool whole, bool noerror) w->force_start = true; if (!NILP (Vscroll_preserve_screen_position) + && this_scroll_margin == 0 && (whole || !EQ (Vscroll_preserve_screen_position, Qt))) { SET_PT_BOTH (pos, pos_byte); @@ -5237,8 +5238,16 @@ window_scroll_line_based (Lisp_Object window, int n, bool whole, bool noerror) marker_byte_position (opoint_marker)); else if (!NILP (Vscroll_preserve_screen_position)) { + int nlines = window_scroll_preserve_vpos; + SET_PT_BOTH (pos, pos_byte); - Fvertical_motion (original_pos, window, Qnil); + if (window_scroll_preserve_vpos < this_scroll_margin) + nlines = this_scroll_margin; + else if (window_scroll_preserve_vpos + >= w->total_lines - this_scroll_margin) + nlines = w->total_lines - this_scroll_margin - 1; + Fvertical_motion (Fcons (make_number (window_scroll_preserve_hpos), + make_number (nlines)), window, Qnil); } else SET_PT (top_margin); @@ -5264,8 +5273,16 @@ window_scroll_line_based (Lisp_Object window, int n, bool whole, bool noerror) { if (!NILP (Vscroll_preserve_screen_position)) { + int nlines = window_scroll_preserve_vpos; + SET_PT_BOTH (pos, pos_byte); - Fvertical_motion (original_pos, window, Qnil); + if (window_scroll_preserve_vpos < this_scroll_margin) + nlines = this_scroll_margin; + else if (window_scroll_preserve_vpos + >= ht - this_scroll_margin) + nlines = ht - this_scroll_margin - 1; + Fvertical_motion (Fcons (make_number (window_scroll_preserve_hpos), + make_number (nlines)), window, Qnil); } else Fvertical_motion (make_number (-1), window, Qnil); commit 2f838b76897329867a49271608beff1116625d59 Author: Lars Magne Ingebrigtsen Date: Mon Jan 18 20:37:44 2016 +0100 Fix shr table rendering of nested tables * shr.el (shr-table-body): Don't include all tbodies in nested tables in the levels above. diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 0703171..88041f7 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -1600,7 +1600,9 @@ The preference is a float determined from `shr-prefer-media-type'." (shr-insert-table (shr-make-table dom sketch-widths t) sketch-widths))) (defun shr-table-body (dom) - (let ((tbodies (dom-by-tag dom 'tbody))) + (let ((tbodies (seq-filter (lambda (child) + (eq (dom-tag child) 'tbody)) + (dom-children dom)))) (cond ((null tbodies) dom) commit 4e559f22a00b38e067cde7863635c96d8790e4b3 Author: Dmitry Gutov Date: Mon Jan 18 22:12:44 2016 +0300 * lisp/progmodes/project.el (project--read-regexp): Quote the identifier. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index a972def..85f3907 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -264,7 +264,6 @@ DIRS must contain directory names." (symbol-value var))) (declare-function grep-read-files "grep") -(declare-function xref-collect-matches "xref") (declare-function xref--show-xrefs "xref") (declare-function xref-backend-identifier-at-point "xref") (declare-function xref--find-ignores-arguments "xref") @@ -295,8 +294,8 @@ pattern to search for." (project--find-regexp-in dirs regexp pr))) (defun project--read-regexp () - (read-regexp "Find regexp" - (xref-backend-identifier-at-point (xref-find-backend)))) + (let ((id (xref-backend-identifier-at-point (xref-find-backend)))) + (read-regexp "Find regexp" (and id (regexp-quote id))))) (defun project--find-regexp-in (dirs regexp project) (require 'grep) commit 36b0729ce765c132e04586be0e2deca405b4c313 Author: Dmitry Gutov Date: Mon Jan 18 22:11:46 2016 +0300 Add xref-based replacements for Dired search commands * lisp/dired-aux.el (dired-do-find-regexp) (dired-do-find-regexp-and-replace): New commands. http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00864.html * lisp/dired.el (dired-mode-map): Change bindings for `A' and `Q' to the new commands. * lisp/progmodes/xref.el (xref-query-replace) (xref-collect-matches): Add progress reporters. (xref--find-ignores-arguments): Return nil for zero ignores. (xref--show-xrefs): Add an optional argument. (xref-collect-matches): Drop the assert. 'find' accepts a regular file in place of directory argument, too. diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index a8c40b2..831278c 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -2713,6 +2713,41 @@ with the command \\[tags-loop-continue]." (tags-query-replace from to delimited '(dired-get-marked-files nil nil 'dired-nondirectory-p))) +(declare-function xref--show-xrefs "xref") +(declare-function xref-query-replace "xref") + +;;;###autoload +(defun dired-do-find-regexp (regexp) + "Find all matches for REGEXP in all marked files, recursively." + (interactive "sSearch marked files (regexp): ") + (require 'grep) + (defvar grep-find-ignored-files) + (let* ((files (dired-get-marked-files)) + (ignores (nconc (mapcar + (lambda (s) (concat s "/")) + vc-directory-exclusion-list) + grep-find-ignored-files)) + (xrefs (cl-mapcan + (lambda (file) + (xref-collect-matches regexp "*" file + (and (file-directory-p file) + ignores))) + files))) + (unless xrefs + (user-error "No matches for: %s" regexp)) + (xref--show-xrefs xrefs nil t))) + +;;;###autoload +(defun dired-do-find-regexp-and-replace (from to) + "Replace matches of FROM with TO, in all marked files, recursively." + (interactive + (let ((common + (query-replace-read-args + "Query replace regexp in marked files" t t))) + (list (nth 0 common) (nth 1 common)))) + (with-current-buffer (dired-do-find-regexp from) + (xref-query-replace from to))) + (defun dired-nondirectory-p (file) (not (file-directory-p file))) diff --git a/lisp/dired.el b/lisp/dired.el index d7bc318..0ca14b3 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1450,7 +1450,7 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." (define-key map "." 'dired-clean-directory) (define-key map "~" 'dired-flag-backup-files) ;; Upper case keys (except !) for operating on the marked files - (define-key map "A" 'dired-do-search) + (define-key map "A" 'dired-do-find-regexp) (define-key map "C" 'dired-do-copy) (define-key map "B" 'dired-do-byte-compile) (define-key map "D" 'dired-do-delete) @@ -1460,7 +1460,7 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." (define-key map "M" 'dired-do-chmod) (define-key map "O" 'dired-do-chown) (define-key map "P" 'dired-do-print) - (define-key map "Q" 'dired-do-query-replace-regexp) + (define-key map "Q" 'dired-do-find-regexp-and-replace) (define-key map "R" 'dired-do-rename) (define-key map "S" 'dired-do-symlink) (define-key map "T" 'dired-do-touch) @@ -3905,7 +3905,7 @@ Ask means pop up a menu for the user to select one of copy, move or link." ;;; Start of automatically extracted autoloads. -;;;### (autoloads nil "dired-aux" "dired-aux.el" "7b7e39be8bcaf5f35b2735c3f5635f40") +;;;### (autoloads nil "dired-aux" "dired-aux.el" "ab7321f16a90251f12f0031ddd6a710c") ;;; Generated autoloads from dired-aux.el (autoload 'dired-diff "dired-aux" "\ @@ -4408,6 +4408,16 @@ with the command \\[tags-loop-continue]. \(fn FROM TO &optional DELIMITED)" t nil) +(autoload 'dired-do-find-regexp "dired-aux" "\ +Find all matches for REGEXP in all marked files, recursively. + +\(fn REGEXP)" t nil) + +(autoload 'dired-do-find-regexp-and-replace "dired-aux" "\ +Replace matches of FROM with TO, in all marked files, recursively. + +\(fn FROM TO)" t nil) + (autoload 'dired-show-file-type "dired-aux" "\ Print the type of FILE, according to the `file' command. If you give a prefix to this command, and FILE is a symbolic diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 6220b4c..2bccd85 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -511,11 +511,18 @@ references displayed in the current *xref* buffer." (let ((fr (read-regexp "Xref query-replace (regexp)" ".*"))) (list fr (read-regexp (format "Xref query-replace (regexp) %s with: " fr))))) - (let (pairs item) + (let ((reporter (make-progress-reporter (format "Saving search results...") + 0 (line-number-at-pos (point-max)))) + (counter 0) + pairs item) (unwind-protect (progn (save-excursion (goto-char (point-min)) + ;; TODO: This list should be computed on-demand instead. + ;; As long as the UI just iterates through matches one by + ;; one, there's no need to compute them all in advance. + ;; Then we can throw away the reporter. (while (setq item (xref--search-property 'xref-item)) (when (xref-match-length item) (save-excursion @@ -535,9 +542,11 @@ references displayed in the current *xref* buffer." (line-end-position)) (xref-item-summary item)) (user-error "Search results out of date")) + (progress-reporter-update reporter (cl-incf counter)) (push (cons beg end) pairs))))) (setq pairs (nreverse pairs))) (unless pairs (user-error "No suitable matches here")) + (progress-reporter-done reporter) (xref--query-replace-1 from to pairs)) (dolist (pair pairs) (move-marker (car pair) nil) @@ -713,9 +722,9 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)." (defvar xref--read-pattern-history nil) -(defun xref--show-xrefs (xrefs window) +(defun xref--show-xrefs (xrefs window &optional always-show-list) (cond - ((not (cdr xrefs)) + ((and (not (cdr xrefs)) (not always-show-list)) (xref-push-marker-stack) (xref--pop-to-location (car xrefs) window)) (t @@ -866,11 +875,12 @@ tools are used, and when." (mapc #'kill-buffer (cl-set-difference (buffer-list) orig-buffers))))) +;;;###autoload (defun xref-collect-matches (regexp files dir ignores) "Collect matches for REGEXP inside FILES in DIR. FILES is a string with glob patterns separated by spaces. IGNORES is a list of glob patterns." - (cl-assert (directory-name-p dir)) + ;; DIR can also be a regular file for now; let's not advertise that. (require 'semantic/fw) (grep-compute-defaults) (defvar grep-find-template) @@ -885,6 +895,8 @@ IGNORES is a list of glob patterns." (orig-buffers (buffer-list)) (buf (get-buffer-create " *xref-grep*")) (grep-re (caar grep-regexp-alist)) + (counter 0) + reporter hits) (with-current-buffer buf (erase-buffer) @@ -894,9 +906,17 @@ IGNORES is a list of glob patterns." (push (cons (string-to-number (match-string 2)) (match-string 1)) hits))) + (setq reporter (make-progress-reporter + (format "Collecting search results...") + 0 (length hits))) (unwind-protect - (cl-mapcan (lambda (hit) (xref--collect-matches hit regexp)) + (cl-mapcan (lambda (hit) + (prog1 + (progress-reporter-update reporter counter) + (cl-incf counter)) + (xref--collect-matches hit regexp)) (nreverse hits)) + (progress-reporter-done reporter) ;; TODO: Same as above. (mapc #'kill-buffer (cl-set-difference (buffer-list) orig-buffers))))) @@ -922,23 +942,24 @@ IGNORES is a list of glob patterns." (defun xref--find-ignores-arguments (ignores dir) ;; `shell-quote-argument' quotes the tilde as well. (cl-assert (not (string-match-p "\\`~" dir))) - (concat - (shell-quote-argument "(") - " -path " - (mapconcat - (lambda (ignore) - (when (string-match-p "/\\'" ignore) - (setq ignore (concat ignore "*"))) - (if (string-match "\\`\\./" ignore) - (setq ignore (replace-match dir t t ignore)) - (unless (string-prefix-p "*" ignore) - (setq ignore (concat "*/" ignore)))) - (shell-quote-argument ignore)) - ignores - " -o -path ") - " " - (shell-quote-argument ")") - " -prune -o ")) + (when ignores + (concat + (shell-quote-argument "(") + " -path " + (mapconcat + (lambda (ignore) + (when (string-match-p "/\\'" ignore) + (setq ignore (concat ignore "*"))) + (if (string-match "\\`\\./" ignore) + (setq ignore (replace-match dir t t ignore)) + (unless (string-prefix-p "*" ignore) + (setq ignore (concat "*/" ignore)))) + (shell-quote-argument ignore)) + ignores + " -o -path ") + " " + (shell-quote-argument ")") + " -prune -o "))) (defun xref--regexp-to-extended (str) (replace-regexp-in-string commit 5b62b980f9d89758211959486681dcb8d416ef84 Author: Alan Mackenzie Date: Mon Jan 18 18:51:45 2016 +0000 * doc/lispref/frames.texi (Position Parameters): Say they don't exist on TTYs. diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index 5d873ac..614b7db 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -1188,8 +1188,8 @@ named, this parameter will be @code{nil}. @cindex window position on display @cindex frame position - Position parameters' values are normally measured in pixels, but on -text terminals they count characters or lines instead. + Position parameters' values are measured in pixels. (Note that none +of these parameters exist on TTY frames.) @table @code @vindex left, a frame parameter commit f591e99498d55731de1e17181151dd0c39fa51c1 Author: Eli Zaretskii Date: Mon Jan 18 19:28:49 2016 +0200 Improve user documentation of Xref * doc/emacs/maintaining.texi (Xref, Find Identifiers) (Looking Up Identifiers, Identifier Search, List Identifiers): Adjudicate comments by Dmitry Gutov . See http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00650.html for the details. diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 8842b8e..989d8ff 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1686,19 +1686,38 @@ permitted provided the copyright notice and this notice are preserved. Of course, you should substitute the proper years and copyright holder. @node Xref -@section Find Identifier Definitions and References +@section Find Identifier References @cindex xref - An @dfn{identifier} is a syntactic elements of the program: a -function, a subroutine, a method, a class, a data type, a macro, etc. -In a programming language, each identifier is a symbol in the -language's syntax. Many program development tools provide -capabilities to extract references to identifiers from source files, -record them on specialized data bases, and then use those data bases -to quickly find where each identifier was defined and referenced. + An @dfn{identifier} is a name of a syntactical subunit of the +program: a function, a subroutine, a method, a class, a data type, a +macro, etc. In a programming language, each identifier is a symbol in +the language's syntax. Program development and maintenance requires +capabilities to quickly find where each identifier was defined and +referenced, to rename identifiers across the entire project, etc. -Emacs provides a unified user interface to these tools, called -@samp{xref}. The tools supported by @samp{xref} include: +These capabilities are also useful for finding references in major +modes other than those defined to support programming languages. For +example, chapters, sections, appendices, etc.@: of a text or a @TeX{} +document can be treated as subunits as well, and their names can be +used as identifiers. In this chapter, we use the term ``identifiers'' +to collectively refer to the names of any kind of subunits, in program +source and in other kinds of text alike. + +Emacs provides a unified interface to these capabilities, called +@samp{xref}. + +@cindex xref backend +To do its job, @code{xref} needs to make use of information and to +employ methods specific to the major mode. What files to search for +identifiers, how to find references to identifiers, how to complete on +identifiers---all this and more is mode-specific knowledge. +@code{xref} delegates the mode-specific parts of its job to a +@dfn{backend} provided by the mode; it also includes defaults for some +of its commands, for those modes that don't provide their own. + +A backend can implement its capabilities in a variety of ways. Here +are a few examples: @enumerate a @item @@ -1706,49 +1725,25 @@ Some major modes provide built-in means for looking up the language symbols. For example, Emacs Lisp symbols can be identified by searching the package load history, maintained by the Emacs Lisp interpreter, and by consulting the built-in documentation strings; the -Emacs Lisp mode uses these facilities to find definitions of symbols. - -@item -Etags, the command for tagging identifier definitions which is part of -the Emacs distribution. @xref{Create Tags Table}. - -@item -@acronym{GNU} GLOBAL, the source code tagging system, which provides -the @command{gtags} command and associated utilities. @xref{Command -Line, gtags, , global, GNU GLOBAL source code tag system}. +Emacs Lisp mode uses these facilities in its backend to allow finding +definitions of symbols. (One disadvantage of this kind of backend is +that it only knows about subunits that were loaded into the +interpreter.) @item -Cscope (@uref{http://cscope.sourceforge.net/}, a tool for browsing -source code. - -@item -@acronym{GNU} IDUtils, a package for generating databases of -identifier references and querying those databases. @xref{Top,,, -idutils, ID database utilities}. - -@item -Grep, the venerable program that searches files for lines matching -patterns. @xref{Invoking,,, grep, GNU Grep Manual}. +An external program can extract references by scanning the relevant +files, and build a database of these references. A backend can then +access this database whenever it needs to list or look up references. +The Emacs distribution includes @command{etags}, a command for tagging +identifier definitions in programs, which supports many programming +languages and other major modes, such as HTML, by extracting +references into @dfn{tags tables}. @xref{Create Tags Table}. Major +modes for languages supported by @command{etags} can use tags tables +as basis for their backend. (One disadvantage of this kind of backend +is that tags tables need to be kept reasonably up to date, by +rebuilding them from time to time.) @end enumerate -@noindent -Additional tools could be supported as they become available, or as -user extensions. Each such tool is used as a @dfn{backend} by -commands described in this section. Each command detects which -backends are available for the current major mode, and uses the most -capable of the available backends, with Grep generally serving as the -fall-back backend. - -@cindex tag -The commands described here are useful for finding references in major -modes other than those defined to support programming languages. For -example, chapters, sections, appendices, etc. of a text or a @TeX{} -document can be treated as identifiers as well. In this chapter, we -collectively refer to a reference that specifies the name of the file -where the corresponding subunit is defined, and the position of the -subunit's definition in that file, as a @dfn{tag}. We refer to the -backends used by @code{xref} as @dfn{tagging backends}. - @menu * Find Identifiers:: Commands to find where an identifier is defined or referenced, to list identifiers, etc. @@ -1759,14 +1754,16 @@ backends used by @code{xref} as @dfn{tagging backends}. @node Find Identifiers @subsection Find Identifiers - This subsection describes the commands that use the tagging backends -in order to find definitions of identifiers, references to -identifiers, and perform various queries about identifiers. With most -backends, these definitions and references were recorded as tags in -the database created and maintained by the backend. + This subsection describes the commands that find references to +identifiers and perform various queries about identifiers. Each such +reference could @emph{define} an identifier, e.g., provide the +implementation of a program subunit or the text of a document section; +or it could @emph{use} the identifier, e.g., call a function or a +method, assign a value to a variable, mention a chapter in a +cross-reference, etc. @menu -* Looking Up Identifiers:: Commands to find the definition of a specific tag. +* Looking Up Identifiers:: Commands to find the definition of an identifier. * Xref Commands:: Commands in the @file{*xref*} buffer. * Identifier Search:: Searching and replacing identifiers. * List Identifiers:: Listing identifiers and completing on them. @@ -1794,7 +1791,7 @@ Find definitions of identifier, but display it in another window Find definition of identifier, and display it in a new frame (@code{xref-find-definitions-other-frame}). @item M-, -Pop back to where you previously invoked @kbd{M-.} and friends +Go back to where you previously invoked @kbd{M-.} and friends (@code{xref-pop-marker-stack}). @end table @@ -1832,7 +1829,8 @@ former is @w{@kbd{C-x 4 .}} The command @kbd{C-M-.} (@code{xref-find-apropos}) finds the definitions of one or more identifiers that match a specified regular expression. It is just like @kbd{M-.} except that it does regexp -matching of identifiers instead of symbol name matching. +matching of identifiers instead of matching symbol names as fixed +strings. When any of the above commands finds more than one definition, it presents the @file{*xref*} buffer showing the definition candidates. @@ -1896,13 +1894,9 @@ without displaying the references. @cindex search and replace in multiple files @cindex multiple-file search and replace - The commands in this section visit and search all the files listed -in the @code{xref} backend's database, one by one. For these -commands, the database serves only to specify a sequence of files to -search. These commands scan all the databases starting with the first -one (if any) that describes the current file, proceed from there to -the end of the list, and then scan from the beginning of the list -until they have covered all the databases in the list. + The commands in this section perform various search and replace +operations either on identifiers themselves or on files that reference +them. @table @kbd @item M-? @@ -1931,7 +1925,7 @@ referenced. The XREF mode commands are available in this buffer, see @findex xref-query-replace @kbd{M-x xref-query-replace} reads a regexp to match identifier -names and a string to replace with, just like ordinary @kbd{M-x +names and a replacement string, just like ordinary @kbd{M-x query-replace-regexp}. It then performs the specified replacement in the names of the matching identifiers in all the places in all the files where these identifiers are referenced. This is useful when you @@ -1943,15 +1937,14 @@ be invoked in the @file{*xref*} buffer generated by @code{M-?}. searches for matches in all the files in the selected tags table, one file at a time. It displays the name of the file being searched so you can follow its progress. As soon as it finds an occurrence, -@code{tags-search} returns. This command works only with the etags -backend, and requires tags tables to be available (@pxref{Tags -Tables}). +@code{tags-search} returns. This command requires tags tables to be +available (@pxref{Tags Tables}). @findex tags-loop-continue - Having found one match, you probably want to find all the rest. -Type @kbd{M-x tags-loop-continue}) to resume the @code{tags-search}, -finding one more match. This searches the rest of the current buffer, -followed by the remaining files of the tags table. + Having found one match with @code{tags-search}, you probably want to +find all the rest. Type @kbd{M-x tags-loop-continue} to resume the +@code{tags-search}, finding one more match. This searches the rest of +the current buffer, followed by the remaining files of the tags table. @findex tags-query-replace @kbd{M-x tags-query-replace} performs a single @@ -1960,7 +1953,6 @@ reads a regexp to search for and a string to replace with, just like ordinary @kbd{M-x query-replace-regexp}. It searches much like @kbd{M-x tags-search}, but repeatedly, processing matches according to your input. @xref{Query Replace}, for more information on query replace. -This command works only with the etags backend. @vindex tags-case-fold-search @cindex case-sensitivity and tags search @@ -1976,19 +1968,21 @@ has no special query replace meaning. You can resume the query replace subsequently by typing @kbd{M-x tags-loop-continue}; this command resumes the last tags search or replace command that you did. For instance, to skip the rest of the current file, you can type -@kbd{M-> M-x tags-loop-continue}. +@w{@kbd{M-> M-x tags-loop-continue}}. - The commands in this section carry out much broader searches than -the @code{xref-find-definitions} family. The + Note that the commands described above carry out much broader +searches than the @code{xref-find-definitions} family. The @code{xref-find-definitions} commands search only for definitions of identifiers that match your string or regexp. The commands -@code{tags-search} and @code{tags-query-replace} find every occurrence -of the regexp, as ordinary search commands and replace commands do in -the current buffer. +@code{xref-find-references}, @code{tags-search}, and +@code{tags-query-replace} find every occurrence of the identifier or +regexp, as ordinary search commands and replace commands do in the +current buffer. - As an alternative to @code{tags-search}, you can run @command{grep} -as a subprocess and have Emacs show you the matching lines one by one. -@xref{Grep Searching}. + As an alternative to @code{xref-find-references} and +@code{tags-search}, you can run @command{grep} as a subprocess and +have Emacs show you the matching lines one by one. @xref{Grep +Searching}. @node List Identifiers @subsubsection Identifier Inquiries @@ -1996,20 +1990,23 @@ as a subprocess and have Emacs show you the matching lines one by one. @table @kbd @item C-M-i @itemx M-@key{TAB} -Perform completion on the text around point, using the @code{xref} -backend if one is available (@code{completion-at-point}). -@item M-x list-tags @key{RET} @var{file} @key{RET} -Display a list of the tags defined in the program file @var{file}. +Perform completion on the text around point, using the selected tags +table if one is loaded (@code{completion-at-point}). @item M-x xref-find-apropos @key{RET} @var{regexp} @key{RET} Display a list of all known identifiers matching @var{regexp}. +@item M-x list-tags @key{RET} @var{file} @key{RET} +Display a list of the identifiers defined in the program file +@var{file}. +@item M-x next-file +Visit files recorded in the selected tags table. @end table @cindex completion (symbol names) In most programming language modes, you can type @kbd{C-M-i} or @kbd{M-@key{TAB}} (@code{completion-at-point}) to complete the symbol -at point. If there is an @code{xref} backend available, this command -can use it to generate completion candidates more intelligently. -@xref{Symbol Completion}. +at point. If there is a tags table loaded, this command can use it to +generate completion candidates more intelligently. @xref{Symbol +Completion}. @findex list-tags @kbd{M-x list-tags} reads the name of one of the files covered by @@ -2044,12 +2041,15 @@ for details. The first time it is called, it visits the first file covered by the table. Each subsequent call visits the next covered file, unless a prefix argument is supplied, in which case it returns to the first -file. This command works only with the etags backend. +file. This command requires a tags table to be selected. @node Tags Tables @subsection Tags Tables @cindex tags and tag tables +@cindex tag + A @dfn{tag} is a synonym for identifier reference. @xref{Xref}. + A @dfn{tags table} records the tags extracted by scanning the source code of a certain program or a certain document. Tags extracted from generated files reference the original files, rather than the diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index e4bd85c..780e00c 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -1358,7 +1358,7 @@ the @kbd{M-@key{TAB}} key is usually reserved by the window manager for switching graphical windows, so you should type @kbd{C-M-i} or @kbd{@key{ESC} @key{TAB}} instead. -@cindex xref-based completion +@cindex tags-based completion @findex completion-at-point @cindex Lisp symbol completion @cindex completion (Lisp symbols) @@ -1368,7 +1368,7 @@ which generates its completion list in a flexible way. If Semantic mode is enabled, it tries to use the Semantic parser data for completion (@pxref{Semantic}). If Semantic mode is not enabled or fails at performing completion, it tries to complete using the -available @code{xref} backend (@pxref{Xref}). If in Emacs Lisp mode, it +selected tags table (@pxref{Tags Tables}). If in Emacs Lisp mode, it performs completion using the function, variable, or property names defined in the current Emacs session. diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index bef74e3..e854646 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -12,10 +12,10 @@ a string. Emacs also has commands to replace occurrences of a string with a different string. There are also commands that do the same thing, but search for patterns instead of fixed strings. - You can also search multiple files under the control of an -@code{xref} backend (@pxref{Identifier Search}) or through the Dired -@kbd{A} command (@pxref{Operating on Files}), or ask the @code{grep} -program to do it (@pxref{Grep Searching}). + You can also search multiple files under the control of @code{xref} +(@pxref{Identifier Search}) or through the Dired @kbd{A} command +(@pxref{Operating on Files}), or ask the @code{grep} program to do it +(@pxref{Grep Searching}). @menu * Incremental Search:: Search happens as you type the string. commit b2eb6911dc8af51a5a9f8b7a011cf63c724d533b Author: Eli Zaretskii Date: Mon Jan 18 18:19:50 2016 +0200 Fix scrolling under scroll-preserve-screen-position and margins * src/window.c (window_scroll_pixel_based): When setting point to preserve screen coordinates, don't let cursor enter either of the two scroll margins. Fix incorrect usage of WINDOW_WANTS_HEADER_LINE_P and use WINDOW_HEADER_LINE_HEIGHT instead of CURRENT_HEADER_LINE_HEIGHT. (Bug#22395) diff --git a/src/window.c b/src/window.c index bbe47c7..1a75342 100644 --- a/src/window.c +++ b/src/window.c @@ -4981,27 +4981,34 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror) if (n > 0) { + int last_y = it.last_visible_y - this_scroll_margin - 1; + /* We moved the window start towards ZV, so PT may be now in the scroll margin at the top. */ move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS); - if (IT_CHARPOS (it) == PT && it.current_y >= this_scroll_margin + if (IT_CHARPOS (it) == PT + && it.current_y >= this_scroll_margin + && it.current_y <= last_y - WINDOW_HEADER_LINE_HEIGHT (w) && (NILP (Vscroll_preserve_screen_position) || EQ (Vscroll_preserve_screen_position, Qt))) /* We found PT at a legitimate height. Leave it alone. */ ; - else if (window_scroll_pixel_based_preserve_y >= 0) - { - /* If we have a header line, take account of it. - This is necessary because we set it.current_y to 0, above. */ - move_it_to (&it, -1, - window_scroll_pixel_based_preserve_x, - (window_scroll_pixel_based_preserve_y - - WINDOW_WANTS_HEADER_LINE_P (w)), - -1, MOVE_TO_Y | MOVE_TO_X); - SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); - } else { + if (window_scroll_pixel_based_preserve_y >= 0) + { + /* Don't enter the scroll margin at the end of the window. */ + int goal_y = min (last_y, window_scroll_pixel_based_preserve_y); + + /* If we have a header line, take account of it. This + is necessary because we set it.current_y to 0, above. */ + move_it_to (&it, -1, + window_scroll_pixel_based_preserve_x, + goal_y - WINDOW_HEADER_LINE_HEIGHT (w), + -1, MOVE_TO_Y | MOVE_TO_X); + } + + /* Get out of the scroll margin at the top of the window. */ while (it.current_y < this_scroll_margin) { int prev = it.current_y; @@ -5025,7 +5032,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror) /* We moved the window start towards BEGV, so PT may be now in the scroll margin at the bottom. */ move_it_to (&it, PT, -1, - (it.last_visible_y - CURRENT_HEADER_LINE_HEIGHT (w) + (it.last_visible_y - WINDOW_HEADER_LINE_HEIGHT (w) - this_scroll_margin - 1), -1, MOVE_TO_POS | MOVE_TO_Y); @@ -5076,14 +5083,20 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror) ; else if (window_scroll_pixel_based_preserve_y >= 0) { + int goal_y = min (it.last_visible_y - this_scroll_margin - 1, + window_scroll_pixel_based_preserve_y); + + /* Don't let the preserved screen Y coordinate put us inside + any of the two margins. */ + if (goal_y < this_scroll_margin) + goal_y = this_scroll_margin; SET_TEXT_POS_FROM_MARKER (start, w->start); start_display (&it, w, start); /* It would be wrong to subtract CURRENT_HEADER_LINE_HEIGHT here because we called start_display again and did not alter it.current_y this time. */ move_it_to (&it, -1, window_scroll_pixel_based_preserve_x, - window_scroll_pixel_based_preserve_y, -1, - MOVE_TO_Y | MOVE_TO_X); + goal_y, -1, MOVE_TO_Y | MOVE_TO_X); SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); } else commit 687a64f637253b5ffbbed3c4f620aabe411e1a17 Author: Eli Zaretskii Date: Mon Jan 18 17:42:57 2016 +0200 Unbreak the MS-Windows build * src/sysdep.c (emacs_gnutls_global_init, gnutls_rnd): Disable for WINDOWSNT, to avoid link failure. (Bug#22202) diff --git a/src/sysdep.c b/src/sysdep.c index 6b2b205..d3e271b 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -100,7 +100,7 @@ along with GNU Emacs. If not, see . */ #include "cm.h" #include "gnutls.h" -#if 0x020c00 <= GNUTLS_VERSION_NUMBER +#if 0x020c00 <= GNUTLS_VERSION_NUMBER && !defined WINDOWSNT # include #else # define emacs_gnutls_global_init() Qnil commit 20defc5538de705fc6b39d5a754244e6787db162 Author: Alan Mackenzie Date: Mon Jan 18 13:32:22 2016 +0000 Desktop: protect users against inadvertant upgrading of desktop file. An upgraded (version 208) desktop file cannot be read in Emacs < 25. * etc/NEWS: Add an entry about upgrading a desktop file. * lisp/desktop.el (desktop-file-version): Amend doc string. (desktop-native-file-version, desktop-io-file-version): new variables. (desktop-clear): Set desktop-io-file-version to nil. (desktop-buffer-info): make the presence of the last item on the list conditional on (>= desktop-io-file-version 208). (desktop-save): Add extra parameter VERSION to take user's C-u or C-u C-u. Amend the doc string. Add code to determine the output file version. (desktop-create-buffer): Set desktop-io-file-version to the input file's version. diff --git a/etc/NEWS b/etc/NEWS index c0be46f..e9b539a 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -315,6 +315,17 @@ current package keywords are recognized. Set the new option It's meant for use together with `compile': emacs -batch --eval "(checkdoc-file \"subr.el\")" +** Desktop + +--- +*** The desktop format version has been upgraded from 206 to 208. +Although Emacs 25.1 can read a version 206 desktop, earlier Emacsen +cannot read a version 208 desktop. To upgrade your desktop file, you +must explicitly request the upgrade, by C-u M-x desktop-save. You are +recommended to do this as soon as you have firmly upgraded to Emacs +25.1 (or later). Should you ever need to downgrade your desktop file +to version 206, you can do this with C-u C-u M-x desktop-save. + +++ ** New function `bookmark-set-no-overwrite' bound to C-x r M. It raises an error if a bookmark of that name already exists, diff --git a/lisp/desktop.el b/lisp/desktop.el index cb973c4..e795d9c 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -140,8 +140,15 @@ (defvar desktop-file-version "208" "Version number of desktop file format. -Written into the desktop file and used at desktop read to provide -backward compatibility.") +Used at desktop read to provide backward compatibility.") + +(defconst desktop-native-file-version 208 + "Format version of the current desktop package, an integer.") +(defvar desktop-io-file-version nil + "The format version of the current desktop file (an integer) or nil.") +;; Note: Historically, the version number is embedded in the entry for +;; each buffer. It is highly inadvisable for different buffer entries +;; to have different format versions. ;; ---------------------------------------------------------------------------- ;; USER OPTIONS -- settings you might want to play with. @@ -693,6 +700,7 @@ deletes all frames except the selected one (and its minibuffer frame, if different)." (interactive) (desktop-lazy-abort) + (setq desktop-io-file-version nil) (dolist (var desktop-globals-to-clear) (if (symbolp var) (eval `(setq-default ,var nil)) @@ -781,44 +789,46 @@ buffer, which is (in order): local variables; auxiliary information given by `desktop-var-serdes-funs'." (set-buffer buffer) - (list - ;; base name of the buffer; replaces the buffer name if managed by uniquify - (and (fboundp 'uniquify-buffer-base-name) (uniquify-buffer-base-name)) - ;; basic information - (desktop-file-name (buffer-file-name) desktop-dirname) - (buffer-name) - major-mode - ;; minor modes - (let (ret) - (dolist (minor-mode (mapcar #'car minor-mode-alist) ret) - (and (boundp minor-mode) - (symbol-value minor-mode) - (let* ((special (assq minor-mode desktop-minor-mode-table)) - (value (cond (special (cadr special)) - ((functionp minor-mode) minor-mode)))) - (when value (cl-pushnew value ret)))))) - ;; point and mark, and read-only status - (point) - (list (mark t) mark-active) - buffer-read-only - ;; auxiliary information - (when (functionp desktop-save-buffer) - (funcall desktop-save-buffer desktop-dirname)) - ;; local variables - (let ((loclist (buffer-local-variables)) - (ll nil)) - (dolist (local desktop-locals-to-save) - (let ((here (assq local loclist))) - (cond (here - (push here ll)) - ((member local loclist) - (push local ll))))) - ll) - (mapcar (lambda (record) - (let ((var (car record))) - (list var - (funcall (cadr record) (symbol-value var))))) - desktop-var-serdes-funs))) + `( + ;; base name of the buffer; replaces the buffer name if managed by uniquify + ,(and (fboundp 'uniquify-buffer-base-name) (uniquify-buffer-base-name)) + ;; basic information + ,(desktop-file-name (buffer-file-name) desktop-dirname) + ,(buffer-name) + ,major-mode + ;; minor modes + ,(let (ret) + (dolist (minor-mode (mapcar #'car minor-mode-alist) ret) + (and (boundp minor-mode) + (symbol-value minor-mode) + (let* ((special (assq minor-mode desktop-minor-mode-table)) + (value (cond (special (cadr special)) + ((functionp minor-mode) minor-mode)))) + (when value (cl-pushnew value ret)))))) + ;; point and mark, and read-only status + ,(point) + ,(list (mark t) mark-active) + ,buffer-read-only + ;; auxiliary information + ,(when (functionp desktop-save-buffer) + (funcall desktop-save-buffer desktop-dirname)) + ;; local variables + ,(let ((loclist (buffer-local-variables)) + (ll nil)) + (dolist (local desktop-locals-to-save) + (let ((here (assq local loclist))) + (cond (here + (push here ll)) + ((member local loclist) + (push local ll))))) + ll) + ,@(when (>= desktop-io-file-version 208) + (list + (mapcar (lambda (record) + (let ((var (car record))) + (list var + (funcall (cadr record) (symbol-value var))))) + desktop-var-serdes-funs))))) ;; ---------------------------------------------------------------------------- (defun desktop--v2s (value) @@ -983,20 +993,41 @@ Frames with a non-nil `desktop-dont-save' parameter are not saved." :predicate #'desktop--check-dont-save)))) ;;;###autoload -(defun desktop-save (dirname &optional release only-if-changed) +(defun desktop-save (dirname &optional release only-if-changed version) "Save the desktop in a desktop file. Parameter DIRNAME specifies where to save the desktop file. -Optional parameter RELEASE says whether we're done with this desktop. -If ONLY-IF-CHANGED is non-nil, compare the current desktop information -to that in the desktop file, and if the desktop information has not -changed since it was last saved then do not rewrite the file." +Optional parameter RELEASE says whether we're done with this +desktop. If ONLY-IF-CHANGED is non-nil, compare the current +desktop information to that in the desktop file, and if the +desktop information has not changed since it was last saved then +do not rewrite the file. + +This function can save the desktop in either format version +208 (which only Emacs 25.1 and later can read) or version +206 (which is readable by any Emacs from version 22.1 onwards). +By default, it will use the same format the desktop file had when +it was last saved, or version 208 when writing a fresh desktop +file. + +To upgrade a version 206 file to version 208, call this command +explicitly with a bare prefix argument: C-u M-x desktop-save. +You are recommended to do this once you have firmly upgraded to +Emacs 25.1 (or later). To downgrade a version 208 file to version +206, use a double command prefix: C-u C-u M-x desktop-save. +Confirmation will be requested in either case. In a non-interactive +call, VERSION can be given as an integer, either 206 or 208, which +will be accepted as the format version in which to save the file +without further confirmation." (interactive (list ;; Or should we just use (car desktop-path)? (let ((default (if (member "." desktop-path) default-directory user-emacs-directory))) (read-directory-name "Directory to save desktop file in: " - default default t)))) + default default t)) + nil + nil + current-prefix-arg)) (setq desktop-dirname (file-name-as-directory (expand-file-name dirname))) (save-excursion (let ((eager desktop-restore-eager) @@ -1017,12 +1048,34 @@ changed since it was last saved then do not rewrite the file." (desktop-release-lock) (unless (and new-modtime (desktop-owner)) (desktop-claim-lock))) + ;; What format are we going to write the file in? + (setq desktop-io-file-version + (cond + ((equal version '(4)) + (if (or (eq desktop-io-file-version 208) + (yes-or-no-p "Save desktop file in format 208 \ +\(Readable by Emacs 25.1 and later only)? ")) + 208 + (or desktop-io-file-version desktop-native-file-version))) + ((equal version '(16)) + (if (or (eq desktop-io-file-version 206) + (yes-or-no-p "Save desktop file in format 206 \ +\(Readable by all Emacs versions since 22.1)? ")) + 206 + (or desktop-io-file-version desktop-native-file-version))) + ((memq version '(206 208)) + version) + ((null desktop-io-file-version) ; As yet, no desktop file exists. + desktop-native-file-version) + (t + desktop-io-file-version))) + (with-temp-buffer (insert ";; -*- mode: emacs-lisp; coding: emacs-mule; -*-\n" desktop-header ";; Created " (current-time-string) "\n" - ";; Desktop file format version " desktop-file-version "\n" + ";; Desktop file format version " (format "%d" desktop-io-file-version) "\n" ";; Emacs version " emacs-version "\n") (save-excursion (run-hooks 'desktop-save-hook)) (goto-char (point-max)) @@ -1052,7 +1105,7 @@ changed since it was last saved then do not rewrite the file." "desktop-create-buffer" "desktop-append-buffer-args") " " - desktop-file-version) + (format "%d" desktop-io-file-version)) ;; If there's a non-empty base name, we save it instead of the buffer name (when (and base (not (string= base ""))) (setcar (nthcdr 1 l) base)) @@ -1390,6 +1443,8 @@ and try to load that." compacted-vars &rest _unsupported) + (setq desktop-io-file-version file-version) + (let ((desktop-file-version file-version) (desktop-buffer-file-name buffer-filename) (desktop-buffer-name buffer-name) commit 130d512045aa376333b664d58c501b3884187592 Author: Paul Eggert Date: Sun Jan 17 17:16:12 2016 -0800 Initialize GnuTLS before calling gnutls_rnd * src/gnutls.c (emacs_gnutls_global_init): Now extern. Don’t set gnutls_global_initialized if gnutls_global_init fails. * src/sysdep.c: Include "gnutls.h", and if 2.12 or later, which has gnutls_rnd. (emacs_gnutls_global_init, gnutls_rnd): New fallback placeholder macros if before 2.12. (init_random): Initialize gnutls globals before trying to use gnutls_rnd. diff --git a/src/gnutls.c b/src/gnutls.c index a1d058f..01a5983 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -1112,15 +1112,17 @@ The return value is a property list with top-level keys :warnings and /* Initialize global GnuTLS state to defaults. Call `gnutls-global-deinit' when GnuTLS usage is no longer needed. Return zero on success. */ -static Lisp_Object +Lisp_Object emacs_gnutls_global_init (void) { int ret = GNUTLS_E_SUCCESS; if (!gnutls_global_initialized) - ret = gnutls_global_init (); - - gnutls_global_initialized = 1; + { + ret = gnutls_global_init (); + if (ret == GNUTLS_E_SUCCESS) + gnutls_global_initialized = 1; + } return gnutls_make_error (ret); } diff --git a/src/gnutls.h b/src/gnutls.h index c4fe738..8e879c1 100644 --- a/src/gnutls.h +++ b/src/gnutls.h @@ -83,6 +83,7 @@ extern ptrdiff_t emacs_gnutls_record_check_pending (gnutls_session_t state); extern void emacs_gnutls_transport_set_errno (gnutls_session_t state, int err); #endif extern Lisp_Object emacs_gnutls_deinit (Lisp_Object); +extern Lisp_Object emacs_gnutls_global_init (void); #endif diff --git a/src/sysdep.c b/src/sysdep.c index 7f64a3b..6b2b205 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -99,6 +99,14 @@ along with GNU Emacs. If not, see . */ #include "process.h" #include "cm.h" +#include "gnutls.h" +#if 0x020c00 <= GNUTLS_VERSION_NUMBER +# include +#else +# define emacs_gnutls_global_init() Qnil +# define gnutls_rnd(level, data, len) (-1) +#endif + #ifdef WINDOWSNT #include /* In process.h which conflicts with the local copy. */ @@ -2096,22 +2104,26 @@ void init_random (void) { random_seed v; - bool success = false; -#ifndef WINDOWSNT - int fd = emacs_open ("/dev/urandom", O_RDONLY | O_BINARY, 0); - if (fd >= 0) + if (! (EQ (emacs_gnutls_global_init (), Qt) + && gnutls_rnd (GNUTLS_RND_NONCE, &v, sizeof v) == 0)) { - success = emacs_read (fd, &v, sizeof v) == sizeof v; - emacs_close (fd); - } + bool success = false; +#ifndef WINDOWSNT + int fd = emacs_open ("/dev/urandom", O_RDONLY | O_BINARY, 0); + if (0 <= fd) + { + success = emacs_read (fd, &v, sizeof v) == sizeof v; + emacs_close (fd); + } #else - success = w32_init_random (&v, sizeof v) == 0; + success = w32_init_random (&v, sizeof v) == 0; #endif - if (! success) - { - /* Fall back to current time value + PID. */ - struct timespec t = current_timespec (); - v = getpid () ^ t.tv_sec ^ t.tv_nsec; + if (! success) + { + /* Fall back to current time value + PID. */ + struct timespec t = current_timespec (); + v = getpid () ^ t.tv_sec ^ t.tv_nsec; + } } set_random_seed (v); } @@ -2163,7 +2175,7 @@ snprintf (char *buf, size_t bufsize, char const *format, ...) xfree (b); } - if (nbytes > INT_MAX) + if (INT_MAX < nbytes) { #ifdef EOVERFLOW errno = EOVERFLOW; @@ -2221,7 +2233,7 @@ emacs_backtrace (int backtrace_limit) { emacs_write (STDERR_FILENO, "\nBacktrace:\n", 12); backtrace_symbols_fd (buffer, npointers, STDERR_FILENO); - if (npointers > bounded_limit) + if (bounded_limit < npointers) emacs_write (STDERR_FILENO, "...\n", 4); } } @@ -2250,7 +2262,7 @@ emacs_open (const char *file, int oflags, int mode) oflags |= O_CLOEXEC; while ((fd = open (file, oflags, mode)) < 0 && errno == EINTR) QUIT; - if (! O_CLOEXEC && fd >= 0) + if (! O_CLOEXEC && 0 <= fd) fcntl (fd, F_SETFD, FD_CLOEXEC); return fd; } @@ -2817,9 +2829,9 @@ time_from_jiffies (unsigned long long tval, long hz) unsigned long long frac = tval % hz; int ns; - if (s > TYPE_MAXIMUM (time_t)) + if (TYPE_MAXIMUM (time_t) < s) time_overflow (); - if (ULLONG_MAX / TIMESPEC_RESOLUTION >= LONG_MAX - 1 + if (LONG_MAX - 1 <= ULLONG_MAX / TIMESPEC_RESOLUTION || frac <= ULLONG_MAX / TIMESPEC_RESOLUTION) ns = frac * TIMESPEC_RESOLUTION / hz; else @@ -3037,7 +3049,7 @@ system_process_attributes (Lisp_Object pid) record_unwind_protect_int (close_file_unwind, fd); nread = emacs_read (fd, procbuf, sizeof procbuf - 1); } - if (nread > 0) + if (0 < nread) { procbuf[nread] = '\0'; p = procbuf; @@ -3164,12 +3176,12 @@ system_process_attributes (Lisp_Object pid) if (nread) { /* We don't want trailing null characters. */ - for (p = cmdline + nread; p > cmdline && !p[-1]; p--) + for (p = cmdline + nread; cmdline < p && !p[-1]; p--) continue; /* Escape-quote whitespace and backslashes. */ q = cmdline + cmdline_size; - while (p > cmdline) + while (cmdline < p) { char c = *--p; *--q = c ? c : ' '; commit 0f3ea5e172e584875fa5808322af8a7c75503f7b Author: Andreas Schwab Date: Mon Jan 18 00:18:12 2016 +0100 Don't use GnuTLS before it is initialized * src/sysdep.c (init_random): Don't use gnutls_rnd. diff --git a/src/sysdep.c b/src/sysdep.c index 635443c..7f64a3b 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -99,15 +99,6 @@ along with GNU Emacs. If not, see . */ #include "process.h" #include "cm.h" -#ifdef HAVE_GNUTLS -# include -#endif -#if 0x020c00 <= GNUTLS_VERSION_NUMBER -# include -#else -# define gnutls_rnd(level, data, len) (-1) -#endif - #ifdef WINDOWSNT #include /* In process.h which conflicts with the local copy. */ @@ -2105,25 +2096,22 @@ void init_random (void) { random_seed v; - if (gnutls_rnd (GNUTLS_RND_NONCE, &v, sizeof v) != 0) - { - bool success = false; + bool success = false; #ifndef WINDOWSNT - int fd = emacs_open ("/dev/urandom", O_RDONLY | O_BINARY, 0); - if (0 <= fd) - { - success = emacs_read (fd, &v, sizeof v) == sizeof v; - emacs_close (fd); - } + int fd = emacs_open ("/dev/urandom", O_RDONLY | O_BINARY, 0); + if (fd >= 0) + { + success = emacs_read (fd, &v, sizeof v) == sizeof v; + emacs_close (fd); + } #else - success = w32_init_random (&v, sizeof v) == 0; + success = w32_init_random (&v, sizeof v) == 0; #endif - if (! success) - { - /* Fall back to current time value + PID. */ - struct timespec t = current_timespec (); - v = getpid () ^ t.tv_sec ^ t.tv_nsec; - } + if (! success) + { + /* Fall back to current time value + PID. */ + struct timespec t = current_timespec (); + v = getpid () ^ t.tv_sec ^ t.tv_nsec; } set_random_seed (v); } @@ -2175,7 +2163,7 @@ snprintf (char *buf, size_t bufsize, char const *format, ...) xfree (b); } - if (INT_MAX < nbytes) + if (nbytes > INT_MAX) { #ifdef EOVERFLOW errno = EOVERFLOW; @@ -2233,7 +2221,7 @@ emacs_backtrace (int backtrace_limit) { emacs_write (STDERR_FILENO, "\nBacktrace:\n", 12); backtrace_symbols_fd (buffer, npointers, STDERR_FILENO); - if (bounded_limit < npointers) + if (npointers > bounded_limit) emacs_write (STDERR_FILENO, "...\n", 4); } } @@ -2262,7 +2250,7 @@ emacs_open (const char *file, int oflags, int mode) oflags |= O_CLOEXEC; while ((fd = open (file, oflags, mode)) < 0 && errno == EINTR) QUIT; - if (! O_CLOEXEC && 0 <= fd) + if (! O_CLOEXEC && fd >= 0) fcntl (fd, F_SETFD, FD_CLOEXEC); return fd; } @@ -2829,9 +2817,9 @@ time_from_jiffies (unsigned long long tval, long hz) unsigned long long frac = tval % hz; int ns; - if (TYPE_MAXIMUM (time_t) < s) + if (s > TYPE_MAXIMUM (time_t)) time_overflow (); - if (LONG_MAX - 1 <= ULLONG_MAX / TIMESPEC_RESOLUTION + if (ULLONG_MAX / TIMESPEC_RESOLUTION >= LONG_MAX - 1 || frac <= ULLONG_MAX / TIMESPEC_RESOLUTION) ns = frac * TIMESPEC_RESOLUTION / hz; else @@ -3049,7 +3037,7 @@ system_process_attributes (Lisp_Object pid) record_unwind_protect_int (close_file_unwind, fd); nread = emacs_read (fd, procbuf, sizeof procbuf - 1); } - if (0 < nread) + if (nread > 0) { procbuf[nread] = '\0'; p = procbuf; @@ -3176,12 +3164,12 @@ system_process_attributes (Lisp_Object pid) if (nread) { /* We don't want trailing null characters. */ - for (p = cmdline + nread; cmdline < p && !p[-1]; p--) + for (p = cmdline + nread; p > cmdline && !p[-1]; p--) continue; /* Escape-quote whitespace and backslashes. */ q = cmdline + cmdline_size; - while (cmdline < p) + while (p > cmdline) { char c = *--p; *--q = c ? c : ' '; commit fabb1fa31d1fd60764c025925e6c76c9145e5a59 Author: Paul Eggert Date: Sun Jan 17 14:10:26 2016 -0800 Port cleanup attribute to OpenBSD The OpenBSD C compiler issues false alarms about strcpy, strcat, and sprintf, and this messes up 'configure' when it tests for the cleanup attribute. Work around the problem by using __has_attribute directly. Problem reported by Joakim Jalap (Bug#22385). * configure.ac: Don’t use AX_GCC_VAR_ATTRIBUTE. * m4/ax_gcc_var_attribute.m4: Remove. * src/conf_post.h (__has_attribute): Provide a substitute, for non-GCC or older GCC compilers. All uses changed to assume the substitute. Check for the cleanup attribute. * src/emacs-module.c (module_has_cleanup): Just use __has_attribute. diff --git a/configure.ac b/configure.ac index 8c01aba..3aeba22 100644 --- a/configure.ac +++ b/configure.ac @@ -3327,7 +3327,6 @@ if test "${HAVE_MODULES}" = yes; then fi AC_SUBST(MODULES_OBJ) AC_SUBST(LIBMODULES) -AX_GCC_VAR_ATTRIBUTE(cleanup) AC_CHECK_FUNCS(dladdr) ### Use -lpng if available, unless '--with-png=no'. diff --git a/m4/ax_gcc_var_attribute.m4 b/m4/ax_gcc_var_attribute.m4 deleted file mode 100644 index d12fce8..0000000 --- a/m4/ax_gcc_var_attribute.m4 +++ /dev/null @@ -1,141 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_gcc_var_attribute.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_GCC_VAR_ATTRIBUTE(ATTRIBUTE) -# -# DESCRIPTION -# -# This macro checks if the compiler supports one of GCC's variable -# attributes; many other compilers also provide variable attributes with -# the same syntax. Compiler warnings are used to detect supported -# attributes as unsupported ones are ignored by default so quieting -# warnings when using this macro will yield false positives. -# -# The ATTRIBUTE parameter holds the name of the attribute to be checked. -# -# If ATTRIBUTE is supported define HAVE_VAR_ATTRIBUTE_. -# -# The macro caches its result in the ax_cv_have_var_attribute_ -# variable. -# -# The macro currently supports the following variable attributes: -# -# aligned -# cleanup -# common -# nocommon -# deprecated -# mode -# packed -# tls_model -# unused -# used -# vector_size -# weak -# dllimport -# dllexport -# init_priority -# -# Unsupported variable attributes will be tested against a global integer -# variable and without any arguments given to the attribute itself; the -# result of this check might be wrong or meaningless so use with care. -# -# LICENSE -# -# Copyright (c) 2013 Gabriele Svelto -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 3 - -AC_DEFUN([AX_GCC_VAR_ATTRIBUTE], [ - AS_VAR_PUSHDEF([ac_var], [ax_cv_have_var_attribute_$1]) - - AC_CACHE_CHECK([for __attribute__(($1))], [ac_var], [ - AC_LINK_IFELSE([AC_LANG_PROGRAM([ - m4_case([$1], - [aligned], [ - int foo __attribute__(($1(32))); - ], - [cleanup], [ - int bar(int *t) { return *t; }; - ], - [common], [ - int foo __attribute__(($1)); - ], - [nocommon], [ - int foo __attribute__(($1)); - ], - [deprecated], [ - int foo __attribute__(($1)) = 0; - ], - [mode], [ - long foo __attribute__(($1(word))); - ], - [packed], [ - struct bar { - int baz __attribute__(($1)); - }; - ], - [tls_model], [ - __thread int bar1 __attribute__(($1("global-dynamic"))); - __thread int bar2 __attribute__(($1("local-dynamic"))); - __thread int bar3 __attribute__(($1("initial-exec"))); - __thread int bar4 __attribute__(($1("local-exec"))); - ], - [unused], [ - int foo __attribute__(($1)); - ], - [used], [ - int foo __attribute__(($1)); - ], - [vector_size], [ - int foo __attribute__(($1(16))); - ], - [weak], [ - int foo __attribute__(($1)); - ], - [dllimport], [ - int foo __attribute__(($1)); - ], - [dllexport], [ - int foo __attribute__(($1)); - ], - [init_priority], [ - struct bar { bar() {} ~bar() {} }; - bar b __attribute__(($1(65535/2))); - ], - [ - m4_warn([syntax], [Unsupported attribute $1, the test may fail]) - int foo __attribute__(($1)); - ] - )], [ - m4_case([$1], - [cleanup], [ - int foo __attribute__(($1(bar))) = 0; - foo = foo + 1; - ], - [] - )]) - ], - dnl GCC doesn't exit with an error if an unknown attribute is - dnl provided but only outputs a warning, so accept the attribute - dnl only if no warning were issued. - [AS_IF([test -s conftest.err], - [AS_VAR_SET([ac_var], [no])], - [AS_VAR_SET([ac_var], [yes])])], - [AS_VAR_SET([ac_var], [no])]) - ]) - - AS_IF([test yes = AS_VAR_GET([ac_var])], - [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_VAR_ATTRIBUTE_$1), 1, - [Define to 1 if the system has the `$1' variable attribute])], []) - - AS_VAR_POPDEF([ac_var]) -]) diff --git a/src/conf_post.h b/src/conf_post.h index 98ff12e..5c332a0 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -51,10 +51,21 @@ typedef bool bool_bf; #endif #endif -/* When not using Clang, assume its attributes and features are absent. */ +/* Simulate __has_attribute on compilers that lack it. It is used only + on arguments like alloc_size that are handled in this simulation. */ #ifndef __has_attribute -# define __has_attribute(a) false -#endif +# define __has_attribute(a) __has_attribute_##a +# define __has_attribute_alloc_size (4 < __GNUC__ + (3 <= __GNUC_MINOR__)) +# define __has_attribute_cleanup (3 < __GNUC__ + (4 <= __GNUC_MINOR__)) +# define __has_attribute_externally_visible \ + (4 < __GNUC__ + (1 <= __GNUC_MINOR__)) +# define __has_attribute_no_address_safety_analysis false +# define __has_attribute_no_sanitize_address \ + (4 < __GNUC__ + (8 <= __GNUC_MINOR__)) +#endif + +/* Simulate __has_feature on compilers that lack it. It is used only + to define ADDRESS_SANITIZER below. */ #ifndef __has_feature # define __has_feature(a) false #endif @@ -222,9 +233,7 @@ extern int emacs_setenv_TZ (char const *); #define NO_INLINE #endif -#if (__clang__ \ - ? __has_attribute (externally_visible) \ - : (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1))) +#if __has_attribute (externally_visible) #define EXTERNALLY_VISIBLE __attribute__((externally_visible)) #else #define EXTERNALLY_VISIBLE @@ -253,9 +262,7 @@ extern int emacs_setenv_TZ (char const *); # define ATTRIBUTE_MALLOC #endif -#if (__clang__ \ - ? __has_attribute (alloc_size) \ - : 4 < __GNUC__ + (3 <= __GNUC_MINOR__)) +#if __has_attribute (alloc_size) # define ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) #else # define ATTRIBUTE_ALLOC_SIZE(args) @@ -278,8 +285,7 @@ extern int emacs_setenv_TZ (char const *); /* Attribute of functions whose code should not have addresses sanitized. */ -#if (__has_attribute (no_sanitize_address) \ - || 4 < __GNUC__ + (8 <= __GNUC_MINOR__)) +#if __has_attribute (no_sanitize_address) # define ATTRIBUTE_NO_SANITIZE_ADDRESS \ __attribute__ ((no_sanitize_address)) ADDRESS_SANITIZER_WORKAROUND #elif __has_attribute (no_address_safety_analysis) diff --git a/src/emacs-module.c b/src/emacs-module.c index b5e044e..79a077b 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c @@ -35,8 +35,7 @@ along with GNU Emacs. If not, see . */ /* Feature tests. */ -/* True if __attribute__ ((cleanup (...))) works, false otherwise. */ -#ifdef HAVE_VAR_ATTRIBUTE_CLEANUP +#if __has_attribute (cleanup) enum { module_has_cleanup = true }; #else enum { module_has_cleanup = false }; commit 05e8148a24ebe51fbe758dd16265e8fb81f85953 Author: Paul Eggert Date: Sun Jan 17 12:12:08 2016 -0800 Prefer GnuTLS when acquiring random seed This attempts to improve on the fix for Bug#22202. * configure.ac (HAVE_DEV_URANDOM): Remove. Check /dev/urandom existence at run time, not at build time, since the device could exist in the former but not the latter. * src/sysdep.c [HAVE_GNUTLS]: Include gnutls/gnutls.h. (gnutls_rnd) [GNUTLS_VERSION_NUMBER < 0x020c00]: New fallback macro. (random_seed): New typedef. (set_random_seed): New static function. (seed_random): Use them. (init_random): Use random_seed instead of uintmax_t, so as to not consume more entropy than needed. Prefer gnutls_rnd if it works; this avoids a redundant open of /dev/urandom on GNU/Linux with modern GnuTLS. diff --git a/configure.ac b/configure.ac index 6c9b621..8c01aba 100644 --- a/configure.ac +++ b/configure.ac @@ -4153,22 +4153,6 @@ fi AC_TYPE_MBSTATE_T -AC_MSG_CHECKING([whether "/dev/urandom" is available]) -dev_urandom=no -dnl MSYS, being a Cygwin fork, thinks "/dev/urandom" does exist, so -dnl don't check this for the MinGW builds. -if test "${opsys}" != "mingw32"; then - if test -r "/dev/urandom"; then - AC_DEFINE(HAVE_DEV_URANDOM, 1, [Define if the system supports the "/dev/urandom" device.]) - dev_urandom=yes - fi -fi -if test $dev_urandom = yes; then - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - dnl Fixme: AC_SYS_POSIX_TERMIOS should probably be used, but it's not clear dnl how the tty code is related to POSIX and/or other versions of termios. dnl The following looks like a useful start. diff --git a/src/sysdep.c b/src/sysdep.c index 1fa4229..635443c 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -99,6 +99,15 @@ along with GNU Emacs. If not, see . */ #include "process.h" #include "cm.h" +#ifdef HAVE_GNUTLS +# include +#endif +#if 0x020c00 <= GNUTLS_VERSION_NUMBER +# include +#else +# define gnutls_rnd(level, data, len) (-1) +#endif + #ifdef WINDOWSNT #include /* In process.h which conflicts with the local copy. */ @@ -2068,63 +2077,55 @@ init_signals (bool dumping) # endif /* !HAVE_RANDOM */ #endif /* !RAND_BITS */ +#ifdef HAVE_RANDOM +typedef unsigned int random_seed; +static void set_random_seed (random_seed arg) { srandom (arg); } +#elif defined HAVE_LRAND48 +/* Although srand48 uses a long seed, this is unsigned long to avoid + undefined behavior on signed integer overflow in init_random. */ +typedef unsigned long int random_seed; +static void set_random_seed (random_seed arg) { srand48 (arg); } +#else +typedef unsigned int random_seed; +static void set_random_seed (random_seed arg) { srand (arg); } +#endif + void seed_random (void *seed, ptrdiff_t seed_size) { -#if defined HAVE_RANDOM || ! defined HAVE_LRAND48 - unsigned int arg = 0; -#else - long int arg = 0; -#endif + random_seed arg = 0; unsigned char *argp = (unsigned char *) &arg; unsigned char *seedp = seed; - ptrdiff_t i; - for (i = 0; i < seed_size; i++) + for (ptrdiff_t i = 0; i < seed_size; i++) argp[i % sizeof arg] ^= seedp[i]; -#ifdef HAVE_RANDOM - srandom (arg); -#else -# ifdef HAVE_LRAND48 - srand48 (arg); -# else - srand (arg); -# endif -#endif + set_random_seed (arg); } void init_random (void) { - uintmax_t v; - struct timespec t; - bool success = false; - -#if HAVE_DEV_URANDOM - FILE *fp = fopen ("/dev/urandom", "rb"); - - if (fp) + random_seed v; + if (gnutls_rnd (GNUTLS_RND_NONCE, &v, sizeof v) != 0) { - int i; - - for (i = 0, v = 0; i < sizeof (uintmax_t); i++) + bool success = false; +#ifndef WINDOWSNT + int fd = emacs_open ("/dev/urandom", O_RDONLY | O_BINARY, 0); + if (0 <= fd) { - v <<= 8; - v |= fgetc (fp); + success = emacs_read (fd, &v, sizeof v) == sizeof v; + emacs_close (fd); + } +#else + success = w32_init_random (&v, sizeof v) == 0; +#endif + if (! success) + { + /* Fall back to current time value + PID. */ + struct timespec t = current_timespec (); + v = getpid () ^ t.tv_sec ^ t.tv_nsec; } - fclose (fp); - success = true; - } -#elif defined WINDOWSNT - if (w32_init_random (&v, sizeof v) == 0) - success = true; -#endif /* HAVE_DEV_URANDOM || WINDOWSNT */ - if (!success) - { - /* Fall back to current time value + PID. */ - t = current_timespec (); - v = getpid () ^ t.tv_sec ^ t.tv_nsec; } - seed_random (&v, sizeof v); + set_random_seed (v); } /* commit a0d5b7ae3bb014bb0b1c205d123c597df0e76411 Author: Eli Zaretskii Date: Sat Jan 16 17:36:21 2016 +0200 ; * etc/NEWS: The final touch. diff --git a/etc/NEWS b/etc/NEWS index 3db9897..c0be46f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -168,12 +168,6 @@ the variable `dir-locals-file' for more information. added via the new Network Security Manager (NSM) and controlled via the `network-security-level' variable. -** If Emacs isn't built with TLS support, an external TLS-capable -program is used instead. This program used to be run in --insecure -mode by default, but has now changed to be secure instead, and will -fail if you try to connect to non-verifiable hosts. This is -controlled by the `tls-program' variable. - +++ ** C-h l now also lists the commands that were run. @@ -789,6 +783,13 @@ See the doc string of `sh-indent-after-continuation' for details. --- *** Fatal TLS errors are now silent by default. +--- +*** If Emacs isn't built with TLS support, an external TLS-capable +program is used instead. This program used to be run in --insecure +mode by default, but has now changed to be secure instead, and will +fail if you try to connect to non-verifiable hosts. This is +controlled by the `tls-program' variable. + ** URL +++ commit bd0c23ce0909aec40d17293ba50854d10dd36f31 Author: Eli Zaretskii Date: Sat Jan 16 17:30:11 2016 +0200 Improve documentation of dynamic modules * doc/lispref/loading.texi (How Programs Do Loading): Update the description of searching for files in 'load' when Emacs was built with support for dynamic modules. diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi index 18e67f1..06900a4 100644 --- a/doc/lispref/loading.texi +++ b/doc/lispref/loading.texi @@ -73,12 +73,15 @@ To find the file, @code{load} first looks for a file named @var{filename} with the extension @samp{.elc} appended. If such a file exists, it is loaded. If there is no file by that name, then @code{load} looks for a file named @file{@var{filename}.el}. If that -file exists, it is loaded. Finally, if neither of those names is -found, @code{load} looks for a file named @var{filename} with nothing -appended, and loads it if it exists. (The @code{load} function is not -clever about looking at @var{filename}. In the perverse case of a -file named @file{foo.el.el}, evaluation of @code{(load "foo.el")} will -indeed find it.) +file exists, it is loaded. If Emacs was compiled with support for +dynamic modules (@pxref{Dynamic Modules}), @code{load} next looks for +a file named @file{@var{filename}.@var{ext}}, where @var{ext} is a +system-dependent file-name extension of shared libraries. Finally, if +neither of those names is found, @code{load} looks for a file named +@var{filename} with nothing appended, and loads it if it exists. (The +@code{load} function is not clever about looking at @var{filename}. +In the perverse case of a file named @file{foo.el.el}, evaluation of +@code{(load "foo.el")} will indeed find it.) If Auto Compression mode is enabled, as it is by default, then if @code{load} can not find a file, it searches for a compressed version @@ -100,7 +103,8 @@ being tried. If the optional argument @var{must-suffix} is non-@code{nil}, then @code{load} insists that the file name used must end in either @samp{.el} or @samp{.elc} (possibly extended with a compression -suffix), unless it contains an explicit directory name. +suffix) or the shared-library extension, unless it contains an +explicit directory name. If the option @code{load-prefer-newer} is non-@code{nil}, then when searching suffixes, @code{load} selects whichever version of a file diff --git a/etc/NEWS b/etc/NEWS index 18e37fa..3db9897 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -120,6 +120,7 @@ and can contain escape sequences for command keys, quotes, and the like. * Changes in Emacs 25.1 ++++ ** Emacs can now load shared/dynamic libraries (modules). A dynamic Emacs module is a shared library that provides additional functionality for use in Emacs Lisp programs, just like a package commit e4c431cde35a345690905550eb3714dfa4ff9d30 Author: Eli Zaretskii Date: Sat Jan 16 17:20:34 2016 +0200 * INSTALL: Document --with-modules. diff --git a/INSTALL b/INSTALL index 37ba9d9..6f516bd 100644 --- a/INSTALL +++ b/INSTALL @@ -311,6 +311,9 @@ typical 32-bit host, Emacs integers have 62 bits instead of 30. Use --with-cairo to compile Emacs with Cairo drawing. +Use --with-modules to build Emacs with support for loading dynamic +modules. + Use --enable-gcc-warnings to enable compile-time checks that warn about possibly-questionable C code. This is intended for developers and is useful with GNU-compatible compilers. On a recent GNU system diff --git a/etc/NEWS b/etc/NEWS index 9dba4e5..18e37fa 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -36,6 +36,7 @@ otherwise leave it unmarked. This builds Emacs with Cairo drawing. As a side effect, it provides support for built-in printing, when Emacs was built with GTK+. ++++ ** New configure option --with-modules. This enables support for loading dynamic modules; see below. commit 9f493814bb40f1794ab53c84a5397aba1da58cd7 Author: Eli Zaretskii Date: Sat Jan 16 17:13:16 2016 +0200 Document 'function-put' * doc/lispref/symbols.texi (Symbol Plists): Document 'function-put'. Update documentation of 'function-get'. diff --git a/doc/lispref/symbols.texi b/doc/lispref/symbols.texi index c99f993..8c1ec3d 100644 --- a/doc/lispref/symbols.texi +++ b/doc/lispref/symbols.texi @@ -461,10 +461,23 @@ You could define @code{put} in terms of @code{setplist} and @end example @end defun -@defun function-get symbol property +@defun function-get symbol property &optional autoload This function is identical to @code{get}, except that if @var{symbol} is the name of a function alias, it looks in the property list of the -symbol naming the actual function. @xref{Defining Functions}. +symbol naming the actual function. @xref{Defining Functions}. If the +optional argument @var{autoload} is non-@code{nil}, and @var{symbol} +is auto-loaded, this function will try to autoload it, since +autoloading might set @var{property} of @var{symbol}. If +@var{autoload} is the symbol @code{macro}, only try autoloading if +@var{symbol} is an auto-loaded macro. +@end defun + +@defun function-put function property value +This function sets @var{property} of @var{function} to @var{value}. +@var{function} should be a symbol. This function is preferred to +calling @code{put} for setting properties of a function, because it +will allow us some day to implement remapping of old properties to new +ones. @end defun @node Standard Properties diff --git a/etc/NEWS b/etc/NEWS index 6735718..9dba4e5 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1472,6 +1472,7 @@ MS-Windows doesn't support UTF-8 as codeset in its locales. but makes `called-interactively-p' treat the function as (you guessed it) called interactively. ++++ ** New function `function-put' to use instead of `put' for function properties. +++ commit 964ba0f5261b2de1c5979cef8727cd1663b4438b Author: Eli Zaretskii Date: Sat Jan 16 16:54:35 2016 +0200 Document 'funcall-interactively' * doc/lispref/commands.texi (Interactive Call): Document 'funcall-interactively'. * doc/lispref/functions.texi (Calling Functions): Mention 'funcall-interactively' and provide a cross-reference. diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index dee43ce..9c1df89 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi @@ -691,6 +691,14 @@ default is the return value of @code{this-command-keys-vector}. @xref{Definition of this-command-keys-vector}. @end defun +@defun funcall-interactively function &rest arguments +This function works like @code{funcall} (@pxref{Calling Functions}), +but it makes the call look like an interactive invocation: a call to +@code{called-interactively-p} inside @var{function} will return +@code{t}. If @var{function} is not a command, it is called without +signaling an error. +@end defun + @defun command-execute command &optional record-flag keys special @cindex keyboard macro execution This function executes @var{command}. The argument @var{command} must diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index d3d0a42..1e8e754 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi @@ -754,6 +754,10 @@ they make sense only when given the unevaluated argument expressions. @code{funcall} cannot provide these because, as we saw above, it never knows them in the first place. +If you need to use @code{funcall} to call a command and make it behave +as if invoked interactively, use @code{funcall-interactively} +(@pxref{Interactive Call}). + @example @group (setq f 'list) diff --git a/etc/NEWS b/etc/NEWS index 01a8490..6735718 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1467,6 +1467,7 @@ MS-Windows doesn't support UTF-8 as codeset in its locales. +++ ** New function `alist-get', which is also a valid place (aka lvalue). ++++ ** New function `funcall-interactively', which works like `funcall' but makes `called-interactively-p' treat the function as (you guessed it) called interactively. commit 2460cfac091c6a5b095816bef9e639f9da88f432 Author: Eli Zaretskii Date: Sat Jan 16 16:32:05 2016 +0200 * doc/lispref/lists.texi (Association Lists): Document 'alist-get'. diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi index d961caf..c18c408 100644 --- a/doc/lispref/lists.texi +++ b/doc/lispref/lists.texi @@ -1556,6 +1556,14 @@ keys may not be symbols: @end smallexample @end defun +@defun alist-get key value &optional default +This function is like @code{assq}, but instead of returning the entire +association for @var{key}, @code{(@var{key} . @var{value})}, it +returns just the @var{value}. It returns @var{default} if @var{key} +is not found in @var{alist}, defaulting to @code{nil} if @var{default} +is omitted. +@end defun + @defun rassq value alist This function returns the first association with value @var{value} in @var{alist}. It returns @code{nil} if no association in @var{alist} has diff --git a/etc/NEWS b/etc/NEWS index 3f867a0..01a8490 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1464,6 +1464,7 @@ emulates the behavior of modern Posix platforms when the locale's codeset is "UTF-8" (as in "en_US.UTF-8"). This is needed because MS-Windows doesn't support UTF-8 as codeset in its locales. ++++ ** New function `alist-get', which is also a valid place (aka lvalue). ** New function `funcall-interactively', which works like `funcall' commit 44177c133fbbb6ca2d98a66fc9681d682fe8b6d7 Author: Eli Zaretskii Date: Sat Jan 16 16:03:03 2016 +0200 * doc/lispref/strings.texi (Text Comparison): Document 'string-greaterp'. diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 95723ca..091db5e 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -571,13 +571,19 @@ no characters is less than any other string. @end example Symbols are also allowed as arguments, in which case their print names -are used. +are compared. @end defun @defun string-lessp string1 string2 @code{string-lessp} is another name for @code{string<}. @end defun +@defun string-greaterp string1 string2 +This function returns the result of comparing @var{string1} and +@var{string2} in the opposite order, i.e., it is equivalent to calling +@code{(string-lessp @var{string2} @var{string1})}. +@end defun + @cindex locale-dependent string comparison @defun string-collate-lessp string1 string2 &optional locale ignore-case This function returns @code{t} if @var{string1} is less than diff --git a/etc/NEWS b/etc/NEWS index eac5b7e..3f867a0 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1440,6 +1440,7 @@ evaluated (and should return a string) when the closure is built. *** x-get-selection-value is renamed to gui-get-primary-selection. *** x-set-selection is renamed to gui-set-selection ++++ ** New function `string-greaterp', which return the opposite result of `string-lessp'. commit 8515727358110eb6a49579d65d2b684097e79f0c Author: Eli Zaretskii Date: Sat Jan 16 15:56:50 2016 +0200 Document renaming of selection-related functions * doc/lispref/frames.texi (Window System Selections): Rename "x-*" functions into the corresponding "gui-*" functions. Make the description slightly less X-centric. diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index 1c6674c..5d873ac 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -2637,18 +2637,19 @@ defined in the file @file{lisp/term/x-win.el}. Use @kbd{M-x apropos @cindex primary selection @cindex secondary selection - In the X window system, data can be transferred between different -applications by means of @dfn{selections}. X defines an arbitrary -number of @dfn{selection types}, each of which can store its own data; -however, only three are commonly used: the @dfn{clipboard}, -@dfn{primary selection}, and @dfn{secondary selection}. @xref{Cut and -Paste,, Cut and Paste, emacs, The GNU Emacs Manual}, for Emacs -commands that make use of these selections. This section documents -the low-level functions for reading and setting X selections. - -@deffn Command x-set-selection type data -This function sets an X selection. It takes two arguments: a -selection type @var{type}, and the value to assign to it, @var{data}. + In window systems, such as X, data can be transferred between +different applications by means of @dfn{selections}. X defines an +arbitrary number of @dfn{selection types}, each of which can store its +own data; however, only three are commonly used: the @dfn{clipboard}, +@dfn{primary selection}, and @dfn{secondary selection}. Other window +systems support only the clipboard. @xref{Cut and Paste,, Cut and +Paste, emacs, The GNU Emacs Manual}, for Emacs commands that make use +of these selections. This section documents the low-level functions +for reading and setting window-system selections. + +@deffn Command gui-set-selection type data +This function sets a window-system selection. It takes two arguments: +a selection type @var{type}, and the value to assign to it, @var{data}. @var{type} should be a symbol; it is usually one of @code{PRIMARY}, @code{SECONDARY} or @code{CLIPBOARD}. These are symbols with @@ -2665,14 +2666,14 @@ stands for text in the overlay or between the markers. The argument This function returns @var{data}. @end deffn -@defun x-get-selection &optional type data-type -This function accesses selections set up by Emacs or by other X -clients. It takes two optional arguments, @var{type} and +@defun gui-get-selection &optional type data-type +This function accesses selections set up by Emacs or by other +programs. It takes two optional arguments, @var{type} and @var{data-type}. The default for @var{type}, the selection type, is @code{PRIMARY}. The @var{data-type} argument specifies the form of data conversion to -use, to convert the raw data obtained from another X client into Lisp +use, to convert the raw data obtained from another program into Lisp data. Meaningful values include @code{TEXT}, @code{STRING}, @code{UTF8_STRING}, @code{TARGETS}, @code{LENGTH}, @code{DELETE}, @code{FILE_NAME}, @code{CHARACTER_POSITION}, @code{NAME}, @@ -2680,7 +2681,8 @@ data. Meaningful values include @code{TEXT}, @code{STRING}, @code{HOST_NAME}, @code{USER}, @code{CLASS}, @code{ATOM}, and @code{INTEGER}. (These are symbols with upper-case names in accord with X conventions.) The default for @var{data-type} is -@code{STRING}. +@code{STRING}. Window systems other than X usually support only a +small subset of these types, in addition to @code{STRING}. @end defun @defopt selection-coding-system @@ -2692,10 +2694,15 @@ converts to the text representation that X11 normally uses. @cindex clipboard support (for MS-Windows) When Emacs runs on MS-Windows, it does not implement X selections in -general, but it does support the clipboard. @code{x-get-selection} -and @code{x-set-selection} on MS-Windows support the text data type +general, but it does support the clipboard. @code{gui-get-selection} +and @code{gui-set-selection} on MS-Windows support the text data type only; if the clipboard holds other types of data, Emacs treats the -clipboard as empty. +clipboard as empty. The supported data type is @code{STRING}. + +For backward compatibility, there are obsolete aliases +@code{x-get-selection} and @code{x-set-selection}, which were the +names of @code{gui-get-selection} and @code{gui-set-selection} before +Emacs 25.1. @node Drag and Drop @section Drag and Drop diff --git a/etc/NEWS b/etc/NEWS index 9a107f8..eac5b7e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1431,7 +1431,8 @@ evaluated (and should return a string) when the closure is built. +++ ** New function `macroexpand-1' to perform a single step of macro expansion. -** Some "x-*" were obsoleted: ++++ +** Some "x-*" functions were obsoleted and/or renamed: *** x-select-text is renamed gui-select-text. *** x-selection-value is renamed gui-selection-value. *** x-get-selection is renamed gui-get-selection. commit 5409aca9afdba0f8554163b63526a6b831879700 Author: Eli Zaretskii Date: Sat Jan 16 15:40:58 2016 +0200 * doc/lispref/macros.texi (Expansion): Document 'macroexpand-1'. diff --git a/doc/lispref/macros.texi b/doc/lispref/macros.texi index 7f3b670..3f9db8c 100644 --- a/doc/lispref/macros.texi +++ b/doc/lispref/macros.texi @@ -160,6 +160,12 @@ expand the embedded calls to @code{inc}: @end defun +@defun macroexpand-1 form &optional environment +This function expands macros like @code{macroexpand}, but it only +performs one step of the expansion: if the result is another macro +call, @code{macroexpand-1} will not expand it. +@end defun + @node Compiling Macros @section Macros and Byte Compilation @cindex byte-compiling macros diff --git a/etc/NEWS b/etc/NEWS index 9b9e693..9a107f8 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1428,7 +1428,8 @@ evaluated (and should return a string) when the closure is built. +++ ** define-inline provides a new way to define inlinable functions. -** New function `macroexpand-1' to perform a single step of macroexpansion. ++++ +** New function `macroexpand-1' to perform a single step of macro expansion. ** Some "x-*" were obsoleted: *** x-select-text is renamed gui-select-text. commit e48f6dd3f79229d1dca96a691069eba45e90480c Author: Eli Zaretskii Date: Sat Jan 16 15:30:47 2016 +0200 Document 'define-inline' * doc/lispref/functions.texi (Defining Functions): Document 'define-inline' and related macros. * lisp/emacs-lisp/inline.el (inline-letevals): Doc fix. diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index e596bad..d3d0a42 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi @@ -623,6 +623,96 @@ definition will have no effect on them. and tells the Lisp compiler to perform inline expansion on it. @xref{Inline Functions}. + Alternatively, you can define a function by providing the code which +will inline it as a compiler macro. The following macros make this +possible. + +@c FIXME: Can define-inline use the interactive spec? +@defmac define-inline name args [doc] [declare] body@dots{} +Define a function @var{name} by providing code that does its inlining, +as a compiler macro. The function will accept the argument list +@var{args} and will have the specified @var{body}. + +If present, @var{doc} should be the function's documentation string +(@pxref{Function Documentation}); @var{declare}, if present, should be +a @code{declare} form (@pxref{Declare Form}) specifying the function's +metadata. +@end defmac + +Functions defined via @code{define-inline} have several advantages +with respect to macros defined by @code{defsubst} or @code{defmacro}: + +@itemize @minus +@item +They can be passed to @code{mapcar} (@pxref{Mapping Functions}). + +@item +They are more efficient. + +@item +They can be used as @dfn{place forms} to store values +(@pxref{Generalized Variables}). + +@item +They behave in a more predictable way than @code{cl-defsubst} +(@pxref{Argument Lists,,, cl, Common Lisp Extensions for GNU Emacs +Lisp}). +@end itemize + +Like @code{defmacro}, a function inlined with @code{define-inline} +inherits the scoping rules, either dynamic or lexical, from the call +site. @xref{Variable Scoping}. + +The following macros should be used in the body of a function defined +by @code{define-inline}. + +@defmac inline-quote expression +Quote @var{expression} for @code{define-inline}. This is similar to +the backquote (@pxref{Backquote}), but quotes code and accepts only +@code{,}, not @code{,@@}. +@end defmac + +@defmac inline-letevals (bindings@dots{}) body@dots{} +This is is similar to @code{let} (@pxref{Local Variables}): it sets up +local variables as specified by @var{bindings}, and then evaluates +@var{body} with those bindings in effect. Each element of +@var{bindings} should be either a symbol or a list of the form +@w{@code{(@var{var} @var{expr})}}; the result is to evaluate +@var{expr} and bind @var{var} to the result. The tail of +@var{bindings} can be either @code{nil} or a symbol which should hold +a list of arguments, in which case each argument is evaluated, and the +symbol is bound to the resulting list. +@end defmac + +@defmac inline-const-p expression +Return non-@code{nil} if the value of @var{expression} is already +known. +@end defmac + +@defmac inline-const-val expression +Return the value of @var{expression}. +@end defmac + +@defmac inline-error format &rest args +Signal an error, formatting @var{args} according to @var{format}. +@end defmac + +Here's an example of using @code{define-inline}: + +@lisp +(define-inline myaccessor (obj) + (inline-letevals (obj) + (inline-quote (if (foo-p ,obj) (aref (cdr ,obj) 3) (aref ,obj 2))))) +@end lisp + +@noindent +This is equivalent to + +@lisp +(defsubst myaccessor (obj) + (if (foo-p obj) (aref (cdr obj) 3) (aref obj 2))) +@end lisp + @node Calling Functions @section Calling Functions @cindex function invocation @@ -1706,19 +1796,24 @@ features of Emacs, you should not make a function inline, even if it's small, unless its speed is really crucial, and you've timed the code to verify that using @code{defun} actually has performance problems. - It's possible to define a macro to expand into the same code that an -inline function would execute (@pxref{Macros}). But the macro would -be limited to direct use in expressions---a macro cannot be called -with @code{apply}, @code{mapcar} and so on. Also, it takes some work -to convert an ordinary function into a macro. To convert it into an -inline function is easy; just replace @code{defun} with -@code{defsubst}. Since each argument of an inline function is -evaluated exactly once, you needn't worry about how many times the -body uses the arguments, as you do for macros. - After an inline function is defined, its inline expansion can be performed later on in the same file, just like macros. + It's possible to use @code{defsubst} to define a macro to expand +into the same code that an inline function would execute +(@pxref{Macros}). But the macro would be limited to direct use in +expressions---a macro cannot be called with @code{apply}, +@code{mapcar} and so on. Also, it takes some work to convert an +ordinary function into a macro. To convert it into an inline function +is easy; just replace @code{defun} with @code{defsubst}. Since each +argument of an inline function is evaluated exactly once, you needn't +worry about how many times the body uses the arguments, as you do for +macros. + + As an alternative to @code{defsubst}, you can use +@code{define-inline} to define functions via their exhaustive compiler +macro. @xref{Defining Functions, define-inline}. + @node Declare Form @section The @code{declare} Form @findex declare diff --git a/etc/NEWS b/etc/NEWS index 40cfef3..9b9e693 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1425,6 +1425,7 @@ details. It should be placed right where the docstring would be, and FORM is then evaluated (and should return a string) when the closure is built. ++++ ** define-inline provides a new way to define inlinable functions. ** New function `macroexpand-1' to perform a single step of macroexpansion. diff --git a/lisp/emacs-lisp/inline.el b/lisp/emacs-lisp/inline.el index 56780fb..058c56c 100644 --- a/lisp/emacs-lisp/inline.el +++ b/lisp/emacs-lisp/inline.el @@ -102,7 +102,7 @@ VARS should be a list of elements of the form (VAR EXP) or just VAR, in case EXP is equal to VAR. The result is to evaluate EXP and bind the result to VAR. The tail of VARS can be either nil or a symbol VAR which should hold a list -of arguments,in which case each argument is evaluated and the resulting +of arguments, in which case each argument is evaluated and the resulting new list is re-bound to VAR. After VARS is handled, BODY is evaluated in the new environment." commit 6e79b6379fa33aef914211b280d0ee0b08d0339a Author: Glenn Morris Date: Sat Jan 16 07:18:13 2016 -0500 ; Auto-commit of loaddefs files. diff --git a/lisp/dired.el b/lisp/dired.el index e023da2..d7bc318 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -4418,7 +4418,7 @@ instead. ;;;*** -;;;### (autoloads nil "dired-x" "dired-x.el" "26ec84bf71edaf13ce45aeab60b7f31f") +;;;### (autoloads nil "dired-x" "dired-x.el" "8dae922d1549647835460b6cb70af4df") ;;; Generated autoloads from dired-x.el (autoload 'dired-jump "dired-x" "\ commit 3ae7934fad7cc3bbd844123bf2143f376dbfab79 Author: Eli Zaretskii Date: Sat Jan 16 14:04:23 2016 +0200 ; * etc/NEWS: Mark entries that don't need further treatment. diff --git a/etc/NEWS b/etc/NEWS index 9e63579..40cfef3 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1411,8 +1411,6 @@ buffers to allow certain parts of the text to be writable. +++ ** New macro `define-advice'. -** `read-buffer' takes a new `predicate' argument. - +++ ** Emacs Lisp now supports generators. See the "Generators" section of the ELisp manual for the details. @@ -1422,6 +1420,7 @@ See the "Generators" section of the ELisp manual for the details. See the "Finalizer Type" subsection in the ELisp manual for the details. +--- ** lexical closures can use (:documentation FORM) to build their docstring. It should be placed right where the docstring would be, and FORM is then evaluated (and should return a string) when the closure is built. @@ -1497,6 +1496,7 @@ permissions set to temporary values (e.g., for creating private files). +++ ** You can access the slots of structures using `cl-struct-slot-value'. ++++ ** Function `sort' can deal with vectors. ** Function `system-name' now returns an updated value if the current @@ -1724,6 +1724,7 @@ frames. `window-divider-default-places', `window-divider-default-bottom-width' and `window-divider-default-right-width'. +--- ** Tearoff menus and detachable toolbars for Gtk+ have been removed. Those features have been deprecated in Gtk+ for a long time. commit 6165c3649a537da8fe6e883de4823f01d6394dc0 Author: Artur Malabarba Date: Sat Jan 16 09:21:27 2016 +0000 * lisp/files.el (dir-locals--all-files): Respect absolute file-names diff --git a/lisp/files.el b/lisp/files.el index 7c6119b..5a15c71 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3732,8 +3732,9 @@ The returned list is sorted by `string<' order." (require 'seq) (let ((dir (if (file-directory-p file-or-dir) file-or-dir - default-directory)) - (file (cond ((not (file-directory-p file-or-dir)) file-or-dir) + (or (file-name-directory file-or-dir) + default-directory))) + (file (cond ((not (file-directory-p file-or-dir)) (file-name-nondirectory file-or-dir)) ((eq system-type 'ms-dos) (dosified-file-name dir-locals-file)) (t dir-locals-file)))) (seq-filter (lambda (f) (and (file-readable-p f) commit 2ffdf155ee618ec132175e3337b4c06d157d8bd6 Author: Artur Malabarba Date: Sat Jan 16 09:18:13 2016 +0000 * lisp/help-fns.el (describe-variable): Fix a left-over parenthesis diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 13daafb..2021885 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -939,7 +939,7 @@ if it is given a local binding.\n")))) (with-current-buffer standard-output (insert-text-button file 'type 'help-dir-local-var-def - 'help-args (list variable file)))) + 'help-args (list variable file))) (princ (substitute-command-keys "'.\n")))) (princ (substitute-command-keys " This variable's value is file-local.\n")))) commit 71ecd62937b4645504a75043205c70ae020e6cb8 Author: Artur Malabarba Date: Sat Jan 16 08:52:14 2016 +0000 * lisp/dired-x.el (dired-omit-here-always): Use add-dir-local-variable instead of manually writing a dir-locals file. diff --git a/lisp/dired-x.el b/lisp/dired-x.el index fd8290e..dccaa9e 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el @@ -816,16 +816,14 @@ If in a Dired buffer, reverts it." (interactive) (if (file-exists-p dired-local-variables-file) (error "Old-style dired-local-variables-file `./%s' found; -replace it with a dir-locals-file `./%s'" +replace it with a dir-locals-file `./%s.el'" dired-local-variables-file dir-locals-file)) - (if (file-exists-p dir-locals-file) - (message "File `./%s' already exists." dir-locals-file) - (with-temp-buffer - (insert "\ -\((dired-mode . ((subdirs . nil) - (dired-omit-mode . t))))\n") - (write-file dir-locals-file)) + (if (dir-locals--all-files default-directory) + (message "File `./%s' already exists." + (car (dir-locals--all-files default-directory))) + (add-dir-local-variable 'dired-mode 'subdirs nil) + (add-dir-local-variable 'dired-mode 'dired-omit-mode t) ;; Run extra-hooks and revert directory. (when (derived-mode-p 'dired-mode) (hack-dir-local-variables-non-file-buffer) commit f0b82b34536e6bafbecbd642eee0cb0f534f8647 Author: Artur Malabarba Date: Sat Jan 16 08:50:46 2016 +0000 * lisp/files.el (dir-locals--all-files): Use completion instead of wildcards (dir-locals-file) * lisp/files-x.el (modify-dir-local-variable) * lisp/dos-fns.el (dosified-file-name) * lisp/help-fns.el (describe-variable): Change accordingly. diff --git a/lisp/dos-fns.el b/lisp/dos-fns.el index 7defb38..0ce2b23 100644 --- a/lisp/dos-fns.el +++ b/lisp/dos-fns.el @@ -201,8 +201,8 @@ that are used in Emacs Lisp sources; any other file name will be returned unaltered." (cond ;; See files.el:dir-locals-file. - ((string= file-name ".dir-locals.el") - "_dir-locals.el") + ((string= file-name ".dir-locals") + "_dir-locals") (t file-name))) diff --git a/lisp/files-x.el b/lisp/files-x.el index ed3d49d..2e1a728 100644 --- a/lisp/files-x.el +++ b/lisp/files-x.el @@ -444,10 +444,8 @@ from the MODE alist ignoring the input argument VALUE." (if (nth 2 variables-file) (car (last (dir-locals--all-files (car variables-file)))) (cadr variables-file))) - ;; Try to make a proper file-name. This doesn't cover all - ;; wildcards, but it covers the default value of `dir-locals-file'. - (t (replace-regexp-in-string - "\\*" "" (replace-regexp-in-string "\\?" "-" dir-locals-file))))) + ;; Try to make a proper file-name. + (t (concat dir-locals-file ".el")))) ;; I can't be bothered to handle this case right now. ;; Dir locals were set directly from a class. You need to ;; directly modify the class in dir-locals-class-alist. diff --git a/lisp/files.el b/lisp/files.el index 9cb46fc..7c6119b 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3713,7 +3713,7 @@ VARIABLES list of the class. The list is processed in order. applied by recursively following these rules." (setf (alist-get class dir-locals-class-alist) variables)) -(defconst dir-locals-file ".dir-locals*.el" +(defconst dir-locals-file ".dir-locals" "Pattern for files that contain directory-local variables. It has to be constant to enforce uniform values across different environments and users. @@ -3730,16 +3730,19 @@ return a sorted list of all files matching `dir-locals-file' in this directory. The returned list is sorted by `string<' order." (require 'seq) - (let ((default-directory (if (file-directory-p file-or-dir) - file-or-dir - default-directory))) + (let ((dir (if (file-directory-p file-or-dir) + file-or-dir + default-directory)) + (file (cond ((not (file-directory-p file-or-dir)) file-or-dir) + ((eq system-type 'ms-dos) (dosified-file-name dir-locals-file)) + (t dir-locals-file)))) (seq-filter (lambda (f) (and (file-readable-p f) - (file-regular-p f))) - (file-expand-wildcards - (cond ((not (file-directory-p file-or-dir)) file-or-dir) - ((eq system-type 'ms-dos) (dosified-file-name dir-locals-file)) - (t dir-locals-file)) - 'full)))) + (file-regular-p f) + (not (file-directory-p f)))) + (mapcar (lambda (f) (expand-file-name f dir)) + (nreverse + (let ((completion-regexp-list '("\\.el\\'"))) + (file-name-all-completions file dir))))))) (defun dir-locals-find-file (file) "Find the directory-local variables for FILE. diff --git a/lisp/help-fns.el b/lisp/help-fns.el index bc96601..13daafb 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -918,25 +918,24 @@ if it is given a local binding.\n")))) ;; If the cache element has an mtime, we ;; assume it came from a file. (if (nth 2 file) - (setq file (expand-file-name - dir-locals-file (car file))) + ;; (car file) is a directory. + (setq file (dir-locals--all-files (car file))) ;; Otherwise, assume it was set directly. (setq file (car file) is-directory t))) (if (null file) (princ ".\n") (princ ", set ") - (let ((files (file-expand-wildcards file))) - (princ (substitute-command-keys - (cond - (is-directory "for the directory\n `") - ;; Many files matched. - ((cdr files) - (setq file (file-name-directory (car files))) - (format "by a file\n matching `%s' in the directory\n `" - dir-locals-file)) - (t (setq file (car files)) - "by the file\n `")))) + (princ (substitute-command-keys + (cond + (is-directory "for the directory\n `") + ;; Many files matched. + ((and (consp file) (cdr file)) + (setq file (file-name-directory (car file))) + (format "by one of the\n %s files in the directory\n `" + dir-locals-file)) + (t (setq file (car file)) + "by the file\n `")))) (with-current-buffer standard-output (insert-text-button file 'type 'help-dir-local-var-def commit 86e45139698fe773ffb4efbe59387f90201b80c8 Author: Jussi Lahdenniemi Date: Sat Jan 16 11:46:14 2016 +0200 Fix incompatbilities with MS-Windows 2000 and older * src/w32.c : New global variable. (filename_to_utf16, filename_from_ansi, check_windows_init_file): Use it instead of the literal MB_ERR_INVALID_CHARS. (maybe_load_unicows_dll): Initialize multiByteToWideCharFlags as appropriate for the underlying OS version. For details, see http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00835.html. * src/w32.h: Declare multiByteToWideCharFlags. * src/w32fns.c (Fx_file_dialog, Fw32_shell_execute) (add_tray_notification): Use multiByteToWideCharFlags instead of the literal MB_ERR_INVALID_CHARS. (_resetstkoflw_proc): New typedef. (w32_reset_stack_overflow_guard): Call _resetstkoflw via a pointer, as this function is absent in msvcrt.dll shipped with W2K and older systems. Copyright-paperwork-exempt: yes diff --git a/src/w32.c b/src/w32.c index 7884bad..6f1d5fd 100644 --- a/src/w32.c +++ b/src/w32.c @@ -486,6 +486,7 @@ typedef DWORD (WINAPI *GetAdaptersInfo_Proc) ( int (WINAPI *pMultiByteToWideChar)(UINT,DWORD,LPCSTR,int,LPWSTR,int); int (WINAPI *pWideCharToMultiByte)(UINT,DWORD,LPCWSTR,int,LPSTR,int,LPCSTR,LPBOOL); +DWORD multiByteToWideCharFlags; /* ** A utility function ** */ static BOOL @@ -1552,8 +1553,8 @@ codepage_for_filenames (CPINFO *cp_info) int filename_to_utf16 (const char *fn_in, wchar_t *fn_out) { - int result = pMultiByteToWideChar (CP_UTF8, MB_ERR_INVALID_CHARS, fn_in, -1, - fn_out, MAX_PATH); + int result = pMultiByteToWideChar (CP_UTF8, multiByteToWideCharFlags, fn_in, + -1, fn_out, MAX_PATH); if (!result) { @@ -1643,8 +1644,8 @@ filename_from_ansi (const char *fn_in, char *fn_out) { wchar_t fn_utf16[MAX_PATH]; int codepage = codepage_for_filenames (NULL); - int result = pMultiByteToWideChar (codepage, MB_ERR_INVALID_CHARS, fn_in, -1, - fn_utf16, MAX_PATH); + int result = pMultiByteToWideChar (codepage, multiByteToWideCharFlags, fn_in, + -1, fn_utf16, MAX_PATH); if (!result) { @@ -9134,14 +9135,14 @@ check_windows_init_file (void) "not unpacked properly.\nSee the README.W32 file in the " "top-level Emacs directory for more information.", init_file_name, load_path); - needed = pMultiByteToWideChar (CP_UTF8, MB_ERR_INVALID_CHARS, buffer, - -1, NULL, 0); + needed = pMultiByteToWideChar (CP_UTF8, multiByteToWideCharFlags, + buffer, -1, NULL, 0); if (needed > 0) { wchar_t *msg_w = alloca ((needed + 1) * sizeof (wchar_t)); - pMultiByteToWideChar (CP_UTF8, MB_ERR_INVALID_CHARS, buffer, -1, - msg_w, needed); + pMultiByteToWideChar (CP_UTF8, multiByteToWideCharFlags, buffer, + -1, msg_w, needed); needed = pWideCharToMultiByte (CP_ACP, 0, msg_w, -1, NULL, 0, NULL, NULL); if (needed > 0) @@ -9328,6 +9329,7 @@ maybe_load_unicows_dll (void) (MultiByteToWideChar_Proc)GetProcAddress (ret, "MultiByteToWideChar"); pWideCharToMultiByte = (WideCharToMultiByte_Proc)GetProcAddress (ret, "WideCharToMultiByte"); + multiByteToWideCharFlags = MB_ERR_INVALID_CHARS; return ret; } else @@ -9357,6 +9359,11 @@ maybe_load_unicows_dll (void) pointers; no need for the LoadLibrary dance. */ pMultiByteToWideChar = MultiByteToWideChar; pWideCharToMultiByte = WideCharToMultiByte; + /* On NT 4.0, though, MB_ERR_INVALID_CHARS is not supported. */ + if (w32_major_version < 5) + multiByteToWideCharFlags = 0; + else + multiByteToWideCharFlags = MB_ERR_INVALID_CHARS; return LoadLibrary ("Gdi32.dll"); } } diff --git a/src/w32.h b/src/w32.h index ba3fec8..fde3803 100644 --- a/src/w32.h +++ b/src/w32.h @@ -183,6 +183,7 @@ typedef int (WINAPI *MultiByteToWideChar_Proc)(UINT,DWORD,LPCSTR,int,LPWSTR,int) typedef int (WINAPI *WideCharToMultiByte_Proc)(UINT,DWORD,LPCWSTR,int,LPSTR,int,LPCSTR,LPBOOL); extern MultiByteToWideChar_Proc pMultiByteToWideChar; extern WideCharToMultiByte_Proc pWideCharToMultiByte; +extern DWORD multiByteToWideCharFlags; extern void init_environment (char **); extern void check_windows_init_file (void); diff --git a/src/w32fns.c b/src/w32fns.c index f3806a9..01f5d6f 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -6984,12 +6984,12 @@ value of DIR as in previous invocations; this is standard Windows behavior. */) if (errno == ENOENT && filename_buf_w[MAX_PATH - 1] != 0) report_file_error ("filename too long", default_filename); } - len = pMultiByteToWideChar (CP_UTF8, MB_ERR_INVALID_CHARS, + len = pMultiByteToWideChar (CP_UTF8, multiByteToWideCharFlags, SSDATA (prompt), -1, NULL, 0); if (len > 32768) len = 32768; prompt_w = alloca (len * sizeof (wchar_t)); - pMultiByteToWideChar (CP_UTF8, MB_ERR_INVALID_CHARS, + pMultiByteToWideChar (CP_UTF8, multiByteToWideCharFlags, SSDATA (prompt), -1, prompt_w, len); } else @@ -7002,12 +7002,12 @@ value of DIR as in previous invocations; this is standard Windows behavior. */) if (errno == ENOENT && filename_buf_a[MAX_PATH - 1] != 0) report_file_error ("filename too long", default_filename); } - len = pMultiByteToWideChar (CP_UTF8, MB_ERR_INVALID_CHARS, + len = pMultiByteToWideChar (CP_UTF8, multiByteToWideCharFlags, SSDATA (prompt), -1, NULL, 0); if (len > 32768) len = 32768; prompt_w = alloca (len * sizeof (wchar_t)); - pMultiByteToWideChar (CP_UTF8, MB_ERR_INVALID_CHARS, + pMultiByteToWideChar (CP_UTF8, multiByteToWideCharFlags, SSDATA (prompt), -1, prompt_w, len); len = pWideCharToMultiByte (CP_ACP, 0, prompt_w, -1, NULL, 0, NULL, NULL); if (len > 32768) @@ -7489,10 +7489,10 @@ a ShowWindow flag: current_dir = ENCODE_FILE (current_dir); /* Cannot use filename_to_utf16/ansi with DOCUMENT, since it could be a URL that is not limited to MAX_PATH chararcters. */ - doclen = pMultiByteToWideChar (CP_UTF8, MB_ERR_INVALID_CHARS, + doclen = pMultiByteToWideChar (CP_UTF8, multiByteToWideCharFlags, SSDATA (document), -1, NULL, 0); doc_w = xmalloc (doclen * sizeof (wchar_t)); - pMultiByteToWideChar (CP_UTF8, MB_ERR_INVALID_CHARS, + pMultiByteToWideChar (CP_UTF8, multiByteToWideCharFlags, SSDATA (document), -1, doc_w, doclen); if (use_unicode) { @@ -7507,12 +7507,12 @@ a ShowWindow flag: int len; parameters = ENCODE_SYSTEM (parameters); - len = pMultiByteToWideChar (CP_ACP, MB_ERR_INVALID_CHARS, + len = pMultiByteToWideChar (CP_ACP, multiByteToWideCharFlags, SSDATA (parameters), -1, NULL, 0); if (len > 32768) len = 32768; params_w = alloca (len * sizeof (wchar_t)); - pMultiByteToWideChar (CP_ACP, MB_ERR_INVALID_CHARS, + pMultiByteToWideChar (CP_ACP, multiByteToWideCharFlags, SSDATA (parameters), -1, params_w, len); params_w[len - 1] = 0; } @@ -8959,7 +8959,7 @@ add_tray_notification (struct frame *f, const char *icon, const char *tip, later versions support up to 128. */ if (nidw.cbSize == MYNOTIFYICONDATAW_V1_SIZE) { - tiplen = pMultiByteToWideChar (CP_UTF8, MB_ERR_INVALID_CHARS, + tiplen = pMultiByteToWideChar (CP_UTF8, multiByteToWideCharFlags, tip, utf8_mbslen_lim (tip, 63), tipw, 64); if (tiplen >= 63) @@ -8967,7 +8967,7 @@ add_tray_notification (struct frame *f, const char *icon, const char *tip, } else { - tiplen = pMultiByteToWideChar (CP_UTF8, MB_ERR_INVALID_CHARS, + tiplen = pMultiByteToWideChar (CP_UTF8, multiByteToWideCharFlags, tip, utf8_mbslen_lim (tip, 127), tipw, 128); if (tiplen >= 127) @@ -8986,7 +8986,7 @@ add_tray_notification (struct frame *f, const char *icon, const char *tip, { int slen; - slen = pMultiByteToWideChar (CP_UTF8, MB_ERR_INVALID_CHARS, + slen = pMultiByteToWideChar (CP_UTF8, multiByteToWideCharFlags, msg, utf8_mbslen_lim (msg, 255), msgw, 256); if (slen >= 255) @@ -8999,7 +8999,7 @@ add_tray_notification (struct frame *f, const char *icon, const char *tip, } wcscpy (nidw.szInfo, msgw); nidw.uTimeout = timeout; - slen = pMultiByteToWideChar (CP_UTF8, MB_ERR_INVALID_CHARS, + slen = pMultiByteToWideChar (CP_UTF8, multiByteToWideCharFlags, title, utf8_mbslen_lim (title, 63), titlew, 64); if (slen >= 63) @@ -9670,6 +9670,12 @@ static PVOID except_addr; /* Stack overflow recovery. */ +/* MinGW headers don't declare this (should be in malloc.h). Also, + the function is not present pre-W2K, so make the call through + a function pointer. */ +typedef int (__cdecl *_resetstkoflw_proc) (void); +static _resetstkoflw_proc resetstkoflw; + /* Re-establish the guard page at stack limit. This is needed because when a stack overflow is detected, Windows removes the guard bit from the guard page, so if we don't re-establish that protection, @@ -9677,12 +9683,14 @@ static PVOID except_addr; void w32_reset_stack_overflow_guard (void) { - /* MinGW headers don't declare this (should be in malloc.h). */ - _CRTIMP int __cdecl _resetstkoflw (void); - + if (resetstkoflw == NULL) + resetstkoflw = + (_resetstkoflw_proc)GetProcAddress (GetModuleHandle ("msvcrt.dll"), + "_resetstkoflw"); /* We ignore the return value. If _resetstkoflw fails, the next stack overflow will crash the program. */ - (void)_resetstkoflw (); + if (resetstkoflw != NULL) + (void)resetstkoflw (); } static void @@ -9927,6 +9935,8 @@ globals_of_w32fns (void) after_deadkey = -1; + resetstkoflw = NULL; + /* MessageBox does not work without this when linked to comctl32.dll 6.0. */ InitCommonControls (); commit 4e96521948b74b8e91eb5a6bca18427f8243bc98 Author: Eli Zaretskii Date: Sat Jan 16 11:23:42 2016 +0200 Mention in PROBLEMS an issue with MS-Windows NT4 * etc/PROBLEMS (MS-Windows): Mention the problem with Shell32.dll on Windows NT4. For the details, see http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00835.html. diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 58faef2..7d78037 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -1966,6 +1966,13 @@ runtime shared library, distributed with Windows 9X. A workaround is to build Emacs with MinGW runtime 3.x (the latest version is 3.20). +** addpm fails to run on Windows NT4, complaining about Shell32.dll + +This is likely to happen because Shell32.dll shipped with NT4 lacks +the updates required by Emacs. Installing Internet Explorer 4 solves +the problem. Note that it is NOT enough to install IE6, because doing +so will not install the Shell32.dll update. + ** A few seconds delay is seen at startup and for many file operations This happens when the Net Logon service is enabled. During Emacs commit 15c23aaf8368215613b0ffd02fe3bb742935f12e Author: Jussi Lahdenniemi Date: Sat Jan 16 11:11:12 2016 +0200 Ensure 8-byte aligned memory allocation on MS-Windows 9X * src/w32heap.c (init_heap): Redirect malloc, realloc, and free to special functions on Windows 9X. Refuse to dump Emacs on Windows 9X. (malloc_after_dump_9x, realloc_after_dump_9x) (free_after_dump_9x): New functions. (Bug#22379) See also http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00852.html for more details about the original problem. * nt/inc/ms-w32.h (malloc_after_dump_9x, realloc_after_dump_9x) (free_after_dump_9x): Add prototypes. Copyright-paperwork-exempt: yes diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h index cdbfac0..a37510e 100644 --- a/nt/inc/ms-w32.h +++ b/nt/inc/ms-w32.h @@ -457,6 +457,10 @@ extern void *malloc_after_dump(size_t); extern void *realloc_after_dump(void *, size_t); extern void free_after_dump(void *); +extern void *malloc_after_dump_9x(size_t); +extern void *realloc_after_dump_9x(void *, size_t); +extern void free_after_dump_9x(void *); + extern malloc_fn the_malloc_fn; extern realloc_fn the_realloc_fn; extern free_fn the_free_fn; diff --git a/src/w32heap.c b/src/w32heap.c index 54646bf..3d1c5ff 100644 --- a/src/w32heap.c +++ b/src/w32heap.c @@ -258,9 +258,18 @@ init_heap (void) } #endif - the_malloc_fn = malloc_after_dump; - the_realloc_fn = realloc_after_dump; - the_free_fn = free_after_dump; + if (os_subtype == OS_9X) + { + the_malloc_fn = malloc_after_dump_9x; + the_realloc_fn = realloc_after_dump_9x; + the_free_fn = free_after_dump_9x; + } + else + { + the_malloc_fn = malloc_after_dump; + the_realloc_fn = realloc_after_dump; + the_free_fn = free_after_dump; + } } else { @@ -291,9 +300,18 @@ init_heap (void) exit (-1); } heap = s_pfn_Rtl_Create_Heap (0, data_region_base, 0, 0, NULL, ¶ms); - the_malloc_fn = malloc_before_dump; - the_realloc_fn = realloc_before_dump; - the_free_fn = free_before_dump; + + if (os_subtype == OS_9X) + { + fprintf (stderr, "Cannot dump Emacs on Windows 9X; exiting.\n"); + exit (-1); + } + else + { + the_malloc_fn = malloc_before_dump; + the_realloc_fn = realloc_before_dump; + the_free_fn = free_before_dump; + } } /* Update system version information to match current system. */ @@ -504,6 +522,65 @@ free_before_dump (void *ptr) } } +/* On Windows 9X, HeapAlloc may return pointers that are not aligned + on 8-byte boundary, alignment which is required by the Lisp memory + management. To circumvent this problem, manually enforce alignment + on Windows 9X. */ + +void * +malloc_after_dump_9x (size_t size) +{ + void *p = malloc_after_dump (size + 8); + void *pa; + if (p == NULL) + return p; + pa = (void*)(((intptr_t)p + 8) & ~7); + *((void**)pa-1) = p; + return pa; +} + +void * +realloc_after_dump_9x (void *ptr, size_t size) +{ + if (FREEABLE_P (ptr)) + { + void *po = *((void**)ptr-1); + void *p; + void *pa; + p = realloc_after_dump (po, size + 8); + if (p == NULL) + return p; + pa = (void*)(((intptr_t)p + 8) & ~7); + if (ptr != NULL && + (char*)pa - (char*)p != (char*)ptr - (char*)po) + { + /* Handle the case where alignment in pre-realloc and + post-realloc blocks does not match. */ + MoveMemory (pa, (void*)((char*)p + ((char*)ptr - (char*)po)), size); + } + *((void**)pa-1) = p; + return pa; + } + else + { + /* Non-freeable pointers have no alignment-enforcing header + (since dumping is not allowed on Windows 9X). */ + void* p = malloc_after_dump_9x (size); + if (p != NULL) + CopyMemory (p, ptr, size); + return p; + } +} + +void +free_after_dump_9x (void *ptr) +{ + if (FREEABLE_P (ptr)) + { + free_after_dump (*((void**)ptr-1)); + } +} + #ifdef ENABLE_CHECKING void report_temacs_memory_usage (void) commit 39afa422ad0b3cef00292e260d424b7cd589b90d Author: Eli Zaretskii Date: Sat Jan 16 09:55:00 2016 +0200 Fix tests for active region in hideif.el * lisp/progmodes/hideif.el (hif-evaluate-macro, hide-ifdef-block): Use 'use-region-p' to test whether to operate on region, instead of testing 'mark-active'. diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el index a75a322..8a87eb9 100644 --- a/lisp/progmodes/hideif.el +++ b/lisp/progmodes/hideif.el @@ -1591,7 +1591,7 @@ not be expanded." '(nil nil))) (let ((case-fold-search nil)) (save-excursion - (unless mark-active + (unless (use-region-p) (setq rstart nil rend nil) (beginning-of-line) (when (and (re-search-forward hif-macro-expr-prefix-regexp nil t) @@ -1922,7 +1922,7 @@ Return as (TOP . BOTTOM) the extent of ifdef block." With optional prefix argument ARG, also hide the #ifdefs themselves." (interactive "P\nr") (let ((hide-ifdef-lines arg)) - (if mark-active + (if (use-region-p) (let ((hif-recurse-level (1+ hif-recurse-level))) (hif-recurse-on start end t) (setq mark-active nil)) commit 05df6662ef229fdbaa2b6f4430f39f95eaa7a65a Author: Eli Zaretskii Date: Sat Jan 16 09:40:12 2016 +0200 Fix interactive specs in some hideif.el commands * lisp/progmodes/hideif.el (hif-evaluate-macro) (hide-ifdef-undef, show-ifdef-block): Don't use '(interactive "r")' in commands that should only act on the region if it's active. diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el index cc7d1c3..a75a322 100644 --- a/lisp/progmodes/hideif.el +++ b/lisp/progmodes/hideif.el @@ -1581,11 +1581,14 @@ Refer to `hide-ifdef-expand-reinclusion-protection' for more details." result)) (defun hif-evaluate-macro (rstart rend) - "Evaluate the macro expansion result for a region. + "Evaluate the macro expansion result for the active region. If no region active, find the current #ifdefs and evaluate the result. Currently it supports only math calculations, strings or argumented macros can not be expanded." - (interactive "r") + (interactive + (if (use-region-p) + (list (region-beginning) (region-end)) + '(nil nil))) (let ((case-fold-search nil)) (save-excursion (unless mark-active @@ -1844,9 +1847,13 @@ This allows #ifdef VAR to be hidden." (defun hide-ifdef-undef (start end) "Undefine a VAR so that #ifdef VAR would not be included." - (interactive "r") + (interactive + (if (use-region-p) + (list (region-beginning) (region-end)) + '(nil nil))) (let* ((symstr - (or (and mark-active + (or (and (number-or-marker-p start) + (number-or-marker-p end) (buffer-substring-no-properties start end)) (read-string "Undefine what? " (current-word)))) (sym (and symstr @@ -1931,8 +1938,12 @@ With optional prefix argument ARG, also hide the #ifdefs themselves." (defun show-ifdef-block (&optional start end) "Show the ifdef block (true or false part) enclosing or before the cursor." - (interactive "r") - (if mark-active + (interactive + (if (use-region-p) + (list (region-beginning) (region-end)) + '(nil nil))) + (if (and (number-or-marker-p start) + (number-or-marker-p end)) (progn (dolist (o (overlays-in start end)) (if (overlay-get o 'hide-ifdef) commit bb0cd3193912032ae11a27016271d4587f876f98 Merge: 549a765 9e5452f Author: Phillip Lord Date: Fri Jan 15 22:20:34 2016 +0000 Merge branch 'emacs-25' of git.sv.gnu.org:/srv/git/emacs into emacs-25 commit 549a765efeca2748e68a5c6ce6c9238784e82535 Author: Phillip Lord Date: Fri Jan 15 22:11:39 2016 +0000 Enable test selector from command line * test/automated/Makefile.in: Change variable manipulation to avoid over-writing selector. diff --git a/CONTRIBUTE b/CONTRIBUTE index 9c53fe2..3ccaff3 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE @@ -263,7 +263,9 @@ top-level directory. Most tests are in the directory Tests which are tagged ":expensive-test" are enabled additionally, if you run "make check-expensive" from the top-level directory. "make " as mentioned above incorporates expensive tests for -.el(c). +.el(c). You can also define any ert selector on the command +line. So "make check SELECTOR=nil" is equivalent to "make +check-expensive". ** Understanding Emacs Internals. diff --git a/test/automated/Makefile.in b/test/automated/Makefile.in index 152e601..2534a65 100644 --- a/test/automated/Makefile.in +++ b/test/automated/Makefile.in @@ -89,7 +89,13 @@ WRITE_LOG = > $@ 2>&1 || { stat=ERROR; cat $@; }; echo $$stat: $@ ## Beware: it approximates 'no-byte-compile', so watch out for false-positives! SELECTOR_DEFAULT = (quote (not (tag :expensive-test))) SELECTOR_EXPENSIVE = nil -SELECTOR = +ifndef SELECTOR +SELECTOR_ACTUAL=$(SELECTOR_DEFAULT) +else +SELECTOR_ACTUAL=$(SELECTOR) +endif + + %.log: ${srcdir}/%.el @if grep '^;.*no-byte-compile: t' $< > /dev/null; then \ loadfile=$<; \ @@ -100,7 +106,7 @@ SELECTOR = echo Testing $$loadfile; \ stat=OK ; \ $(emacs) -l ert -l $$loadfile \ - --eval "(ert-run-tests-batch-and-exit ${SELECTOR})" ${WRITE_LOG} + --eval "(ert-run-tests-batch-and-exit ${SELECTOR_ACTUAL})" ${WRITE_LOG} ELFILES = $(sort $(wildcard ${srcdir}/*.el)) LOGFILES = $(patsubst %.el,%.log,$(notdir ${ELFILES})) @@ -123,7 +129,7 @@ $(foreach test,${TESTS},$(eval $(call test_template,${test}))) ## Rerun all default tests. check: mostlyclean - @${MAKE} check-doit SELECTOR="${SELECTOR_DEFAULT}" + @${MAKE} check-doit SELECTOR="${SELECTOR_ACTUAL}" ## Rerun all default and expensive tests. .PHONY: check-expensive @@ -133,7 +139,7 @@ check-expensive: mostlyclean ## Only re-run default tests whose .log is older than the test. .PHONY: check-maybe check-maybe: - @${MAKE} check-doit SELECTOR="${SELECTOR_DEFAULT}" + @${MAKE} check-doit SELECTOR="${SELECTOR_ACTUAL}" ## Run the tests. .PHONY: check-doit commit 9e5452f7166e3634f2d8e943815ed722e1672714 Author: Alan Mackenzie Date: Fri Jan 15 21:15:20 2016 +0000 Don't confuse "::" with ":" when trying to parse member initializers. * lisp/progmodes/cc-engine.el (c-back-over-member-initializers): Check more robustly for ":" token when searching backwards for it. * lisp/progmodes/cc-langs (c-:$-multichar-token-regexp): New language variable. diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index b08c555..63f0182 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -6739,6 +6739,9 @@ comment at the start of cc-engine.el for more info." (c-backward-syntactic-ws)) (c-back-over-list-of-member-inits) (and (eq (char-before) ?:) + (save-excursion + (c-backward-token-2) + (not (looking-at c-:$-multichar-token-regexp))) (c-just-after-func-arglist-p)))) (while (and (not (and level-plausible @@ -6753,6 +6756,9 @@ comment at the start of cc-engine.el for more info." (c-backward-syntactic-ws) (c-back-over-list-of-member-inits) (and (eq (char-before) ?:) + (save-excursion + (c-backward-token-2) + (not (looking-at c-:$-multichar-token-regexp))) (c-just-after-func-arglist-p))))) (and at-top-level level-plausible))) diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index b52da3f..48dd996 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -1219,6 +1219,14 @@ operators." (c-lang-defvar c-assignment-op-regexp (c-lang-const c-assignment-op-regexp)) +(c-lang-defconst c-:$-multichar-token-regexp + ;; Regexp matching all tokens ending in ":" which are longer than one char. + ;; Currently (2016-01-07) only used in C++ Mode. + t (c-make-keywords-re nil + (c-filter-ops (c-lang-const c-operators) t ".+:$"))) +(c-lang-defvar c-:$-multichar-token-regexp + (c-lang-const c-:$-multichar-token-regexp)) + (c-lang-defconst c-<>-multichar-token-regexp ;; Regexp matching all tokens containing "<" or ">" which are longer ;; than one char. commit 740849fe986b62a839bce4bbf67d0036fc1be0b9 Author: Eli Zaretskii Date: Fri Jan 15 17:36:47 2016 +0200 Ensure positive number of glyphs for margins of positive width * src/dispnew.c (margin_glyphs_to_reserve): Always return a positive value when a non-zero width of the marginal area was requested. (Bug#22356) diff --git a/src/dispnew.c b/src/dispnew.c index 8d671f8..3e1557f 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -320,7 +320,9 @@ margin_glyphs_to_reserve (struct window *w, int total_glyphs, int margin) int width = w->total_cols; double d = max (0, margin); d = min (width / 2 - 1, d); - return (int) ((double) total_glyphs / width * d); + /* Since MARGIN is positive, we cannot possibly have less than + one glyph for the marginal area. */ + return max (1, (int) ((double) total_glyphs / width * d)); } return 0; } commit aa636c8465b03c09249dccd68fca3d1df04eaa2c Author: Eli Zaretskii Date: Fri Jan 15 17:07:38 2016 +0200 Fix crashes when mini-window has non-zero margins * src/window.c (resize_frame_windows): Use 'new_size' to set minibuffer window's 'total_cols' value, as 'size' might be in pixels. (Bug#22356) diff --git a/src/window.c b/src/window.c index bb414e7..bbe47c7 100644 --- a/src/window.c +++ b/src/window.c @@ -3970,9 +3970,11 @@ values. */) } -/* Resize frame F's windows when number of lines of F is set to SIZE. - HORFLAG means resize windows when number of columns of F is set to - SIZE. PIXELWISE means to interpret SIZE as pixels. */ +/* Resize frame F's windows when F's width or height is set to SIZE. + If HORFLAG is zero, F's width was set to SIZE, otherwise its height + was set. SIZE is interpreted in F's canonical character units + (a.k.a. "columns" or "lines"), unless PIXELWISE is non-zero, which + means to interpret SIZE in pixel units. */ void resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise) { @@ -4073,7 +4075,7 @@ resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise) m = XWINDOW (mini); if (horflag) { - m->total_cols = size; + m->total_cols = new_size; m->pixel_width = new_pixel_size; } else commit 016b3d5894b8c424eab262aeefc646c6cd03a70a Author: Alan Mackenzie Date: Fri Jan 15 12:32:32 2016 +0000 In comment-dwim with style `extra-line', respect indent-tabs-mode. This fixes bug #22369. * lisp/newcomment.el (comment-make-bol-ws): New function. (comment-make-extra-lines): Use new function instead of a crude `make-string'. diff --git a/lisp/newcomment.el b/lisp/newcomment.el index 88ed08d..80b52ed 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -990,6 +990,14 @@ comment markers." (goto-char (point-max)))))) (set-marker end nil)) +(defun comment-make-bol-ws (len) + "Make a white-space string of width LEN for use at BOL. +When `indent-tabs-mode' is non-nil, tab characters will be used." + (if (and indent-tabs-mode (> tab-width 0)) + (concat (make-string (/ len tab-width) ?\t) + (make-string (% len tab-width) ? )) + (make-string len ? ))) + (defun comment-make-extra-lines (cs ce ccs cce min-indent max-indent &optional block) "Make the leading and trailing extra lines. This is used for `extra-line' style (or `box' style if BLOCK is specified)." @@ -1025,8 +1033,8 @@ This is used for `extra-line' style (or `box' style if BLOCK is specified)." (setq cs (replace-match fill t t s))) (string-match re e) (setq ce (replace-match fill t t e)))) - (cons (concat cs "\n" (make-string min-indent ? ) ccs) - (concat cce "\n" (make-string (+ min-indent eindent) ? ) ce)))) + (cons (concat cs "\n" (comment-make-bol-ws min-indent) ccs) + (concat cce "\n" (comment-make-bol-ws (+ min-indent eindent)) ce)))) (defmacro comment-with-narrowing (beg end &rest body) "Execute BODY with BEG..END narrowing. commit 3ffe81e245d854a694ae1734f1b6a995bdc5e724 Author: Eli Zaretskii Date: Fri Jan 15 11:47:55 2016 +0200 Make 'random' seeds cryptographically secure if possible * configure.ac: Check for "/dev/urandom". * src/sysdep.c (init_random) [HAVE_DEV_URANDOM]: Read the stream for the seed from "/dev/urandom". [WINDOWSNT]: Obtain the stream for the seed from w32 APIs. * src/fns.c (Frandom): Update the doc string to indicate that system entropy is used when available. * src/w32.c: Include wincrypt.h. (w32_init_crypt_random, w32_init_random): New functions, use the CryptGenRandom API. (globals_of_w32): Initialize w32_crypto_hprov handle to zero. * src/w32.h (w32_init_random): Add prototype. * doc/lispref/numbers.texi (Random Numbers): Document more details about 't' as the argument to 'random'. * etc/NEWS: Mention that '(random t)' now uses a cryptographically strong seed if possible. (Bug#22202) diff --git a/configure.ac b/configure.ac index 8c01aba..6c9b621 100644 --- a/configure.ac +++ b/configure.ac @@ -4153,6 +4153,22 @@ fi AC_TYPE_MBSTATE_T +AC_MSG_CHECKING([whether "/dev/urandom" is available]) +dev_urandom=no +dnl MSYS, being a Cygwin fork, thinks "/dev/urandom" does exist, so +dnl don't check this for the MinGW builds. +if test "${opsys}" != "mingw32"; then + if test -r "/dev/urandom"; then + AC_DEFINE(HAVE_DEV_URANDOM, 1, [Define if the system supports the "/dev/urandom" device.]) + dev_urandom=yes + fi +fi +if test $dev_urandom = yes; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi + dnl Fixme: AC_SYS_POSIX_TERMIOS should probably be used, but it's not clear dnl how the tty code is related to POSIX and/or other versions of termios. dnl The following looks like a useful start. diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi index 20d3c42..3a9483a 100644 --- a/doc/lispref/numbers.texi +++ b/doc/lispref/numbers.texi @@ -1252,7 +1252,9 @@ any integer representable in Lisp, i.e., an integer between (@pxref{Integer Basics}). If @var{limit} is @code{t}, it means to choose a new seed as if Emacs -were restarting. +were restarting. The new seed will be set from the system entropy, if +that is available, or from the current time and Emacs process's PID +(@pxref{System Environment, emacs-pid}) if not. If @var{limit} is a string, it means to choose a new seed based on the string's contents. diff --git a/etc/NEWS b/etc/NEWS index 21aee20..9e63579 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -214,6 +214,14 @@ for use in Emacs bug reports. hiding character but the default `.' can be used by let-binding the variable `read-hide-char'. ++++ +** The Emacs pseudo-random number generator can be securely seeded. +On system where Emacs can access the system entropy or some other +cryptographically secure random stream, it now uses that when `random' +is called with its argument `t'. This allows cryptographically strong +random values; in particular, the Emacs server now uses this facility +to produce its authentication key. + --- ** New input methods: `tamil-dvorak' and `programmer-dvorak'. diff --git a/src/fns.c b/src/fns.c index 977229b..19fa440 100644 --- a/src/fns.c +++ b/src/fns.c @@ -50,7 +50,8 @@ All integers representable in Lisp, i.e. between `most-negative-fixnum' and `most-positive-fixnum', inclusive, are equally likely. With positive integer LIMIT, return random number in interval [0,LIMIT). -With argument t, set the random number seed from the current time and pid. +With argument t, set the random number seed from the system's entropy +pool, or from the current time and pid if entropy is unavailable. With a string argument, set the seed based on the string's contents. Other values of LIMIT are ignored. diff --git a/src/sysdep.c b/src/sysdep.c index a78c4c6..1fa4229 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -2095,8 +2095,35 @@ seed_random (void *seed, ptrdiff_t seed_size) void init_random (void) { - struct timespec t = current_timespec (); - uintmax_t v = getpid () ^ t.tv_sec ^ t.tv_nsec; + uintmax_t v; + struct timespec t; + bool success = false; + +#if HAVE_DEV_URANDOM + FILE *fp = fopen ("/dev/urandom", "rb"); + + if (fp) + { + int i; + + for (i = 0, v = 0; i < sizeof (uintmax_t); i++) + { + v <<= 8; + v |= fgetc (fp); + } + fclose (fp); + success = true; + } +#elif defined WINDOWSNT + if (w32_init_random (&v, sizeof v) == 0) + success = true; +#endif /* HAVE_DEV_URANDOM || WINDOWSNT */ + if (!success) + { + /* Fall back to current time value + PID. */ + t = current_timespec (); + v = getpid () ^ t.tv_sec ^ t.tv_nsec; + } seed_random (&v, sizeof v); } diff --git a/src/w32.c b/src/w32.c index ea3a9da..7884bad 100644 --- a/src/w32.c +++ b/src/w32.c @@ -224,6 +224,8 @@ typedef struct _REPARSE_DATA_BUFFER { #include /* should be after winsock2.h */ +#include + #include #include "w32.h" @@ -2093,6 +2095,34 @@ init_user_info (void) CloseHandle (token); } +static HCRYPTPROV w32_crypto_hprov; +static int +w32_init_crypt_random (void) +{ + if (!CryptAcquireContext (&w32_crypto_hprov, NULL, NULL, PROV_RSA_FULL, + CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) + { + DebPrint (("CryptAcquireContext failed with error %x\n", + GetLastError ())); + w32_crypto_hprov = 0; + return -1; + } + return 0; +} + +int +w32_init_random (void *buf, ptrdiff_t buflen) +{ + if (!w32_crypto_hprov) + w32_init_crypt_random (); + if (w32_crypto_hprov) + { + if (CryptGenRandom (w32_crypto_hprov, buflen, (BYTE *)buf)) + return 0; + } + return -1; +} + int random (void) { @@ -9410,6 +9440,8 @@ globals_of_w32 (void) extern void dynlib_reset_last_error (void); dynlib_reset_last_error (); #endif + + w32_crypto_hprov = (HCRYPTPROV)0; } /* For make-serial-process */ diff --git a/src/w32.h b/src/w32.h index 501056d..ba3fec8 100644 --- a/src/w32.h +++ b/src/w32.h @@ -222,6 +222,9 @@ extern int w32_memory_info (unsigned long long *, unsigned long long *, /* Compare 2 UTF-8 strings in locale-dependent fashion. */ extern int w32_compare_strings (const char *, const char *, char *, int); +/* Return a cryptographically secure seed for PRNG. */ +extern int w32_init_random (void *, ptrdiff_t); + #ifdef HAVE_GNUTLS #include commit fee0526a189f43e8470d78e8374bd425890fbe6f Author: Eli Zaretskii Date: Fri Jan 15 10:54:03 2016 +0200 Unhide the --no-line-directive option to 'etags' * lib-src/etags.c (print_help): Un-undocument the --no-line-directive option. (Bug#22306) * doc/man/etags.1: Document the --no-line-directive option. diff --git a/doc/man/etags.1 b/doc/man/etags.1 index 7d5d374..d34063f 100644 --- a/doc/man/etags.1 +++ b/doc/man/etags.1 @@ -17,7 +17,7 @@ etags, ctags \- generate tag file for Emacs, vi [\|\-\-parse\-stdin=\fIfile\fP\|] .br [\|\-\-append\|] [\|\-\-no\-defines\|] [\|\-\-globals\|] -[\|\-\-no\-globals\|] [\|\-\-include=\fIfile\fP\|] +[\|\-\-no\-globals\|] [\|\-\-no\-line\-directive\|] [\|\-\-include=\fIfile\fP\|] [\|\-\-ignore\-indentation\|] [\|\-\-language=\fIlanguage\fP\|] [\|\-\-members\|] [\|\-\-no\-members\|] [\|\-\-output=\fItagfile\fP\|] [\|\-\-class\-qualify\|] @@ -31,8 +31,8 @@ etags, ctags \- generate tag file for Emacs, vi [\|\-\-parse\-stdin=\fIfile\fP\|] .br [\|\-\-append\|] [\|\-\-backward\-search\|] -[\|\-\-cxref\|] [\|\-\-no\-defines\|] -[\|\-\-globals\|] [\|\-\-no\-globals\|] [\|\-\-ignore\-indentation\|] +[\|\-\-cxref\|] [\|\-\-no\-defines\|] [\|\-\-globals\|] +[\|\-\-no\-globals\|] [\|\-\-no\-line\-directive\|] [\|\-\-ignore\-indentation\|] [\|\-\-language=\fIlanguage\fP\|] [\|\-\-members\|] [\|\-\-no\-members\|] [\|\-\-class\-qualify\|] [\|\-\-output=\fItagfile\fP\|] [\|\-\-regex=\fIregexp\fP\|] @@ -105,6 +105,12 @@ the default in C and derived languages. Do not tag global variables in C and derived languages. Typically this reduces the file size by one fourth. .TP +.B \-\-no\-line\-directive +Ignore \fB#line\fP preprocessor directives in C and derived languages. The +default is to honor those directives, and record the tags as if the +file scanned was the one named in the \fB#line\fP directive. This switch is +useful when the original file named by \fB#line\fP is no longer available. +.TP \fB\-i\fP \fIfile\fP, \fB\-\-include=\fIfile\fP Include a note in the tag file indicating that, when searching for a tag, one should also consult the tags file \fIfile\fP after checking the diff --git a/lib-src/etags.c b/lib-src/etags.c index 2192627..54ed1b4 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -951,8 +951,7 @@ Relative ones are stored relative to the output file's directory.\n"); Do not create tag entries for global variables in some\n\ languages. This makes the tags file smaller."); - if (PRINT_UNDOCUMENTED_OPTIONS_HELP) - puts ("--no-line-directive\n\ + puts ("--no-line-directive\n\ Ignore #line preprocessor directives in C and derived languages."); if (CTAGS) commit b70dba4e18514411ed38b5bbb846558158842ace Author: Alan J Third Date: Fri Jan 15 10:26:10 2016 +0200 Fix picture-mode wrt double-width characters * lisp/textmodes/picture.el (picture-insert): Check the width of the character being replaced, not just that of the replacement. (Bug#1808) Copyright-paperwork-exempt: yes diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el index 4aee273..b77f8e9 100644 --- a/lisp/textmodes/picture.el +++ b/lisp/textmodes/picture.el @@ -272,7 +272,11 @@ Use \"\\[command-apropos] picture-movement\" to see commands which control motio (or (eolp) (let ((pos (point))) (move-to-column col t) - (delete-region pos (point))))) + (let ((old-width (string-width (buffer-substring pos (point))))) + (delete-region pos (point)) + (when (> old-width width) + (insert-char ? (- old-width width)) + (goto-char pos)))))) (insert ch) (forward-char -1) (picture-move)))) commit 2bc07f7a2a4fb96b470576567a18240f363b4a3b Author: Eli Zaretskii Date: Fri Jan 15 10:14:30 2016 +0200 ; * etc/NEWS: Remove unneeded text. diff --git a/etc/NEWS b/etc/NEWS index ef72d45..21aee20 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -726,8 +726,6 @@ to produce a neat summary. --- ** New js.el option `js-indent-first-init'. -It was renamed from `js-indent-first-initialiser', to avoid issues -with American vs British spelling. ** Info commit cde11820e0ceb78aee2abe72410f658993269d86 Author: Eric Abrahamsen Date: Fri Jan 15 05:00:40 2016 +0000 Honor docstring of gnus-group-get-new-news * lisp/gnus/gnus-start.el (gnus-get-unread-articles): If the prefix arg is t, but non-numeric, unconditionally consider all groups to need updating. diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 4efec86..10f93d8 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -122,7 +122,6 @@ This variable can be a list of select methods which Gnus will query with the `ask-server' method in addition to the primary, secondary, and archive servers. - E.g.: (setq gnus-check-new-newsgroups \\='((nntp \"some.server\") (nntp \"other.server\"))) @@ -1673,10 +1672,11 @@ backend check whether the group actually exists." (push (setq method-group-list (list method method-type nil nil)) type-cache)) ;; Only add groups that need updating. - (if (funcall (if one-level #'= #'<=) (gnus-info-level info) - (if (eq (cadr method-group-list) 'foreign) - foreign-level - alevel)) + (if (or (and foreign-level (null (numberp foreign-level))) + (funcall (if one-level #'= #'<=) (gnus-info-level info) + (if (eq (cadr method-group-list) 'foreign) + foreign-level + alevel))) (setcar (nthcdr 2 method-group-list) (cons info (nth 2 method-group-list))) ;; The group is inactive, so we nix out the number of unread articles. commit dadb841a06aa1ffd6d17c04ef83140dbd1ad7307 Author: Simen Heggestøyl Date: Thu Jan 14 19:24:03 2016 +0100 Disallow parenthesis in non-pseudo CSS selectors * lisp/textmodes/css-mode.el (css--font-lock-keywords): Disallow parenthesis in selectors except for in the function notation that might appear right after a pseudo-class. * test/indent/scss-mode.scss: Add a test for it. diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index 48c2484..d402fb1 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el @@ -257,13 +257,13 @@ (if (not sassy) ;; We don't allow / as first char, so as not to ;; take a comment as the beginning of a selector. - "[^@/:{} \t\n][^:{}]+" + "[^@/:{}() \t\n][^:{}()]+" ;; Same as for non-sassy except we do want to allow { and } ;; chars in selectors in the case of #{$foo} ;; variable interpolation! (concat "\\(?:" scss--hash-re - "\\|[^@/:{} \t\n#]\\)" - "[^:{}#]*\\(?:" scss--hash-re "[^:{}#]*\\)*")) + "\\|[^@/:{}() \t\n#]\\)" + "[^:{}()#]*\\(?:" scss--hash-re "[^:{}()#]*\\)*")) ;; Even though pseudo-elements should be prefixed by ::, a ;; single colon is accepted for backward compatibility. "\\(?:\\(:" (regexp-opt (append css-pseudo-class-ids @@ -271,8 +271,8 @@ "\\|\\::" (regexp-opt css-pseudo-element-ids t) "\\)" "\\(?:([^)]+)\\)?" (if (not sassy) - "[^:{}\n]*" - (concat "[^:{}\n#]*\\(?:" scss--hash-re "[^:{}\n#]*\\)*")) + "[^:{}()\n]*" + (concat "[^:{}()\n#]*\\(?:" scss--hash-re "[^:{}()\n#]*\\)*")) "\\)*" "\\)\\(?:\n[ \t]*\\)*{") (1 'css-selector keep)) diff --git a/test/indent/scss-mode.scss b/test/indent/scss-mode.scss index 7a29929..02a4a98 100644 --- a/test/indent/scss-mode.scss +++ b/test/indent/scss-mode.scss @@ -55,3 +55,13 @@ article[role="main"] { } .box { @include border-radius(10px); } + +// bug:21230 +$list: ( + ('a', #000000, #fff) + ('b', #000000, #fff) + ('c', #000000, #fff) + ('d', #000000, #fff) + ('e', #000000, #fff) + ('f', #000000, #fff) +); commit d5f1db83ecfffbbb52b88b382cf5d480e8a0ef32 Author: Glenn Morris Date: Thu Jan 14 12:43:22 2016 -0500 ; * lisp/time-stamp.el: Remove active time-stamp comment. It was cute, but it's not needed as an example, and causes spurious diffs/conflicts for those with time-stamping enabled. diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el index dffd590..d58942c 100644 --- a/lisp/time-stamp.el +++ b/lisp/time-stamp.el @@ -5,7 +5,6 @@ ;; This file is part of GNU Emacs. -;; Maintainer's Time-stamp: <2006-04-12 20:30:56 rms> ;; Maintainer: Stephen Gildea ;; Keywords: tools @@ -27,7 +26,6 @@ ;; A template in a file can be updated with a new time stamp when ;; you save the file. For example: ;; static char *ts = "sdmain.c Time-stamp: <2001-08-13 10:20:51 gildea>"; -;; See the top of `time-stamp.el' for another example. ;; To use time-stamping, add this line to your init file: ;; (add-hook 'before-save-hook 'time-stamp) commit a53fc894808a8244baff4a22047b832dbf5ea311 Author: Katsumi Yamaoka Date: Thu Jan 14 11:26:13 2016 +0000 * lisp/gnus/nntp.el (nntp-request-newgroups): Simplify diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 0006ef9..f56b045 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -1115,24 +1115,14 @@ command whose response triggered the error." (deffoo nntp-request-newgroups (date &optional server) (nntp-with-open-group - nil server - (with-current-buffer nntp-server-buffer - (let* ((time (date-to-time date)) - (ls (- (cadr time) (nth 8 (decode-time time))))) - (cond ((< ls 0) - (setcar time (1- (car time))) - (setcar (cdr time) (+ ls 65536))) - ((>= ls 65536) - (setcar time (1+ (car time))) - (setcar (cdr time) (- ls 65536))) - (t - (setcar (cdr time) ls))) - (prog1 - (nntp-send-command - "^\\.\r?\n" "NEWGROUPS" - (format-time-string "%y%m%d %H%M%S" time t) - "GMT") - (nntp-decode-text)))))) + nil server + (with-current-buffer nntp-server-buffer + (prog1 + (nntp-send-command + "^\\.\r?\n" "NEWGROUPS" + (format-time-string "%y%m%d %H%M%S" (date-to-time date) t) + "GMT") + (nntp-decode-text))))) (deffoo nntp-request-post (&optional server) (nntp-with-open-group commit 058f8a8d55a6b20c68ee9728c537bb8ce50dfe81 Author: Michael Albinus Date: Thu Jan 14 09:11:14 2016 +0100 check-maybe shall run only default tests * test/automated/Makefile.in (check, check-expensive): Depend on mostlyclean. (check-maybe): Re-run only default tests. (check-doit): Use code of check-maybe. (mostlyclean): Move *.log files away. diff --git a/test/automated/Makefile.in b/test/automated/Makefile.in index 48920ef..152e601 100644 --- a/test/automated/Makefile.in +++ b/test/automated/Makefile.in @@ -87,9 +87,9 @@ WRITE_LOG = > $@ 2>&1 || { stat=ERROR; cat $@; }; echo $$stat: $@ ## to change this; bug#17848 - if that gets done, this can be simplified). ## ## Beware: it approximates 'no-byte-compile', so watch out for false-positives! -SELECTOR_DEFAULT=(quote (not (tag :expensive-test))) -SELECTOR_EXPENSIVE=nil -SELECTOR= +SELECTOR_DEFAULT = (quote (not (tag :expensive-test))) +SELECTOR_EXPENSIVE = nil +SELECTOR = %.log: ${srcdir}/%.el @if grep '^;.*no-byte-compile: t' $< > /dev/null; then \ loadfile=$<; \ @@ -121,29 +121,31 @@ endef $(foreach test,${TESTS},$(eval $(call test_template,${test}))) -## Rerun default tests. -check: +## Rerun all default tests. +check: mostlyclean @${MAKE} check-doit SELECTOR="${SELECTOR_DEFAULT}" -## Rerun also expensive tests. +## Rerun all default and expensive tests. .PHONY: check-expensive -check-expensive: +check-expensive: mostlyclean @${MAKE} check-doit SELECTOR="${SELECTOR_EXPENSIVE}" -## Re-run all the tests every time. -.PHONY: check-doit -check-doit: - -@for f in *.log; do test ! -f $$f || mv $$f $$f~; done - @${MAKE} check-maybe - -## Only re-run tests whose .log is older than the test. +## Only re-run default tests whose .log is older than the test. .PHONY: check-maybe -check-maybe: ${LOGFILES} +check-maybe: + @${MAKE} check-doit SELECTOR="${SELECTOR_DEFAULT}" + +## Run the tests. +.PHONY: check-doit +check-doit: ${LOGFILES} $(emacs) -l ert -f ert-summarize-tests-batch-and-exit $^ .PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean -clean mostlyclean: +mostlyclean: + -@for f in *.log; do test ! -f $$f || mv $$f $$f~; done + +clean: -rm -f *.log *.log~ bootstrap-clean: clean commit a70b0642829576e5fba9a1369db99517cf055600 Author: Mark Oteiza Date: Wed Jan 13 20:08:05 2016 -0500 * lisp/thingatpt.el (thing-at-point-uri-schemes): Add "magnet:" diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el index 9794d00..1686c02 100644 --- a/lisp/thingatpt.el +++ b/lisp/thingatpt.el @@ -280,8 +280,8 @@ If nil, construct the regexp from `thing-at-point-uri-schemes'.") "finger://" "fish://" "ftp://" "geo:" "git://" "go:" "gopher://" "h323:" "http://" "https://" "im:" "imap://" "info:" "ipp:" "irc://" "irc6://" "ircs://" "iris.beep:" "jar:" "ldap://" - "ldaps://" "mailto:" "mid:" "mtqp://" "mupdate://" "news:" - "nfs://" "nntp://" "opaquelocktoken:" "pop://" "pres:" + "ldaps://" "magnet:" "mailto:" "mid:" "mtqp://" "mupdate://" + "news:" "nfs://" "nntp://" "opaquelocktoken:" "pop://" "pres:" "resource://" "rmi://" "rsync://" "rtsp://" "rtspu://" "service:" "sftp://" "sip:" "sips:" "smb://" "sms:" "snmp://" "soap.beep://" "soap.beeps://" "ssh://" "svn://" "svn+ssh://" "tag:" "tel:" commit 78c8718fd3a7bc08a2307f8751b3920d3fc9b763 Author: Dmitry Gutov Date: Thu Jan 14 03:38:57 2016 +0300 Un-obsolete tags-loop-continue * lisp/progmodes/etags.el (tags-loop-continue): Un-obsolete. http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00682.html diff --git a/etc/NEWS b/etc/NEWS index 525fa5e..ef72d45 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -954,7 +954,8 @@ of its back-ends. The command `xref-find-definitions' replaces `find-tag' and provides an interface to pick one definition among several. `tags-loop-continue' is now unbound. `xref-pop-marker-stack' replaces -`pop-tag-mark', but has a keybinding (`M-,'), unlike `pop-tag-mark'. +`pop-tag-mark', but has a keybinding (`M-,') different from the one +`pop-tag-mark' used. `xref-find-definitions-other-window' replaces `find-tag-other-window'. `xref-find-definitions-other-frame' replaces `find-tag-other-frame'. @@ -962,7 +963,11 @@ an interface to pick one definition among several. As a result of this, the following commands are now obsolete: `find-tag-other-window', `find-tag-other-frame', `find-tag-regexp', -`tags-apropos', and `tags-loop-continue'. +`tags-apropos'. + +`tags-loop-continue' is not obsolete because it's still useful in +`tags-search' and `tags-query-replace', for which there are no direct +replacements yet. +++ *** New variables diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 2db7220..271033b 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -1794,7 +1794,6 @@ Two variables control the processing we do on each file: the value of interesting (it returns non-nil if so) and `tags-loop-operate' is a form to evaluate to operate on an interesting file. If the latter evaluates to nil, we exit; otherwise we scan the next file." - (declare (obsolete "use `xref-find-definitions' interface instead." "25.1")) (interactive) (let (new ;; Non-nil means we have finished one file commit 30c24e49cb82a817a123405df92210cbab12c459 Author: Eli Zaretskii Date: Wed Jan 13 21:14:22 2016 +0200 Document obsoletion of 'intangible' and 'point-entered/left' * doc/lispref/text.texi (Special Properties): Document the new properties 'cursor-intangible' and 'cursor-sensor-functions'. Document the obsolete status of 'intangible', 'pointer-left', and 'point-entered' properties, and of 'inhibit-point-motion-hooks'. * doc/lispref/display.texi (Overlay Properties): Document that 'intangible' overlay property is obsolete. * lisp/emacs-lisp/cursor-sensor.el (cursor-sensor-mode): Doc fix. diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 1ac0f05..d770599 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -1721,7 +1721,8 @@ invisible, which means that it does not appear on the screen. @item intangible @kindex intangible @r{(overlay property)} The @code{intangible} property on an overlay works just like the -@code{intangible} text property. @xref{Special Properties}, for details. +@code{intangible} text property. It is obsolete. @xref{Special +Properties}, for details. @item isearch-open-invisible This property tells incremental search how to make an invisible overlay diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 5d9f192..41991c9 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -3380,14 +3380,22 @@ If consecutive characters have unequal non-@code{nil} @code{intangible} properties, they belong to separate groups; each group is separately treated as described above. -When the variable @code{inhibit-point-motion-hooks} is non-@code{nil}, -the @code{intangible} property is ignored. +When the variable @code{inhibit-point-motion-hooks} is non-@code{nil} +(as it is by default), the @code{intangible} property is ignored. Beware: this property operates at a very low level, and affects a lot of code in unexpected ways. So use it with extreme caution. A common misuse is to put an intangible property on invisible text, which is actually unnecessary since the command loop will move point outside of the invisible text at the end of -each command anyway. @xref{Adjusting Point}. +each command anyway. @xref{Adjusting Point}. For these reasons, this +property is obsolete; use the @code{cursor-intangible} property instead. + +@item cursor-intangible +@kindex cursor-intangible @r{(text property)} +@findex cursor-intangible-mode +When the minor mode @code{cursor-intangible-mode} is turned on, point +is moved away of any position that has a non-@code{nil} +@code{cursor-intangible} property, just before redisplay happens. @item field @kindex field @r{(text property)} @@ -3550,9 +3558,23 @@ It is possible to use @code{char-after} to examine characters at various buffer positions without moving point to those positions. Only an actual change in the value of point runs these hook functions. -The variable @code{inhibit-point-motion-hooks} can inhibit running the -@code{point-left} and @code{point-entered} hooks, see @ref{Inhibit -point motion hooks}. +The variable @code{inhibit-point-motion-hooks} by default inhibits +running the @code{point-left} and @code{point-entered} hooks, see +@ref{Inhibit point motion hooks}. + +These properties are obsolete; please use +@code{cursor-sensor-functions} instead. + +@item cursor-sensor-functions +@kindex cursor-sensor-functions @r{(text property)} +@findex cursor-sensor-mode +This special property records a list of functions that react to cursor +motion. Each function in the list is called, just before redisplay, +with 3 arguments: the affected window, the previous known position of +the cursor, and one of the symbols @code{entered} or @code{left}, +depending on whether the cursor is entering the text that has this +property or leaving it. The functions are called only when the minor +mode @code{cursor-sensor-mode} is turned on. @item composition @kindex composition @r{(text property)} @@ -3564,10 +3586,12 @@ directly by, for instance, @code{put-text-property}. @end table @defvar inhibit-point-motion-hooks -@anchor{Inhibit point motion hooks} When this variable is +@anchor{Inhibit point motion hooks} When this obsolete variable is non-@code{nil}, @code{point-left} and @code{point-entered} hooks are not run, and the @code{intangible} property has no effect. Do not set -this variable globally; bind it with @code{let}. +this variable globally; bind it with @code{let}. Since the affected +properties are obsolete, this variable's default value is @code{t}, to +effectively disable them. @end defvar @defvar show-help-function diff --git a/etc/NEWS b/etc/NEWS index 7cea0c8..525fa5e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1357,12 +1357,16 @@ It is a bit easier to use than `pre-redisplay-function'. ** The second arg of `looking-back' should always be provided explicitly. Previously, it was an optional argument, now it's mandatory. -** Obsolete text properties `intangible', `point-entered', and `point-left'. ++++ +** Text properties `intangible', `point-entered', and `point-left' are obsolete. Replaced by properties `cursor-intangible' and `cursor-sensor-functions', implemented by the new `cursor-intangible-mode' and `cursor-sensor-mode' minor modes. -** `inhibit-point-motion-hooks' now defaults to t and is obsolete. ++++ +** `inhibit-point-motion-hooks' now defaults to `t' and is obsolete. +Use the new minor modes `cursor-intangible-mode' and +`cursor-sensor-mode' instead. +++ ** New process type `pipe', which can be used in combination with the diff --git a/lisp/emacs-lisp/cursor-sensor.el b/lisp/emacs-lisp/cursor-sensor.el index 70c4458..ac063d48 100644 --- a/lisp/emacs-lisp/cursor-sensor.el +++ b/lisp/emacs-lisp/cursor-sensor.el @@ -167,8 +167,8 @@ This property should hold a list of functions which react to the motion of the cursor. They're called with three arguments (WINDOW OLDPOS DIR) where WINDOW is the affected window, OLDPOS is the last known position of -the cursor and DIR can be `left' or `entered' depending on whether the cursor is -entering the area covered by the text-property property or leaving it." +the cursor and DIR can be `entered' or `left' depending on whether the cursor +is entering the area covered by the text-property property or leaving it." nil nil nil (if cursor-sensor-mode (add-hook 'pre-redisplay-functions #'cursor-sensor--detect commit 53fb7e6e5da541e0b5f6b203f567cb5900185e21 Author: Eli Zaretskii Date: Wed Jan 13 20:36:11 2016 +0200 Updater documentation of 'looking-back' * doc/lispref/searching.texi (Regexp Search): Update documentation of 'looking-back'. Fix markup. diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi index 5ff7ef1..1243d72 100644 --- a/doc/lispref/searching.texi +++ b/doc/lispref/searching.texi @@ -1151,16 +1151,17 @@ comes back" twice. @end example @end defun -@defun looking-back regexp &optional limit greedy +@defun looking-back regexp limit &optional greedy This function returns @code{t} if @var{regexp} matches the text immediately before point (i.e., ending at point), and @code{nil} otherwise. Because regular expression matching works only going forward, this is implemented by searching backwards from point for a match that ends at point. That can be quite slow if it has to search a long distance. -You can bound the time required by specifying @var{limit}, which says -not to search before @var{limit}. In this case, the match that is -found must begin at or after @var{limit}. Here's an example: +You can bound the time required by specifying a non-@code{nil} value +for @var{limit}, which says not to search before @var{limit}. In this +case, the match that is found must begin at or after @var{limit}. +Here's an example: @example @group @@ -1178,9 +1179,9 @@ comes back" twice. If @var{greedy} is non-@code{nil}, this function extends the match backwards as far as possible, stopping when a single additional -previous character cannot be part of a match for regexp. When the -match is extended, its starting position is allowed to occur before -@var{limit}. +previous character cannot be part of a match for @var{regexp}. When +the match is extended, its starting position is allowed to occur +before @var{limit}. @c http://debbugs.gnu.org/5689 As a general recommendation, try to avoid using @code{looking-back} diff --git a/etc/NEWS b/etc/NEWS index c51136f..7cea0c8 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1353,7 +1353,9 @@ Previously, the default value of `nil' implied using `read'. ** New hook `pre-redisplay-functions'. It is a bit easier to use than `pre-redisplay-function'. ++++ ** The second arg of `looking-back' should always be provided explicitly. +Previously, it was an optional argument, now it's mandatory. ** Obsolete text properties `intangible', `point-entered', and `point-left'. Replaced by properties `cursor-intangible' and `cursor-sensor-functions', commit 3db8ce4fbd75b978d658df58810adf1deca04708 Author: Eli Zaretskii Date: Wed Jan 13 20:29:36 2016 +0200 Document 'pre-redisplay-functions' * doc/lispref/hooks.texi (Standard Hooks): * doc/lispref/display.texi (Forcing Redisplay): Document 'pre-redisplay-functions'. diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 93b00e1..1ac0f05 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -95,11 +95,6 @@ redisplay proceeded to completion; it could have been preempted by newly arriving input. @end defun -@defvar pre-redisplay-function -A function run just before redisplay. It is called with one argument, -the set of windows to redisplay. -@end defvar - Although @code{redisplay} tries immediately to redisplay, it does not change how Emacs decides which parts of its frame(s) to redisplay. By contrast, the following function adds certain windows to the @@ -117,6 +112,19 @@ This function does not do a redisplay immediately; Emacs does that as it waits for input, or when the function @code{redisplay} is called. @end defun +@defvar pre-redisplay-function +A function run just before redisplay. It is called with one argument, +the set of windows to be redisplayed. The set can be @code{nil}, +meaning only the selected window, or @code{t}, meaning all the +windows. +@end defvar + +@defvar pre-redisplay-functions +This hook is run just before redisplay. It is called once in each +window that is about to be redisplayed, with @code{current-buffer} set +to the buffer displayed in that window. +@end defvar + @node Truncation @section Truncation @cindex line wrapping diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi index b8f761d..1027aa0 100644 --- a/doc/lispref/hooks.texi +++ b/doc/lispref/hooks.texi @@ -180,16 +180,6 @@ Hook run when about to switch windows with a mouse command. @item mouse-position-function @xref{Mouse Position}. -@item post-command-hook -@itemx pre-command-hook -@xref{Command Overview}. - -@item post-gc-hook -@xref{Garbage Collection}. - -@item post-self-insert-hook -@xref{Keymaps and Minor Modes}. - @item prefix-command-echo-keystrokes-functions @vindex prefix-command-echo-keystrokes-functions An abnormal hook run by prefix commands (such as @kbd{C-u}) which @@ -206,6 +196,20 @@ the current prefix command state to the next command. For example, @kbd{C-u} needs to pass the state to the next command when the user types @kbd{C-u -} or follows @kbd{C-u} with a digit. +@item pre-redisplay-functions +Hook run in each window just before redisplaying it. @xref{Forcing +Redisplay}. + +@item post-command-hook +@itemx pre-command-hook +@xref{Command Overview}. + +@item post-gc-hook +@xref{Garbage Collection}. + +@item post-self-insert-hook +@xref{Keymaps and Minor Modes}. + @ignore @item prog-mode-hook @itemx special-mode-hook diff --git a/etc/NEWS b/etc/NEWS index 076835c..c51136f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1349,7 +1349,9 @@ file byte offsets, given the file's encoding. ** The default value of `load-read-function' is now `read'. Previously, the default value of `nil' implied using `read'. -** New hook `pre-redisplay-functions', a bit easier to use than pre-redisplay-function. ++++ +** New hook `pre-redisplay-functions'. +It is a bit easier to use than `pre-redisplay-function'. ** The second arg of `looking-back' should always be provided explicitly. commit 2e12e8d74855b953e07252c7b173f34f79808296 Author: Eli Zaretskii Date: Wed Jan 13 20:19:00 2016 +0200 Document the new deafault value of 'load-read-function' * doc/lispref/loading.texi (How Programs Do Loading): Document the change in the default value of 'load-read-function'. diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi index cb5c701..18e67f1 100644 --- a/doc/lispref/loading.texi +++ b/doc/lispref/loading.texi @@ -202,8 +202,8 @@ This variable specifies an alternate expression-reading function for @code{load} and @code{eval-region} to use instead of @code{read}. The function should accept one argument, just as @code{read} does. -Normally, the variable's value is @code{nil}, which means those -functions should use @code{read}. +By default, this variable's value is @code{read}. @xref{Input +Functions}. Instead of using this variable, it is cleaner to use another, newer feature: to pass the function as the @var{read-function} argument to diff --git a/etc/NEWS b/etc/NEWS index 88d0604..076835c 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1345,7 +1345,9 @@ commands other than the predefined `C-u'. These allow to convert between buffer positions and the corresponding file byte offsets, given the file's encoding. ++++ ** The default value of `load-read-function' is now `read'. +Previously, the default value of `nil' implied using `read'. ** New hook `pre-redisplay-functions', a bit easier to use than pre-redisplay-function. commit c8eb45da88e05453e78440fedf09a143c832d5a0 Author: Eli Zaretskii Date: Wed Jan 13 20:11:52 2016 +0200 Document 'bufferpos-to-filepos' and 'filepos-to-bufferpos' * doc/lispref/nonascii.texi (Text Representations): Document 'bufferpos-to-filepos' and 'filepos-to-bufferpos'. diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index 744351e..fca4023 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi @@ -123,6 +123,45 @@ In other words, the value does not change for all byte positions that belong to the same character. @end defun +@cindex convert file byte to buffer position +@cindex convert buffer position to file byte + The following two functions are useful when a Lisp program needs to +map buffer positions to byte offsets in a file visited by the buffer. + +@defun bufferpos-to-filepos position &optional quality coding-system +This function is similar to @code{position-bytes}, but instead of byte +position in the current buffer it returns the offset from the +beginning of the current buffer's file of the byte that corresponds to +the given character @var{position} in the buffer. The conversion +requires to know how the text is encoded in the buffer's file; this is +what the @var{coding-system} argument is for, defaulting to the value +of @code{buffer-file-coding-system}. The optional argument +@var{quality} specifies how accurate the result should be; it should +be one of the following: + +@table @code +@item exact +The result must be accurate. The function may need to encode and +decode a large part of the buffer. +@item approximate +The value can be an approximation. The function may avoid expensive +processing and return an inexact result. +@item nil +If the exact result needs expensive processing, the function will +return @code{nil} rather than an approximation. This is the default +if the argument is omitted. +@end table +@end defun + +@defun filepos-to-bufferpos byte &optional quality coding-system +This function returns the buffer position corresponding to a file +position specified by @var{byte}, a zero-base byte offset from the +file's beginning. The function performs the conversion opposite to +what @code{bufferpos-to-filepos} does. Optional arguments +@var{quality} and @var{coding-system} have the same meaning and values +as for @code{bufferpos-to-filepos}. +@end defun + @defun multibyte-string-p string Return @code{t} if @var{string} is a multibyte string, @code{nil} otherwise. This function also returns @code{nil} if @var{string} is diff --git a/etc/NEWS b/etc/NEWS index 5a1adff..88d0604 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1340,7 +1340,10 @@ parsing functions like `forward-sexp'. `prefix-command-preserve-state-hook' allow the definition of prefix commands other than the predefined `C-u'. ++++ ** New functions `filepos-to-bufferpos' and `bufferpos-to-filepos'. +These allow to convert between buffer positions and the corresponding +file byte offsets, given the file's encoding. ** The default value of `load-read-function' is now `read'. commit d3776e9f7c9e6ae3ac4c5afff0c33bff73665759 Author: Eli Zaretskii Date: Wed Jan 13 19:38:06 2016 +0200 Document the new prefix-command hooks * doc/lispref/hooks.texi (Standard Hooks): Document `prefix-command-echo-keystrokes-functions' and `prefix-command-preserve-state-hook'. diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi index cbbaa8e..b8f761d 100644 --- a/doc/lispref/hooks.texi +++ b/doc/lispref/hooks.texi @@ -190,6 +190,22 @@ Hook run when about to switch windows with a mouse command. @item post-self-insert-hook @xref{Keymaps and Minor Modes}. +@item prefix-command-echo-keystrokes-functions +@vindex prefix-command-echo-keystrokes-functions +An abnormal hook run by prefix commands (such as @kbd{C-u}) which +should return a string describing the current prefix state. For +example, @kbd{C-u} produces @samp{C-u-} and @samp{C-u 1 2 3-}. Each +hook function is called with no arguments and should return a string +describing the current prefix state, or @code{nil} if there's no +prefix state. @xref{Prefix Command Arguments}. + +@item prefix-command-preserve-state-hook +@vindex prefix-command-preserve-state-hook +Hook run when a prefix command needs to preserve the prefix by passing +the current prefix command state to the next command. For example, +@kbd{C-u} needs to pass the state to the next command when the user +types @kbd{C-u -} or follows @kbd{C-u} with a digit. + @ignore @item prog-mode-hook @itemx special-mode-hook diff --git a/etc/NEWS b/etc/NEWS index 6323b24..5a1adff 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1335,9 +1335,10 @@ that happen, `unhandled-file-name-directory' now defaults to calling ** syntax-propertize is now automatically called on-demand during forward parsing functions like `forward-sexp'. -** New hooks prefix-command-echo-keystrokes-functions and -prefix-command-preserve-state-hook, to allow the definition of prefix -commands other than the predefined C-u. ++++ +** New hooks `prefix-command-echo-keystrokes-functions' and +`prefix-command-preserve-state-hook' allow the definition of prefix +commands other than the predefined `C-u'. ** New functions `filepos-to-bufferpos' and `bufferpos-to-filepos'. commit d022b707d654c24171a3baf951ca8e5e13a0b77a Author: Paul Eggert Date: Wed Jan 13 08:30:46 2016 -0800 Fix one more misuse of time-stamp-time-zone * test/etags/html-src/softwarelibero.html: Use "UTC0" rather than the unportable "GMT" for time zone. diff --git a/test/etags/html-src/softwarelibero.html b/test/etags/html-src/softwarelibero.html index 1594329..b374273 100644 --- a/test/etags/html-src/softwarelibero.html +++ b/test/etags/html-src/softwarelibero.html @@ -302,7 +302,7 @@ Local variables: fill-column: 72 time-stamp-active: t -time-stamp-time-zone: "GMT" +time-stamp-time-zone: "UTC0" time-stamp-format: "%:y-%02m-%02d" time-stamp-line-limit: 30 time-stamp-start: "ultima\\s-+modifica\\s-+è\\s-+del\\s-+" commit ed1b2de50ae87d8b2f9882be7576fbe5097df65b Author: Paul Eggert Date: Wed Jan 13 08:29:12 2016 -0800 Fix NNTP NEWGROUPS off-by-a-few-hours bug * lisp/gnus/nntp.el (nntp-request-newgroups): Format string in Universal Time, since we’re telling the server “GMT”. diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 0e10dfd..0006ef9 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -1130,7 +1130,7 @@ command whose response triggered the error." (prog1 (nntp-send-command "^\\.\r?\n" "NEWGROUPS" - (format-time-string "%y%m%d %H%M%S" time) + (format-time-string "%y%m%d %H%M%S" time t) "GMT") (nntp-decode-text)))))) commit 281344e606ca46542063dca4687371ea7dcc23c1 Author: Paul Eggert Date: Tue Jan 12 19:34:24 2016 -0800 Update publicsuffix.txt from upstream * etc/publicsuffix.txt: Update from https://publicsuffix.org/list/effective_tld_names.dat dated 2016-01-12 11:52:01 UTC. diff --git a/etc/publicsuffix.txt b/etc/publicsuffix.txt index 98929de..a6f596a 100644 --- a/etc/publicsuffix.txt +++ b/etc/publicsuffix.txt @@ -89,7 +89,6 @@ leasing.aero logistics.aero magazine.aero maintenance.aero -marketplace.aero media.aero microlight.aero modelling.aero @@ -112,7 +111,6 @@ show.aero skydiving.aero software.aero student.aero -taxi.aero trader.aero trading.aero trainer.aero @@ -155,13 +153,6 @@ org.al // am : http://en.wikipedia.org/wiki/.am am -// an : http://www.una.an/an_domreg/default.asp -an -com.an -net.an -org.an -edu.an - // ao : http://en.wikipedia.org/wiki/.ao // http://www.dns.ao/REGISTR.DOC ao @@ -1012,7 +1003,10 @@ gw gy co.gy com.gy +edu.gy +gov.gy net.gy +org.gy // hk : https://www.hkdnr.hk // Submitted by registry 2008-06-11 @@ -1131,8 +1125,16 @@ web.id ie gov.ie -// il : http://en.wikipedia.org/wiki/.il -*.il +// il : http://www.isoc.org.il/domains/ +il +ac.il +co.il +gov.il +idf.il +k12.il +muni.il +net.il +org.il // im : https://www.nic.im/ // Submitted by registry 2013-11-15 @@ -1149,7 +1151,7 @@ tv.im // in : http://en.wikipedia.org/wiki/.in // see also: https://registry.in/Policies -// Please note, that nic.in is not an offical eTLD, but used by most +// Please note, that nic.in is not an official eTLD, but used by most // government institutions. in co.in @@ -4429,8 +4431,21 @@ gov.ng mil.ng mobi.ng -// ni : http://www.nic.ni/dominios.htm -*.ni +// ni : http://www.nic.ni/ +com.ni +gob.ni +edu.ni +org.ni +nom.ni +net.ni +mil.ni +co.ni +biz.ni +web.ni +int.ni +ac.ni +in.ni +info.ni // nl : http://en.wikipedia.org/wiki/.nl // https://www.sidn.nl/ @@ -5775,7 +5790,6 @@ kms.ru k-uralsk.ru kustanai.ru kuzbass.ru -magnitka.ru mytis.ru nakhodka.ru nkz.ru @@ -6125,10 +6139,6 @@ org.to edu.to mil.to -// tp : No registrations at this time. -// Submitted by Ryan Sleevi 2014-01-03 -tp - // subTLDs: https://www.nic.tr/forms/eng/policies.pdf // and: https://www.nic.tr/forms/politikalar.pdf // Submitted by 2014-07-19 @@ -6564,8 +6574,8 @@ lib.wi.us // lib.wv.us Bug 941670 - Removed at request of Larry W Arnold lib.wy.us // k12.ma.us contains school districts in Massachusetts. The 4LDs are -// managed indepedently except for private (PVT), charter (CHTR) and -// parochial (PAROCH) schools. Those are delegated dorectly to the +// managed independently except for private (PVT), charter (CHTR) and +// parochial (PAROCH) schools. Those are delegated directly to the // 5LD operators. pvt.k12.ma.us chtr.k12.ma.us @@ -6919,7 +6929,7 @@ web.za *.zw -// List of new gTLDs imported from https://newgtlds.icann.org/newgtlds.csv on 2015-08-26T23:57:22Z +// List of new gTLDs imported from https://newgtlds.icann.org/newgtlds.csv on 2016-01-04T22:39:54Z // aaa : 2015-02-26 American Automobile Association, Inc. aaa @@ -7077,6 +7087,9 @@ anquan // anz : 2015-07-31 Australia and New Zealand Banking Group Limited anz +// aol : 2015-09-17 AOL Inc. +aol + // apartments : 2014-12-11 June Maple, LLC apartments @@ -7089,6 +7102,9 @@ apple // aquarelle : 2014-07-24 Aquarelle.com aquarelle +// arab : 2015-11-12 League of Arab States +arab + // aramco : 2014-11-20 Aramco Services Company aramco @@ -7185,6 +7201,9 @@ barefoot // bargains : 2013-11-14 Half Hallow, LLC bargains +// baseball : 2015-10-29 MLB Advanced Media DH, LLC +baseball + // basketball : 2015-08-20 Fédération Internationale de Basketball (FIBA) basketball @@ -7212,6 +7231,9 @@ bcn // beats : 2015-05-14 Beats Electronics, LLC beats +// beauty : 2015-12-03 L'Oréal +beauty + // beer : 2014-01-09 Top Level Domain Holdings Limited beer @@ -7302,6 +7324,9 @@ bond // boo : 2014-01-30 Charleston Road Registry Inc. boo +// book : 2015-08-27 Amazon EU S.à r.l. +book + // booking : 2015-07-16 Booking.com B.V. booking @@ -7314,12 +7339,18 @@ bosch // bostik : 2015-05-28 Bostik SA bostik +// boston : 2015-12-10 Boston Globe Media Partners, LLC +boston + // bot : 2014-12-18 Amazon EU S.à r.l. bot // boutique : 2013-11-14 Over Galley, LLC boutique +// box : 2015-11-12 NS1 Limited +box + // bradesco : 2014-12-18 Banco Bradesco S.A. bradesco @@ -7425,6 +7456,12 @@ cartier // casa : 2013-11-21 Top Level Domain Holdings Limited casa +// case : 2015-09-03 CNH Industrial N.V. +case + +// caseih : 2015-09-03 CNH Industrial N.V. +caseih + // cash : 2014-03-06 Delta Lake, LLC cash @@ -7434,6 +7471,9 @@ casino // catering : 2013-12-05 New Falls. LLC catering +// catholic : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication) +catholic + // cba : 2014-06-26 COMMONWEALTH BANK OF AUSTRALIA cba @@ -7533,6 +7573,9 @@ click // clinic : 2014-03-20 Goose Park, LLC clinic +// clinique : 2015-10-01 The Estée Lauder Companies Inc. +clinique + // clothing : 2013-08-27 Steel Lake, LLC clothing @@ -7572,6 +7615,9 @@ community // company : 2013-11-07 Silver Avenue, LLC company +// compare : 2015-10-08 iSelect Ltd +compare + // computer : 2013-10-24 Pine Mill, LLC computer @@ -7635,6 +7681,9 @@ crown // crs : 2014-04-03 Federated Co-operatives Limited crs +// cruise : 2015-12-10 Viking River Cruises (Bermuda) Ltd. +cruise + // cruises : 2013-12-05 Spring Way, LLC cruises @@ -7746,6 +7795,9 @@ discover // dish : 2015-07-30 Dish DBS Corporation dish +// diy : 2015-11-05 Lifestyle Domain Holdings, Inc. +diy + // dnp : 2013-12-13 Dai Nippon Printing Co., Ltd. dnp @@ -7863,6 +7915,9 @@ estate // esurance : 2015-07-23 Esurance Insurance Company esurance +// etisalat : 2015-09-03 Emirates Telecommunications Corporation (trading as Etisalat) +etisalat + // eurovision : 2014-04-24 European Broadcasting Union (EBU) eurovision @@ -8022,6 +8077,12 @@ forum // foundation : 2013-12-05 John Dale, LLC foundation +// fox : 2015-09-11 FOX Registry, LLC +fox + +// free : 2015-12-10 Amazon EU S.à r.l. +free + // fresenius : 2015-07-30 Fresenius Immobilien-Verwaltungs-GmbH fresenius @@ -8211,6 +8272,9 @@ guitars // guru : 2013-08-27 Pioneer Cypress, LLC guru +// hair : 2015-12-03 L'Oréal +hair + // hamburg : 2014-02-20 Hamburg Top-Level-Domain GmbH hamburg @@ -8259,7 +8323,7 @@ hisamitsu // hitachi : 2014-10-31 Hitachi, Ltd. hitachi -// hiv : 2014-03-13 dotHIV gemeinnuetziger e.V. +// hiv : 2014-03-13 hiv // hkt : 2015-05-14 PCCW-HKT DataCom Services Limited @@ -8301,6 +8365,9 @@ host // hosting : 2014-05-29 Uniregistry, Corp. hosting +// hot : 2015-08-27 Amazon EU S.à r.l. +hot + // hoteles : 2015-03-05 Travel Reservations SRL hoteles @@ -8421,6 +8488,9 @@ itau // itv : 2015-07-09 ITV Services Limited itv +// iveco : 2015-09-03 CNH Industrial N.V. +iveco + // iwc : 2014-06-23 Richemont DNS Inc. iwc @@ -8556,6 +8626,9 @@ ladbrokes // lamborghini : 2015-06-04 Automobili Lamborghini S.p.A. lamborghini +// lamer : 2015-10-01 The Estée Lauder Companies Inc. +lamer + // lancaster : 2015-02-12 LANCASTER lancaster @@ -8859,6 +8932,9 @@ monash // money : 2014-10-16 Outer McCook, LLC money +// monster : 2015-09-11 Monster Worldwide, Inc. +monster + // montblanc : 2014-06-23 Richemont DNS Inc. montblanc @@ -8955,6 +9031,9 @@ neustar // new : 2014-01-30 Charleston Road Registry Inc. new +// newholland : 2015-09-03 CNH Industrial N.V. +newholland + // news : 2014-12-18 news @@ -8991,6 +9070,9 @@ ninja // nissan : 2014-03-27 NISSAN MOTOR CO., LTD. nissan +// nissay : 2015-10-29 Nippon Life Insurance Company +nissay + // nokia : 2015-01-08 Nokia Corporation nokia @@ -9084,6 +9166,9 @@ organic // orientexpress : 2015-02-05 Belmond Ltd. orientexpress +// origins : 2015-10-01 The Estée Lauder Companies Inc. +origins + // osaka : 2014-09-04 Interlink Co., Ltd. osaka @@ -9126,6 +9211,9 @@ party // passagens : 2015-03-05 Travel Reservations SRL passagens +// pay : 2015-08-27 Amazon EU S.à r.l. +pay + // payu : 2015-02-12 MIH PayU B.V. payu @@ -9135,6 +9223,9 @@ pccw // pet : 2015-05-07 Afilias plc pet +// pfizer : 2015-09-11 Pfizer Inc. +pfizer + // pharmacy : 2014-06-19 National Association of Boards of Pharmacy pharmacy @@ -9237,7 +9328,7 @@ prof // progressive : 2015-07-23 Progressive Casualty Insurance Company progressive -// promo : 2014-12-18 Play.PROMO Oy +// promo : 2014-12-18 promo // properties : 2013-12-05 Big Pass, LLC @@ -9258,6 +9349,9 @@ prudential // pub : 2013-12-12 United TLD Holdco Ltd. pub +// pwc : 2015-10-29 PricewaterhouseCoopers LLP +pwc + // qpon : 2013-11-14 dotCOOL, Inc. qpon @@ -9279,6 +9373,9 @@ raid // read : 2014-12-18 Amazon EU S.à r.l. read +// realestate : 2015-09-11 dotRealEstate LLC +realestate + // realtor : 2014-05-29 Real Estate Domains LLC realtor @@ -9366,6 +9463,9 @@ rio // rip : 2014-07-10 United TLD Holdco Ltd. rip +// rmit : 2015-11-19 Royal Melbourne Institute of Technology +rmit + // rocher : 2014-12-18 Ferrero Trading Lux S.A. rocher @@ -9492,12 +9592,18 @@ scot // seat : 2014-05-22 SEAT, S.A. (Sociedad Unipersonal) seat +// secure : 2015-08-27 Amazon EU S.à r.l. +secure + // security : 2015-05-14 security // seek : 2014-12-04 Seek Limited seek +// select : 2015-10-08 iSelect Ltd +select + // sener : 2014-10-24 Sener Ingeniería y Sistemas, S.A. sener @@ -9522,6 +9628,9 @@ sexy // sfr : 2015-08-13 Societe Francaise du Radiotelephone - SFR sfr +// shangrila : 2015-09-03 Shangri‐La International Hotel Management Limited +shangrila + // sharp : 2014-05-01 Sharp Corporation sharp @@ -9645,7 +9754,7 @@ staples // star : 2015-01-08 Star India Private Limited star -// starhub : 2015-02-05 StarHub Limited +// starhub : 2015-02-05 StarHub Ltd starhub // statebank : 2015-03-12 STATE BANK OF INDIA @@ -9909,6 +10018,9 @@ ubs // uconnect : 2015-07-30 FCA US LLC. uconnect +// unicom : 2015-10-15 China United Network Communications Corporation Limited +unicom + // university : 2014-03-06 Little Station, LLC university @@ -9927,6 +10039,9 @@ vacations // vana : 2014-12-11 Lifestyle Domain Holdings, Inc. vana +// vanguard : 2015-09-03 The Vanguard Group, Inc. +vanguard + // vegas : 2014-01-16 Dot Vegas, Inc. vegas @@ -9993,6 +10108,9 @@ vodka // volkswagen : 2015-05-14 Volkswagen Group of America Inc. volkswagen +// volvo : 2015-11-12 Volvo Holding Sverige Aktiebolag +volvo + // vote : 2013-11-21 Monolith Registry LLC vote @@ -10101,6 +10219,9 @@ works // world : 2014-06-12 Bitter Fields, LLC world +// wow : 2015-10-08 Amazon EU S.à r.l. +wow + // wtc : 2013-12-19 World Trade Centers Association, Inc. wtc @@ -10164,6 +10285,9 @@ xin // xn--55qx5d : 2013-11-14 Computer Network Information Center of Chinese Academy of Sciences (China Internet Network Information Center) 公司 +// xn--5su34j936bgsg : 2015-09-03 Shangri‐La International Hotel Management Limited +香格里拉 + // xn--5tzm5g : 2014-12-22 Global Website TLD Asia Limited 网站 @@ -10176,6 +10300,9 @@ xin // xn--80adxhks : 2013-12-19 Foundation for Assistance for Internet Technologies and Infrastructure Development (FAITID) москва +// xn--80aqecdr1a : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication) +католик + // xn--80asehdb : 2013-07-14 CORE Association онлайн @@ -10260,6 +10387,9 @@ xin // xn--gckr3f0f : 2015-02-26 Amazon EU S.à r.l. クラウド +// xn--gk3at1e : 2015-10-08 Amazon EU S.à r.l. +通販 + // xn--hxt814e : 2014-05-15 Zodiac Libra Limited 网店 @@ -10296,6 +10426,9 @@ xin // xn--mgba7c0bbn0a : 2015-05-14 Crescent Holding GmbH العليان +// xn--mgbaakc7dvf : 2015-09-03 Emirates Telecommunications Corporation (trading as Etisalat) +اتصالات + // xn--mgbab2bd : 2013-10-31 CORE Association بازار @@ -10305,6 +10438,9 @@ xin // xn--mgbca7dzdo : 2015-07-30 Abu Dhabi Systems and Information Centre ابوظبي +// xn--mgbi4ecexp : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication) +كاثوليك + // xn--mgbt3dhd : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti. همراه @@ -10320,6 +10456,9 @@ xin // xn--ngbe9e0a : 2014-12-04 Kuwait Finance House بيتك +// xn--ngbrx : 2015-11-12 League of Arab States +عرب + // xn--nqv7f : 2013-11-14 Public Interest Registry 机构 @@ -10359,6 +10498,9 @@ xin // xn--tckwe : 2015-01-15 VeriSign Sarl コム +// xn--tiq49xqyj : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication) +天主教 + // xn--unup4y : 2013-07-14 Spring Fields, LLC 游戏 @@ -11038,6 +11180,7 @@ blogspot.td blogspot.tw blogspot.ug blogspot.vn +cloudfunctions.net codespot.com googleapis.com googlecode.com @@ -11045,6 +11188,9 @@ pagespeedmobilizer.com withgoogle.com withyoutube.com +// Hashbang : https://hashbang.sh +hashbang.sh + // Heroku : https://www.heroku.com/ // Submitted by Tom Maher 2013-05-02 herokuapp.com @@ -11075,6 +11221,10 @@ bmoattachments.org // Submitted by Trung Tran 2015-04-23 4u.com +// ngrok : https://ngrok.com/ +// Submitted by Alan Shreve 2015-11-10 +ngrok.io + // NFSN, Inc. : https://www.NearlyFreeSpeech.NET/ // Submitted by Jeff Wheelhouse 2014-02-02 nfshost.com @@ -11095,6 +11245,10 @@ operaunite.com // Submitted by Duarte Santos 2014-03-11 outsystemscloud.com +// Pagefront : https://www.pagefronthq.com/ +// Submitted by Jason Kriss 2015-12-02 +pagefrontapp.com + // .pl domains (grandfathered) art.pl gliwice.pl @@ -11116,6 +11270,11 @@ priv.at // Submitted by Daniel Dent (https://www.danieldent.com/) 2015-07-16 qa2.com +// Rackmaze LLC : https://www.rackmaze.com +// Submitted by Kirill Pertsev 2015-12-02 +rackmaze.com +rackmaze.net + // Red Hat, Inc. OpenShift : https://openshift.redhat.com/ // Submitted by Tim Kramer 2012-10-24 rhcloud.com @@ -11136,6 +11295,22 @@ sinaapp.com vipsinaapp.com 1kapp.com +// Synology, Inc. : https://www.synology.com/ +// Submitted by Rony Weng 2015-12-02 +diskstation.me +dscloud.biz +dscloud.me +dscloud.mobi +dsmynas.com +dsmynas.net +dsmynas.org +familyds.com +familyds.net +familyds.org +i234.me +myds.me +synology.me + // TASK geographical domains (www.task.gda.pl/uslugi/dns) gda.pl gdansk.pl commit 1b7e681292c39649663759ad3d30965c2130794c Author: Glenn Morris Date: Tue Jan 12 20:49:34 2016 -0500 Fix some declarations. * lisp/descr-text.el (internal-char-font): * lisp/cedet/mode-local.el (xref-item-location): * lisp/gnus/mml-smime.el (epg-key-sub-key-list) (epg-sub-key-capability, epg-sub-key-validity): * lisp/international/mule-util.el (internal-char-font): Fix declarations. diff --git a/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el index 30320b0..ce36748 100644 --- a/lisp/cedet/mode-local.el +++ b/lisp/cedet/mode-local.el @@ -670,7 +670,7 @@ SYMBOL is a function that can be overridden." (add-hook 'help-fns-describe-function-functions 'describe-mode-local-overload) -(declare-function xref-item-location "xref" (xref)) +(declare-function xref-item-location "xref" (xref) t) (defun xref-mode-local--override-present (sym xrefs) "Return non-nil if SYM is in XREFS." diff --git a/lisp/descr-text.el b/lisp/descr-text.el index dcc697e..a352ed0 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el @@ -322,7 +322,7 @@ This function is semi-obsolete. Use `get-char-code-property'." (nth 13 fields) 16))))))))))) ;; Not defined on builds without X, but behind display-graphic-p. -(declare-function internal-char-font "fontset.c" (position &optional ch)) +(declare-function internal-char-font "font.c" (position &optional ch)) ;; Return information about how CHAR is displayed at the buffer ;; position POS. If the selected frame is on a graphic display, diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el index a40595e..2d8f25c 100644 --- a/lisp/gnus/mml-smime.el +++ b/lisp/gnus/mml-smime.el @@ -350,9 +350,9 @@ Whether the passphrase is cached at all is controlled by (autoload 'epg-expand-group "epg-config") (autoload 'epa-select-keys "epa")) -(declare-function epg-key-sub-key-list "ext:epg" (key)) -(declare-function epg-sub-key-capability "ext:epg" (sub-key)) -(declare-function epg-sub-key-validity "ext:epg" (sub-key)) +(declare-function epg-key-sub-key-list "epg" (key) t) +(declare-function epg-sub-key-capability "epg" (sub-key) t) +(declare-function epg-sub-key-validity "epg" (sub-key) t) (autoload 'mml-compute-boundary "mml") diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el index 24ad342..ae58f1e 100644 --- a/lisp/international/mule-util.el +++ b/lisp/international/mule-util.el @@ -259,7 +259,7 @@ language environment LANG-ENV." (with-coding-priority coding-priority (detect-coding-region from to))))) -(declare-function internal-char-font "fontset.c" (position &optional ch)) +(declare-function internal-char-font "font.c" (position &optional ch)) ;;;###autoload (defun char-displayable-p (char) commit 30d465b0601fabf5400646a057cdc077d4866759 Author: Glenn Morris Date: Tue Jan 12 20:32:20 2016 -0500 Fix some custom types. * lisp/gnus/gnus-fun.el (gnus-x-face-omit-files, gnus-face-omit-files): * lisp/gnus/gnus.el (gnus-valid-select-methods): * lisp/mail/rmail.el (rmail-get-coding-function): * lisp/net/newst-treeview.el (newsticker-groups-filename): * lisp/progmodes/hideif.el (hide-ifdef-exclude-define-regexp): * lisp/textmodes/tildify.el (tildify-space-predicates): * lisp/url/url-tramp.el (url-tramp-protocols): Fix custom types. diff --git a/lisp/gnus/gnus-fun.el b/lisp/gnus/gnus-fun.el index fa78b5c..a6b2730 100644 --- a/lisp/gnus/gnus-fun.el +++ b/lisp/gnus/gnus-fun.el @@ -44,7 +44,7 @@ "Regexp to match faces in `gnus-x-face-directory' to be omitted." :version "25.1" :group 'gnus-fun - :type 'string) + :type '(choice (const nil) string)) (defcustom gnus-face-directory (expand-file-name "faces" gnus-directory) "*Directory where Face PNG files are stored." @@ -56,7 +56,7 @@ "Regexp to match faces in `gnus-face-directory' to be omitted." :version "25.1" :group 'gnus-fun - :type 'string) + :type '(choice (const nil) string)) (defcustom gnus-convert-pbm-to-x-face-command "pbmtoxbm %s | compface" "Command for converting a PBM to an X-Face." diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 1196ea9..5d2ce7e 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -1637,6 +1637,7 @@ this variable. I think." (const post-mail)) (checklist :inline t :greedy t (const :format "%v " address) + (const cloud) (const global) (const :format "%v " prompt-address) (const :format "%v " physical-address) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 9a03b05..390ca3f 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -692,8 +692,9 @@ Element N specifies the summary line for message N+1.") This is set to nil by default.") (defcustom rmail-get-coding-function nil - "Function of no args to try to determine coding system for a message." - :type 'function + "Function of no args to try to determine coding system for a message. +If nil, just search for `rmail-mime-charset-pattern'." + :type '(choice (const nil) function) :group 'rmail :version "24.4") diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el index 0e75236..4de3d1d 100644 --- a/lisp/net/newst-treeview.el +++ b/lisp/net/newst-treeview.el @@ -132,9 +132,9 @@ Example: (\"Topmost group\" \"feed1\" (\"subgroup1\" \"feed 2\") (defcustom newsticker-groups-filename nil - "Name of the newsticker groups settings file. This variable is obsolete." + "Name of the newsticker groups settings file." :version "25.1" ; changed default value to nil - :type 'string + :type '(choice (const nil) string) :group 'newsticker-treeview) (make-obsolete-variable 'newsticker-groups-filename 'newsticker-dir "23.1") diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el index 43cf42c..cc7d1c3 100644 --- a/lisp/progmodes/hideif.el +++ b/lisp/progmodes/hideif.el @@ -138,7 +138,7 @@ (defcustom hide-ifdef-exclude-define-regexp nil "Ignore #define names if those names match this exclusion pattern." - :type 'string + :type '(choice (const nil) string) :version "25.1") (defcustom hide-ifdef-expand-reinclusion-protection t diff --git a/lisp/textmodes/tildify.el b/lisp/textmodes/tildify.el index eb799c0..598060e 100644 --- a/lisp/textmodes/tildify.el +++ b/lisp/textmodes/tildify.el @@ -417,7 +417,7 @@ current `case-fold-search' setting." "A list of predicate functions for `tildify-space' function." :version "25.1" :group 'tildify - :type '(repeat 'function)) + :type '(repeat function)) (defcustom tildify-double-space-undos t "Weather `tildify-space' should undo hard space when space is typed again." diff --git a/lisp/url/url-tramp.el b/lisp/url/url-tramp.el index 9e19157..192a045 100644 --- a/lisp/url/url-tramp.el +++ b/lisp/url/url-tramp.el @@ -30,11 +30,11 @@ ;;;###autoload (defcustom url-tramp-protocols '("ftp" "ssh" "scp" "rsync" "telnet") - "List of URL protocols the work is handled by Tramp. + "List of URL protocols for which the work is handled by Tramp. They must also be covered by `url-handler-regexp'." :group 'url :version "25.1" - :type '(list string)) + :type '(repeat string)) (defun url-tramp-convert-url-to-tramp (url) "Convert URL to a Tramp file name." commit e85e0d5951bd4e6e69beec1301113f5f9b48f81d Author: Glenn Morris Date: Tue Jan 12 20:06:49 2016 -0500 Add some missing version tags. * lisp/electric.el (electric-quote-comment) (electric-quote-string, electric-quote-paragraph): * lisp/epg-config.el (epg-gpgconf-program): * lisp/rect.el (rectangle-preview): * lisp/emacs-lisp/check-declare.el (check-declare-ext-errors): * lisp/emacs-lisp/package.el (package-selected-packages) (package-hidden-regexps): * lisp/erc/erc.el (erc-network-hide-list, erc-channel-hide-list): * lisp/eshell/em-term.el (eshell-destroy-buffer-when-process-dies): * lisp/gnus/mml-sec.el (mml1991-signers, mml2015-signers) (mml-smime-signers, mml1991-encrypt-to-self, mml2015-encrypt-to-self) (mml-smime-encrypt-to-self, mml2015-sign-with-sender) (mml-smime-sign-with-sender, mml2015-always-trust) (mml-secure-fail-when-key-problem, mml-secure-key-preferences): * lisp/net/browse-url.el (browse-url-conkeror-new-window-is-buffer) (browse-url-conkeror-arguments): * lisp/net/newst-reader.el (newsticker-download-logos): * lisp/progmodes/gud.el (gud-guiler-command-name): * lisp/progmodes/prog-mode.el (prettify-symbols-unprettify-at-point): * lisp/progmodes/project.el (project-vc): * lisp/progmodes/python.el (python-indent-guess-indent-offset-verbose) (python-shell-remote-exec-path, python-shell-first-prompt-hook) (python-shell-completion-native-disabled-interpreters) (python-shell-completion-native-enable) (python-shell-completion-native-output-timeout) (python-shell-completion-native-try-output-timeout): * lisp/progmodes/xref.el (xref): * lisp/term/screen.el (xterm-screen-extra-capabilities): * lisp/term/xterm.el (xterm-max-cut-length): Add missing version tags. diff --git a/lisp/electric.el b/lisp/electric.el index abddd98..ab79943 100644 --- a/lisp/electric.el +++ b/lisp/electric.el @@ -417,14 +417,17 @@ The variable `electric-layout-rules' says when and how to insert newlines." (defcustom electric-quote-comment t "Non-nil means to use electric quoting in program comments." + :version "25.1" :type 'boolean :safe 'booleanp :group 'electricity) (defcustom electric-quote-string nil "Non-nil means to use electric quoting in program strings." + :version "25.1" :type 'boolean :safe 'booleanp :group 'electricity) (defcustom electric-quote-paragraph t "Non-nil means to use electric quoting in text paragraphs." + :version "25.1" :type 'boolean :safe 'booleanp :group 'electricity) (defun electric--insertable-p (string) diff --git a/lisp/emacs-lisp/check-declare.el b/lisp/emacs-lisp/check-declare.el index 513aa31..b6fa054 100644 --- a/lisp/emacs-lisp/check-declare.el +++ b/lisp/emacs-lisp/check-declare.el @@ -131,6 +131,7 @@ With optional argument FULL, sums the number of elements in each element." (defcustom check-declare-ext-errors nil "When non-nil, warn about functions not found in :ext." + :version "25.1" :type 'boolean) (defun check-declare-verify (fnfile fnlist) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index a06b7ef..fbc8be4 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -328,6 +328,7 @@ by running `package-install-selected-packages'. To check if a package is contained in this list here, use `package--user-selected-p', as it may populate the variable with a sane initial value." + :version "25.1" :type '(repeat symbol)) (defcustom package-menu-async t @@ -2653,6 +2654,7 @@ omitted from the package menu. To toggle this, type \\[package-menu-toggle-hidi Values can be interactively added to this list by typing \\[package-menu-hide-package] on a package" + :version "25.1" :type '(repeat (regexp :tag "Hide packages with name matching"))) (defun package-menu--refresh (&optional packages keywords) diff --git a/lisp/epg-config.el b/lisp/epg-config.el index 5fac079..e92bcd6 100644 --- a/lisp/epg-config.el +++ b/lisp/epg-config.el @@ -53,6 +53,7 @@ (defcustom epg-gpgconf-program "gpgconf" "The `gpgconf' executable." + :version "25.1" :group 'epg :type 'string) diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index aa3677c..3e96bb2 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -265,14 +265,16 @@ A typical value would be \(\"JOIN\" \"PART\" \"QUIT\")." (defcustom erc-network-hide-list nil "A list of IRC networks to hide message types from. A typical value would be \((\"freenode\" \"MODE\") -(\"OFTC\" \"JOIN\" \"QUIT\"))." + \(\"OFTC\" \"JOIN\" \"QUIT\"))." + :version "25.1" :group 'erc-ignore :type 'erc-message-type) (defcustom erc-channel-hide-list nil "A list of IRC channels to hide message types from. A typical value would be \((\"#emacs\" \"QUIT\" \"JOIN\") -(\"#erc\" \"NICK\")." + \(\"#erc\" \"NICK\")." + :version "25.1" :group 'erc-ignore :type 'erc-message-type) diff --git a/lisp/eshell/em-term.el b/lisp/eshell/em-term.el index aabc5fd..3e5de0c 100644 --- a/lisp/eshell/em-term.el +++ b/lisp/eshell/em-term.el @@ -136,6 +136,7 @@ character to the invoked process." "If non-nil, term buffers are destroyed after their processes die. WARNING: Setting this to non-nil may result in unexpected behavior for short-lived processes, see bug#18108." + :version "25.1" :type 'boolean :group 'eshell-term) diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el index 0a5f472..48e6384 100644 --- a/lisp/gnus/mml-sec.el +++ b/lisp/gnus/mml-sec.el @@ -432,15 +432,18 @@ If called with a prefix argument, only encrypt (do NOT sign)." ;;; Common functionality for mml1991.el, mml2015.el, mml-smime.el -(define-obsolete-variable-alias 'mml1991-signers 'mml-secure-openpgp-signers) -(define-obsolete-variable-alias 'mml2015-signers 'mml-secure-openpgp-signers) +(define-obsolete-variable-alias 'mml1991-signers 'mml-secure-openpgp-signers + "25.1") +(define-obsolete-variable-alias 'mml2015-signers 'mml-secure-openpgp-signers + "25.1") (defcustom mml-secure-openpgp-signers nil "A list of your own key ID(s) which will be used to sign OpenPGP messages. If set, it is added to the setting of `mml-secure-openpgp-sign-with-sender'." :group 'mime-security :type '(repeat (string :tag "Key ID"))) -(define-obsolete-variable-alias 'mml-smime-signers 'mml-secure-smime-signers) +(define-obsolete-variable-alias 'mml-smime-signers 'mml-secure-smime-signers + "25.1") (defcustom mml-secure-smime-signers nil "A list of your own key ID(s) which will be used to sign S/MIME messages. If set, it is added to the setting of `mml-secure-smime-sign-with-sender'." @@ -448,9 +451,9 @@ If set, it is added to the setting of `mml-secure-smime-sign-with-sender'." :type '(repeat (string :tag "Key ID"))) (define-obsolete-variable-alias - 'mml1991-encrypt-to-self 'mml-secure-openpgp-encrypt-to-self) + 'mml1991-encrypt-to-self 'mml-secure-openpgp-encrypt-to-self "25.1") (define-obsolete-variable-alias - 'mml2015-encrypt-to-self 'mml-secure-openpgp-encrypt-to-self) + 'mml2015-encrypt-to-self 'mml-secure-openpgp-encrypt-to-self "25.1") (defcustom mml-secure-openpgp-encrypt-to-self nil "List of own key ID(s) or t; determines additional recipients with OpenPGP. If t, also encrypt to key for message sender; if list, encrypt to those keys. @@ -469,7 +472,7 @@ https://debbugs.gnu.org/cgi/bugreport.cgi?bug=18718" (repeat (string :tag "Key ID")))) (define-obsolete-variable-alias - 'mml-smime-encrypt-to-self 'mml-secure-smime-encrypt-to-self) + 'mml-smime-encrypt-to-self 'mml-secure-smime-encrypt-to-self "25.1") (defcustom mml-secure-smime-encrypt-to-self nil "List of own key ID(s) or t; determines additional recipients with S/MIME. If t, also encrypt to key for message sender; if list, encrypt to those keys. @@ -488,7 +491,7 @@ https://debbugs.gnu.org/cgi/bugreport.cgi?bug=18718" (repeat (string :tag "Key ID")))) (define-obsolete-variable-alias - 'mml2015-sign-with-sender 'mml-secure-openpgp-sign-with-sender) + 'mml2015-sign-with-sender 'mml-secure-openpgp-sign-with-sender "25.1") ;mml1991-sign-with-sender did never exist. (defcustom mml-secure-openpgp-sign-with-sender nil "If t, use message sender to find an OpenPGP key to sign with." @@ -496,14 +499,14 @@ https://debbugs.gnu.org/cgi/bugreport.cgi?bug=18718" :type 'boolean) (define-obsolete-variable-alias - 'mml-smime-sign-with-sender 'mml-secure-smime-sign-with-sender) + 'mml-smime-sign-with-sender 'mml-secure-smime-sign-with-sender "25.1") (defcustom mml-secure-smime-sign-with-sender nil "If t, use message sender to find an S/MIME key to sign with." :group 'mime-security :type 'boolean) (define-obsolete-variable-alias - 'mml2015-always-trust 'mml-secure-openpgp-always-trust) + 'mml2015-always-trust 'mml-secure-openpgp-always-trust "25.1") ;mml1991-always-trust did never exist. (defcustom mml-secure-openpgp-always-trust t "If t, skip key validation of GnuPG on encryption." @@ -513,6 +516,7 @@ https://debbugs.gnu.org/cgi/bugreport.cgi?bug=18718" (defcustom mml-secure-fail-when-key-problem nil "If t, raise an error if some key is missing or several keys exist. Otherwise, ask the user." + :version "25.1" :group 'mime-security :type 'boolean) @@ -523,6 +527,7 @@ This variable is only relevant if a recipient owns multiple key pairs (for encryption) or you own multiple key pairs (for signing). In such cases, you will be asked which key(s) should be used, and your choice can be customized in this variable." + :version "25.1" :group 'mime-security :type '(alist :key-type (symbol :tag "Protocol") :value-type (alist :key-type (symbol :tag "Usage") :value-type diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 26fa0d9..2bda97f 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -349,6 +349,7 @@ functionality is not available there." "Whether to open up new windows in a buffer or a new window. If non-nil, then open the URL in a new buffer rather than a new window if `browse-url-conkeror' is asked to open it in a new window." + :version "25.1" :type 'boolean :group 'browse-url) @@ -415,6 +416,7 @@ commands reverses the effect of this variable." (defcustom browse-url-conkeror-arguments nil "A list of strings to pass to Conkeror as arguments." + :version "25.1" :type '(repeat (string :tag "Argument")) :group 'browse-url) diff --git a/lisp/net/newst-reader.el b/lisp/net/newst-reader.el index 1647ef8..9c29216 100644 --- a/lisp/net/newst-reader.el +++ b/lisp/net/newst-reader.el @@ -69,6 +69,7 @@ This must be one of the functions `newsticker-plainview' or (defcustom newsticker-download-logos t "If non-nil newsticker downloads logo images of subscribed feeds." + :version "25.1" :type 'boolean :group 'newsticker-reader) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index c22de2f..1a0385e 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -1742,6 +1742,7 @@ and source-file directory for your debugger." (defcustom gud-guiler-command-name "guile" "File name for executing the Guile debugger. This should be an executable on your path, or an absolute file name." + :version "25.1" :type 'string :group 'gud) diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el index 2f12df4..718b339 100644 --- a/lisp/progmodes/prog-mode.el +++ b/lisp/progmodes/prog-mode.el @@ -202,6 +202,7 @@ is immediately after the symbol. The prettification will be reapplied as soon as point moves away from the symbol. If set to nil, the prettification persists even when point is on the symbol." + :version "25.1" :type '(choice (const :tag "Never unprettify" nil) (const :tag "Unprettify when point is inside" t) (const :tag "Unprettify when point is inside or at right edge" right-edge)) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index fe28ed7..a972def 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -156,10 +156,11 @@ end it with `/'. DIR must be one of `project-roots' or (defgroup project-vc nil "Project implementation using the VC package." + :version "25.1" :group 'tools) (defcustom project-vc-ignores nil - "List ot patterns to include in `project-ignores'." + "List of patterns to include in `project-ignores'." :type '(repeat string) :safe 'listp) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 4984c99..fd70046 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -715,6 +715,7 @@ It makes underscores and dots word constituent chars.") (defcustom python-indent-guess-indent-offset-verbose t "Non-nil means to emit a warning when indentation guessing fails." + :version "25.1" :type 'boolean :group 'python :safe' booleanp) @@ -1999,6 +2000,7 @@ hosts PATH before starting processes. Values defined in here. Normally you wont use this variable directly unless you plan to ensure a particular set of paths to all Python shell executed through tramp connections." + :version "25.1" :type '(repeat string) :group 'python) @@ -2621,6 +2623,7 @@ current process to not hang waiting for output by safeguarding interactive actions can be performed. This is useful to safely attach setup code for long-running processes that eventually provide a shell." + :version "25.1" :type 'hook :group 'python) @@ -3258,18 +3261,22 @@ the full statement in the case of imports." (list "pypy") "List of disabled interpreters. When a match is found, native completion is disabled." + :version "25.1" :type '(repeat string)) (defcustom python-shell-completion-native-enable t "Enable readline based native completion." + :version "25.1" :type 'boolean) (defcustom python-shell-completion-native-output-timeout 5.0 "Time in seconds to wait for completion output before giving up." + :version "25.1" :type 'float) (defcustom python-shell-completion-native-try-output-timeout 1.0 "Time in seconds to wait for *trying* native completion output." + :version "25.1" :type 'float) (defvar python-shell-completion-native-redirect-buffer diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index fe39122..6220b4c 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -76,6 +76,7 @@ (require 'semantic/symref)) ;; for hit-lines slot (defgroup xref nil "Cross-referencing commands" + :version "25.1" :group 'tools) diff --git a/lisp/rect.el b/lisp/rect.el index 789d0e9..73790f2 100644 --- a/lisp/rect.el +++ b/lisp/rect.el @@ -403,6 +403,7 @@ With a prefix (or a FILL) argument, also fill too short lines." (defcustom rectangle-preview t "If non-nil, `string-rectangle' will show an-the-fly preview." + :version "25.1" :type 'boolean) (defun rectangle--string-preview () diff --git a/lisp/term/screen.el b/lisp/term/screen.el index 704fbef..7f68115 100644 --- a/lisp/term/screen.el +++ b/lisp/term/screen.el @@ -7,6 +7,7 @@ "Extra capabilities supported under \"screen\". Some features of screen depend on the terminal emulator in which it runs, which can change when the screen session is moved to another tty." + :version "25.1" :type xterm--extra-capabilities-type :group 'xterm) diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 104f983..e06423c 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el @@ -65,6 +65,7 @@ using the OSC 52 sequence. If you select a region larger than this size, it won't be copied to your system clipboard. Since clipboard data is base 64 encoded, the actual number of string bytes that can be copied is 3/4 of this value." + :version "25.1" :type 'integer) (defconst xterm-paste-ending-sequence "\e[201~" commit 0ae1a144a83cbfe8bba1abb295ece69c4dcff5f7 Author: Glenn Morris Date: Tue Jan 12 20:04:49 2016 -0500 * test/automated/core-elisp-tests.el (core-elisp-tests-1-defvar-in-let): Add a custom type. diff --git a/test/automated/core-elisp-tests.el b/test/automated/core-elisp-tests.el index 7698533..b44bb37 100644 --- a/test/automated/core-elisp-tests.el +++ b/test/automated/core-elisp-tests.el @@ -32,7 +32,7 @@ (should (equal (list (let ((c-e-x 1)) (defvar c-e-x 2) c-e-x) c-e-x) '(1 2))) (should (equal (list (let ((c-e-x 1)) - (defcustom c-e-x 2 "doc" :group 'blah) c-e-x) + (defcustom c-e-x 2 "doc" :group 'blah :type 'integer) c-e-x) c-e-x) '(1 2))))) commit 0d7bdee57737ea4e51c45cd0ae68656f03010b4a Author: Glenn Morris Date: Tue Jan 12 20:03:02 2016 -0500 ; ChangeLog fix diff --git a/ChangeLog.2 b/ChangeLog.2 index 6988f96..7a63a95 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -13903,10 +13903,10 @@ 2015-05-21 kwhite * lisp/erc/erc.el: Hide network/channel messages. - (erc-network-hide-list, etc-channel-hide-list): New lists to define + (erc-network-hide-list, erc-channel-hide-list): New lists to define message types per network/channel. (erc-add-targets): New function to parse list of targets. - (erc-hide-current-message-p): Modified to check for new targets. + (erc-hide-current-message-p): Modify to check for new targets. 2015-05-21 Paul Eggert commit 2fac775a402b859b1d0bcc7683129ba7c6c13673 Author: Glenn Morris Date: Tue Jan 12 19:01:12 2016 -0500 * src/buffer.c (syms_of_buffer) : Doc fix. Remove comments that do not apply since 2005-08-09. (Bug#22349) diff --git a/src/buffer.c b/src/buffer.c index 3f93716..b02135c 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5630,13 +5630,7 @@ Decimal digits after the % specify field width to which to pad. */); doc: /* Symbol for current buffer's major mode. The default value (normally `fundamental-mode') affects new buffers. A value of nil means to use the current buffer's major mode, provided -it is not marked as "special". - -When a mode is used by default, `find-file' switches to it before it -reads the contents into the buffer and before it finishes setting up -the buffer. Thus, the mode and its hooks should not expect certain -variables such as `buffer-read-only' and `buffer-file-coding-system' -to be set up. */); +it is not marked as "special". */); DEFVAR_PER_BUFFER ("mode-name", &BVAR (current_buffer, mode_name), Qnil, commit 0ed0a9b7f09495394dc9b60a9f7c937679c49afe Author: Paul Eggert Date: Tue Jan 12 13:04:17 2016 -0800 Merge from gnulib This mostly just changes "UTC" to "UTC0" for POSIX conformance. It also updates to the latest version of texinfo.tex. * build-aux/gitlog-to-changelog, build-aux/move-if-change: * build-aux/update-copyright, doc/misc/texinfo.tex: Update from gnulib. diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog index e25d48e..a426504 100755 --- a/build-aux/gitlog-to-changelog +++ b/build-aux/gitlog-to-changelog @@ -3,7 +3,7 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' if 0; # Convert git log output to ChangeLog format. -my $VERSION = '2015-06-11 01:03'; # UTC +my $VERSION = '2016-01-11 22:04'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook @@ -487,6 +487,6 @@ sub git_dir_option($) # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "my $VERSION = '" # time-stamp-format: "%:y-%02m-%02d %02H:%02M" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "'; # UTC" # End: diff --git a/build-aux/move-if-change b/build-aux/move-if-change index cd744a9..e3fe71d 100755 --- a/build-aux/move-if-change +++ b/build-aux/move-if-change @@ -2,7 +2,7 @@ # Like mv $1 $2, but if the files are the same, just delete $1. # Status is zero if successful, nonzero otherwise. -VERSION='2012-01-06 07:23'; # UTC +VERSION='2016-01-11 22:04'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook @@ -78,6 +78,6 @@ fi ## eval: (add-hook 'write-file-hooks 'time-stamp) ## time-stamp-start: "VERSION='" ## time-stamp-format: "%:y-%02m-%02d %02H:%02M" -## time-stamp-time-zone: "UTC" +## time-stamp-time-zone: "UTC0" ## time-stamp-end: "'; # UTC" ## End: diff --git a/build-aux/update-copyright b/build-aux/update-copyright index 40f7b98..8c6ee1f 100755 --- a/build-aux/update-copyright +++ b/build-aux/update-copyright @@ -3,7 +3,7 @@ eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" ${1+"$@"}' if 0; # Update an FSF copyright year list to include the current year. -my $VERSION = '2015-01-15.20:53'; # UTC +my $VERSION = '2016-01-11.22:04'; # UTC # Copyright (C) 2009-2016 Free Software Foundation, Inc. # @@ -269,6 +269,6 @@ else # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "my $VERSION = '" # time-stamp-format: "%:y-%02m-%02d.%02H:%02M" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "'; # UTC" # End: diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index f140bba..936c32d 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex @@ -3,11 +3,11 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2015-12-20.12} +\def\texinfoversion{2016-01-11.19} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 +% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 % Free Software Foundation, Inc. % % This texinfo.tex file is free software: you can redistribute it and/or @@ -9428,6 +9428,45 @@ directory should work if nowhere else does.} \global\righthyphenmin = #3\relax } +% Get input by bytes instead of by UTF-8 codepoints for XeTeX and LuaTeX, +% otherwise the encoding support is completely broken. +\ifx\XeTeXrevision\thisisundefined +\else +\XeTeXdefaultencoding "bytes" % For subsequent files to be read +\XeTeXinputencoding "bytes" % Effective in texinfo.tex only +% Unfortunately, there seems to be no corresponding XeTeX command for +% output encoding. This is a problem for auxiliary index and TOC files. +% The only solution would be perhaps to write out @U{...} sequences in +% place of UTF-8 characters. +\fi + +\ifx\luatexversion\thisisundefined +\else +\directlua{ +local utf8_char, byte, gsub = unicode.utf8.char, string.byte, string.gsub +local function convert_char (char) + return utf8_char(byte(char)) +end + +local function convert_line (line) + return gsub(line, ".", convert_char) +end + +callback.register("process_input_buffer", convert_line) + +local function convert_line_out (line) + local line_out = "" + for c in string.utfvalues(line) do + line_out = line_out .. string.char(c) + end + return line_out +end + +callback.register("process_output_buffer", convert_line_out) +} +\fi + + % Helpers for encodings. % Set the catcode of characters 128 through 255 to the specified number. % @@ -9452,6 +9491,14 @@ directory should work if nowhere else does.} % \def\documentencoding{\parseargusing\filenamecatcodes\documentencodingzzz} \def\documentencodingzzz#1{% + % Get input by bytes instead of by UTF-8 codepoints for XeTeX, + % otherwise the encoding support is completely broken. + % This settings is for the document root file. + \ifx\XeTeXrevision\thisisundefined + \else + \XeTeXinputencoding "bytes" + \fi + % % Encoding being declared for the document. \def\declaredencoding{\csname #1.enc\endcsname}% % @@ -11004,9 +11051,20 @@ directory should work if nowhere else does.} {@catcode`@^=7 @catcode`@^^M=13% @gdef@eatinput input texinfo#1^^M{@fixbackslash}} +% Emergency active definition of newline, in case an active newline token +% appears by mistake. +{@catcode`@^=7 @catcode13=13% +@gdef@enableemergencynewline{% + @gdef^^M{% + @par% + %@par% +}}} + + @gdef@fixbackslash{% @ifx\@eatinput @let\ = @ttbackslash @fi @catcode13=5 % regular end of line + @enableemergencynewline @let@c=@texinfoc % Also turn back on active characters that might appear in the input % file name, in case not using a pre-dumped format. commit c3528f1e20db17b66eed5127905222a4a26a05fd Author: Eli Zaretskii Date: Tue Jan 12 21:29:28 2016 +0200 Update documentation of 'process-running-child-p' * doc/lispref/processes.texi (Input to Processes): Document the changes in return value of 'process-running-child-p'. diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 2a4bd8a..f660b15 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -1138,10 +1138,12 @@ The function returns @var{process}. @end defun @defun process-running-child-p &optional process -This function will tell you whether a @var{process} has given control of -its terminal to its own child process. The value is @code{t} if this is -true, or if Emacs cannot tell; it is @code{nil} if Emacs can be certain -that this is not so. +This function will tell you whether a @var{process} has given control +of its terminal to its own child process. If this is true, the +function returns the numeric ID of the foreground process group of +@var{process}; it returns @code{nil} if Emacs can be certain that this +is not so. The value is @code{t} if Emacs cannot tell whether this is +true. @end defun @node Signals to Processes diff --git a/etc/NEWS b/etc/NEWS index 6d47443..6323b24 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1242,9 +1242,11 @@ active region handling. +++ ** deactivate-mark is now buffer-local. ++++ ** `cl-the' now asserts that its argument is of the given type. -** `process-running-child-p` may now return a numeric process ++++ +** `process-running-child-p' may now return a numeric process group ID instead of `t'. +++ commit a71783bd6c63b5d6a169ce28902da5185e294f30 Author: Eli Zaretskii Date: Tue Jan 12 21:21:12 2016 +0200 Update documentation of 'deactivate-mark'. * doc/lispref/markers.texi (The Mark): Document that 'deactivate-mark' is now buffer-local when set. diff --git a/doc/lispref/markers.texi b/doc/lispref/markers.texi index bf18543..1c90466 100644 --- a/doc/lispref/markers.texi +++ b/doc/lispref/markers.texi @@ -576,7 +576,7 @@ If an editor command sets this variable non-@code{nil}, then the editor command loop deactivates the mark after the command returns (if Transient Mark mode is enabled). All the primitives that change the buffer set @code{deactivate-mark}, to deactivate the mark when the -command is finished. +command is finished. Setting this variable makes it buffer-local. To write Lisp code that modifies the buffer without causing deactivation of the mark at the end of the command, bind diff --git a/etc/NEWS b/etc/NEWS index 34c489a..6d47443 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1232,11 +1232,14 @@ If you want the old behavior of calling the function in the buffer from which the minibuffer was entered, use the new argument `switch-buffer' to `completion-table-dynamic'. +--- ** window-configurations no longer record the buffers' marks. +--- ** inhibit-modification-hooks now also inhibits lock-file checks, as well as active region handling. ++++ ** deactivate-mark is now buffer-local. ** `cl-the' now asserts that its argument is of the given type. commit bba8c532fa025a3efffdcccd40bfe66a4e9effd2 Author: Eli Zaretskii Date: Tue Jan 12 21:10:09 2016 +0200 Update documentation of 'completion-table-dynamic' * doc/lispref/minibuf.texi (Programmed Completion): Document the new optional argument to 'completion-table-dynamic'. diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index ead4fe9..e24d2cd 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -1818,13 +1818,19 @@ emacs, The GNU Emacs Manual}. Its argument list and return value are the same as for @code{display-sort-function}. @end table -@defun completion-table-dynamic function +@defun completion-table-dynamic function &optional switch-buffer This function is a convenient way to write a function that can act as a programmed completion function. The argument @var{function} should be a function that takes one argument, a string, and returns an alist of -possible completions of it. You can think of +possible completions of it. It is allowed to ignore the argument and +return a full list of all possible completions. You can think of @code{completion-table-dynamic} as a transducer between that interface and the interface for programmed completion functions. + +If the optional argument @var{switch-buffer} is non-@code{nil}, and +completion is performed in the minibuffer, @var{function} will be +called with current buffer set to the buffer from which the minibuffer +was entered. @end defun @defun completion-table-with-cache function &optional ignore-case diff --git a/etc/NEWS b/etc/NEWS index 029e9d8..34c489a 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1225,10 +1225,12 @@ Use `save-mark-and-excursion' if you want the old behavior. ** `read-buffer' and `read-buffer-function' can now be called with a 4th argument (`predicate'). -** completion-table-dynamic stays in the minibuffer. ++++ +** `completion-table-dynamic' by default stays in the minibuffer. +The minibuffer will be the current buffer when the function is called. If you want the old behavior of calling the function in the buffer -from which the minibuffer was entered, call it with the new argument -`switch-buffer'. +from which the minibuffer was entered, use the new argument +`switch-buffer' to `completion-table-dynamic'. ** window-configurations no longer record the buffers' marks. commit e879070d8c329e4e7ccbd6687ef577589faedcf1 Author: Eli Zaretskii Date: Tue Jan 12 21:00:19 2016 +0200 Document changes in 'read-buffer' and 'read-buffer-function' * doc/lispref/minibuf.texi (High-Level Completion): Document the 4th argument to 'read-buffer' and 'read-buffer-function'. diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index bf95646..ead4fe9 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -1236,14 +1236,14 @@ Lisp function. When possible, do all minibuffer input as part of reading the arguments for a command, in the @code{interactive} specification. @xref{Defining Commands}. -@defun read-buffer prompt &optional default require-match +@defun read-buffer prompt &optional default require-match predicate This function reads the name of a buffer and returns it as a string. -The argument @var{default} is the default name to use, the value to -return if the user exits with an empty minibuffer. If non-@code{nil}, -it should be a string, a list of strings, or a buffer. If it is -a list, the default value is the first element of this list. It is -mentioned in the prompt, but is not inserted in the minibuffer as -initial input. +It prompts with @var{prompt}. The argument @var{default} is the +default name to use, the value to return if the user exits with an +empty minibuffer. If non-@code{nil}, it should be a string, a list of +strings, or a buffer. If it is a list, the default value is the first +element of this list. It is mentioned in the prompt, but is not +inserted in the minibuffer as initial input. The argument @var{prompt} should be a string ending with a colon and a space. If @var{default} is non-@code{nil}, the function inserts it in @@ -1253,6 +1253,12 @@ the minibuffer with a default value (@pxref{Programming Tips}). The optional argument @var{require-match} has the same meaning as in @code{completing-read}. @xref{Minibuffer Completion}. +The optional argument @var{predicate}, if non-@code{nil}, specifies a +function to filter the buffers that should be considered: the function +will be called with every potential candidate as its argument, and +should return @code{nil} to reject the candidate, non-@code{nil} to +accept it. + In the following example, the user enters @samp{minibuffer.t}, and then types @key{RET}. The argument @var{require-match} is @code{t}, and the only buffer name starting with the given input is @@ -1287,7 +1293,7 @@ its usual work, with the same arguments passed to @code{read-buffer}. @defopt read-buffer-completion-ignore-case If this variable is non-@code{nil}, @code{read-buffer} ignores case -when performing completion. +when performing completion while reading the buffer name. @end defopt @defun read-command prompt &optional default diff --git a/etc/NEWS b/etc/NEWS index 9c416ae..029e9d8 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1221,7 +1221,9 @@ Use the INSIDE_EMACS environment variable instead. ** `save-excursion' does not save&restore the mark any more. Use `save-mark-and-excursion' if you want the old behavior. -** read-buffer-function can now be called with a 4th argument (`predicate'). ++++ +** `read-buffer' and `read-buffer-function' can now be called with a 4th +argument (`predicate'). ** completion-table-dynamic stays in the minibuffer. If you want the old behavior of calling the function in the buffer commit 792d469d698966e99435d60b4c2136302a171ded Author: Eli Zaretskii Date: Tue Jan 12 20:46:56 2016 +0200 ; * etc/NEWS: Mark a couple of entries that are already documented. diff --git a/etc/NEWS b/etc/NEWS index 10fcb7e..9c416ae 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1213,10 +1213,13 @@ symbol-function was changed not to signal `void-function' any more. +++ *** As a consequence, the second arg of `indirect-function' is now obsolete. ++++ ** Comint, term, and compile do not set the EMACS env var any more. Use the INSIDE_EMACS environment variable instead. ++++ ** `save-excursion' does not save&restore the mark any more. +Use `save-mark-and-excursion' if you want the old behavior. ** read-buffer-function can now be called with a 4th argument (`predicate'). commit fe6efddcc1f4dd2e18737f98c45ead8bbbc7a969 Author: Paul Eggert Date: Tue Jan 12 09:09:27 2016 -0800 Fix time-stamp-time-zone bugs introduced in July This fixes a bug introduced when the July changes to format-time-string installed, as the changes were not correctly handled in this module (Bug#22302). Also, document time stamp time zones. * lisp/time-stamp.el (time-stamp-time-zone): Document values better. (time-stamp--format): New private function. (time-stamp-string, time-stamp-string-preprocess) (time-stamp-do-number): Use it. * doc/emacs/files.texi (Time Stamps): Mention time zones. * doc/misc/autotype.texi (Timestamps): Document time-stamp-time-zone. diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index bfa55d3..3d5562d 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -881,9 +881,10 @@ Time-stamp: " " @code{before-save-hook} (@pxref{Hooks}). When you save the file, this function then automatically updates the time stamp with the current date and time. You can also use the command @kbd{M-x time-stamp} to -update the time stamp manually. For other customizations, see the -Custom group @code{time-stamp}. Note that the time stamp is formatted -according to your locale setting (@pxref{Environment}). +update the time stamp manually. By default the time stamp is +formatted according to your locale setting (@pxref{Environment}) and +time zone (@pxref{Time of Day,,, elisp, The Emacs Lisp Reference +Manual}). For customizations, see the Custom group @code{time-stamp}. @node Reverting @section Reverting a Buffer diff --git a/doc/misc/autotype.texi b/doc/misc/autotype.texi index 839782a..6bdbd34 100644 --- a/doc/misc/autotype.texi +++ b/doc/misc/autotype.texi @@ -531,15 +531,17 @@ then @code{time-stamp} is conveniently listed as an option in the customization buffer. @vindex time-stamp-active +@findex time-stamp-toggle-active @vindex time-stamp-format -@vindex time-stamp-start +@vindex time-stamp-time-zone The time stamp is updated only if the customizable variable @code{time-stamp-active} is on, which it is by default; the command @code{time-stamp-toggle-active} can be used to toggle it. The format of -the time stamp is set by the customizable variable -@code{time-stamp-format}. +the time stamp is set by the customizable variables +@code{time-stamp-format} and @code{time-stamp-time-zone}. @vindex time-stamp-line-limit +@vindex time-stamp-start @vindex time-stamp-end @vindex time-stamp-count @vindex time-stamp-inserts-lines diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el index 46c993e..dffd590 100644 --- a/lisp/time-stamp.el +++ b/lisp/time-stamp.el @@ -121,9 +121,12 @@ If nil, no notification is given." :group 'time-stamp) (defcustom time-stamp-time-zone nil - "If non-nil, a string naming the timezone to be used by \\[time-stamp]. -Format is the same as that used by the environment variable TZ on your system." - :type '(choice (const nil) string) + "The time zone to be used by \\[time-stamp]. +Its format is that of the ZONE argument of the `format-time-string' function," + :type '(choice (const :tag "Emacs local time" nil) + (const :tag "Universal Time" t) + (const :tag "system wall clock time" wall) + (string :tag "TZ environment variable value")) :group 'time-stamp :version "20.1") ;;;###autoload(put 'time-stamp-time-zone 'safe-local-variable 'string-or-null-p) @@ -412,6 +415,8 @@ With ARG, turn time stamping on if and only if arg is positive." (> (prefix-numeric-value arg) 0))) (message "time-stamp is now %s." (if time-stamp-active "active" "off"))) +(defun time-stamp--format (format time) + (format-time-string format time time-stamp-time-zone)) (defun time-stamp-string (&optional ts-format) "Generate the new string to be inserted by \\[time-stamp]. @@ -420,8 +425,7 @@ format the string." (or ts-format (setq ts-format time-stamp-format)) (if (stringp ts-format) - (format-time-string (time-stamp-string-preprocess ts-format) - nil time-stamp-time-zone) + (time-stamp--format (time-stamp-string-preprocess ts-format) nil) ;; handle version 1 compatibility (cond ((or (eq time-stamp-old-format-warn 'error) (and (eq time-stamp-old-format-warn 'ask) @@ -515,32 +519,32 @@ and all `time-stamp-format' compatibility." "%%") ((eq cur-char ?a) ;day of week (if change-case - (format-time-string "%#a" time) + (time-stamp--format "%#a" time) (or alt-form (not (string-equal field-width "")) (time-stamp-conv-warn "%a" "%:a")) (if (and alt-form (not (string-equal field-width ""))) "" ;discourage "%:3a" - (format-time-string "%A" time)))) + (time-stamp--format "%A" time)))) ((eq cur-char ?A) (if alt-form - (format-time-string "%A" time) + (time-stamp--format "%A" time) (or change-case (not (string-equal field-width "")) (time-stamp-conv-warn "%A" "%#A")) - (format-time-string "%#A" time))) + (time-stamp--format "%#A" time))) ((eq cur-char ?b) ;month name (if change-case - (format-time-string "%#b" time) + (time-stamp--format "%#b" time) (or alt-form (not (string-equal field-width "")) (time-stamp-conv-warn "%b" "%:b")) (if (and alt-form (not (string-equal field-width ""))) "" ;discourage "%:3b" - (format-time-string "%B" time)))) + (time-stamp--format "%B" time)))) ((eq cur-char ?B) (if alt-form - (format-time-string "%B" time) + (time-stamp--format "%B" time) (or change-case (not (string-equal field-width "")) (time-stamp-conv-warn "%B" "%#B")) - (format-time-string "%#B" time))) + (time-stamp--format "%#B" time))) ((eq cur-char ?d) ;day of month, 1-31 (time-stamp-do-number cur-char alt-form field-width time)) ((eq cur-char ?H) ;hour, 0-23 @@ -554,27 +558,27 @@ and all `time-stamp-format' compatibility." ((eq cur-char ?p) ;am or pm (or change-case (time-stamp-conv-warn "%p" "%#p")) - (format-time-string "%#p" time)) + (time-stamp--format "%#p" time)) ((eq cur-char ?P) ;AM or PM - (format-time-string "%p" time)) + (time-stamp--format "%p" time)) ((eq cur-char ?S) ;seconds, 00-60 (time-stamp-do-number cur-char alt-form field-width time)) ((eq cur-char ?w) ;weekday number, Sunday is 0 - (format-time-string "%w" time)) + (time-stamp--format "%w" time)) ((eq cur-char ?y) ;year (or alt-form (not (string-equal field-width "")) (time-stamp-conv-warn "%y" "%:y")) - (string-to-number (format-time-string "%Y" time))) + (string-to-number (time-stamp--format "%Y" time))) ((eq cur-char ?Y) ;4-digit year, new style - (string-to-number (format-time-string "%Y" time))) + (string-to-number (time-stamp--format "%Y" time))) ((eq cur-char ?z) ;time zone lower case (if change-case "" ;discourage %z variations - (format-time-string "%#Z" time))) + (time-stamp--format "%#Z" time))) ((eq cur-char ?Z) (if change-case - (format-time-string "%#Z" time) - (format-time-string "%Z" time))) + (time-stamp--format "%#Z" time) + (time-stamp--format "%Z" time))) ((eq cur-char ?f) ;buffer-file-name, base name only (if buffer-file-name (file-name-nondirectory buffer-file-name) @@ -634,7 +638,7 @@ width specification or \"\". TIME is the time to convert." (format "%%:%c" format-char))) (if (and alt-form (not (string-equal field-width ""))) "" ;discourage "%:2d" and the like - (string-to-number (format-time-string format-string time))))) + (string-to-number (time-stamp--format format-string time))))) (defvar time-stamp-conversion-warn t "Warn about soon-to-be-unsupported forms in `time-stamp-format'. commit 58a622d473112f8ff5b4bdb3e49bc6573dfd3404 Author: Eli Zaretskii Date: Tue Jan 12 18:41:58 2016 +0200 Make piping to subprocesses more robust on MS-Windows * src/w32.c (sys_write): Don't write to a pipe more stuff than its buffer can hold. Don't return -1 if something has been written to the pipe. Zero out 'errno' before calling '_write', to avoid returning a stale value. (Bug#22344) * src/w32proc.c (syms_of_ntproc) : New variable. * src/w32.c (pipe2): Use it to request a user-defined size for the pipe being created. * etc/NEWS: Mention 'w32-pipe-buffer-size'. * doc/emacs/msdos.texi (Windows Processes): Document 'w32-pipe-buffer-size'. diff --git a/doc/emacs/msdos.texi b/doc/emacs/msdos.texi index ea8a24d..6ad12d6 100644 --- a/doc/emacs/msdos.texi +++ b/doc/emacs/msdos.texi @@ -655,7 +655,7 @@ and the right button generates @kbd{mouse-3} events. If this variable is non-@code{nil}, the roles of these two buttons are reversed. @node Windows Processes -@section Subprocesses on Windows 9X/ME and Windows NT/2K/XP +@section Subprocesses on Windows 9X/ME and Windows NT/2K/XP/Vista/7/8/10 @cindex subprocesses on MS-Windows @cindex DOS applications, running from Emacs @@ -663,7 +663,8 @@ is non-@code{nil}, the roles of these two buttons are reversed. version) includes full support for asynchronous subprocesses. In the Windows version, synchronous and asynchronous subprocesses work fine on both -Windows 9X/ME and Windows NT/2K/XP as long as you run only 32-bit Windows +Windows 9X/ME and Windows NT/2K/XP/Vista/7/8/10 as long as you run +only 32-bit or 64-bit Windows applications. However, when you run a DOS application in a subprocess, you may encounter problems or be unable to run the application at all; and if you run two DOS applications at the same time in two @@ -713,6 +714,15 @@ character. If the value is a character, Emacs uses that character to escape any quote characters that appear; otherwise it chooses a suitable escape character based on the type of the program. +@vindex w32-pipe-buffer-size + The variable @code{w32-pipe-buffer-size} controls the size of the +buffer Emacs requests from the system when it creates pipes for +communications with subprocesses. The default value is zero, which +lets the OS choose the size. Any valid positive value will request a +buffer of that size in bytes. This can be used to tailor +communications with subprocesses to programs that exhibit unusual +behavior with respect to buffering pipe I/O. + @ifnottex @findex w32-shell-execute The function @code{w32-shell-execute} can be useful for writing diff --git a/etc/NEWS b/etc/NEWS index 85ec30a..10fcb7e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1762,6 +1762,12 @@ this has no effect. ** The new function 'w32-application-type' returns the type of an MS-Windows application given the name of its executable program file. +** New variable `w32-pipe-buffer-size'. +It can be used to tune the size of the buffer of pipes created for +communicating with subprocesses, when the program run by a subprocess +exhibits unusual buffering behavior. Default is zero, which lets the +OS use its default size. + ---------------------------------------------------------------------- This file is part of GNU Emacs. diff --git a/src/w32.c b/src/w32.c index 4770718..ea3a9da 100644 --- a/src/w32.c +++ b/src/w32.c @@ -8043,14 +8043,19 @@ pipe2 (int * phandles, int pipe2_flags) { int rc; unsigned flags; + unsigned pipe_size = 0; eassert (pipe2_flags == (O_BINARY | O_CLOEXEC)); + /* Allow Lisp to override the default buffer size of the pipe. */ + if (w32_pipe_buffer_size > 0 && w32_pipe_buffer_size < UINT_MAX) + pipe_size = w32_pipe_buffer_size; + /* make pipe handles non-inheritable; when we spawn a child, we replace the relevant handle with an inheritable one. Also put pipes into binary mode; we will do text mode translation ourselves if required. */ - rc = _pipe (phandles, 0, _O_NOINHERIT | _O_BINARY); + rc = _pipe (phandles, pipe_size, _O_NOINHERIT | _O_BINARY); if (rc == 0) { @@ -8632,15 +8637,35 @@ sys_write (int fd, const void * buffer, unsigned int count) http://thread.gmane.org/gmane.comp.version-control.git/145294 in the git mailing list. */ const unsigned char *p = buffer; - const unsigned chunk = 30 * 1024 * 1024; + const bool is_pipe = (fd < MAXDESC + && ((fd_info[fd].flags & (FILE_PIPE | FILE_NDELAY)) + == (FILE_PIPE | FILE_NDELAY))); + /* Some programs, notably Node.js's node.exe, seem to never + completely empty the pipe, so writing more than the size of + the pipe's buffer always returns ENOSPC, and we loop forever + between send_process and here. As a workaround, write no + more than the pipe's buffer can hold. */ + DWORD pipe_buffer_size; + if (is_pipe) + { + if (!GetNamedPipeInfo ((HANDLE)_get_osfhandle (fd), + NULL, &pipe_buffer_size, NULL, NULL)) + { + DebPrint (("GetNamedPipeInfo: error %u\n", GetLastError ())); + pipe_buffer_size = 4096; + } + } + const unsigned chunk = is_pipe ? pipe_buffer_size : 30 * 1024 * 1024; nchars = 0; + errno = 0; while (count > 0) { unsigned this_chunk = count < chunk ? count : chunk; int n = _write (fd, p, this_chunk); - nchars += n; + if (n > 0) + nchars += n; if (n < 0) { /* When there's no buffer space in a pipe that is in the @@ -8654,12 +8679,10 @@ sys_write (int fd, const void * buffer, unsigned int count) avoiding deadlock whereby each side of the pipe is blocked on write, waiting for the other party to read its end of the pipe. */ - if (errno == ENOSPC - && fd < MAXDESC - && ((fd_info[fd].flags & (FILE_PIPE | FILE_NDELAY)) - == (FILE_PIPE | FILE_NDELAY))) + if (errno == ENOSPC && is_pipe) errno = EAGAIN; - nchars = n; + if (nchars == 0) + nchars = -1; break; } else if (n < this_chunk) diff --git a/src/w32proc.c b/src/w32proc.c index a65f085..a89a985 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -3702,6 +3702,13 @@ of time slices to wait (effectively boosting the priority of the child process temporarily). A value of zero disables waiting entirely. */); w32_pipe_read_delay = 50; + DEFVAR_INT ("w32-pipe-buffer-size", w32_pipe_buffer_size, + doc: /* Size of buffer for pipes created to communicate with subprocesses. +The size is in bytes, and must be non-negative. The default is zero, +which lets the OS use its default size, usually 4KB (4096 bytes). +Any negative value means to use the default value of zero. */); + w32_pipe_buffer_size = 0; + DEFVAR_LISP ("w32-downcase-file-names", Vw32_downcase_file_names, doc: /* Non-nil means convert all-upper case file names to lower case. This applies when performing completions and file name expansion.