commit 9830b81292917f2ec989c8b70b4728e366a9f3f1 (HEAD, refs/remotes/origin/master) Author: Glenn Morris Date: Wed Jan 20 20:11:16 2016 -0500 Remove handling of non-string time-stamp formats, obsolete for 20 years. * lisp/time-stamp.el (time-stamp-format): Doc fix. (time-stamp-old-format-warn, time-stamp-fconcat): Remove. (time-stamp-string): Ignore non-string formats. ; * etc/NEWS: Mention this. diff --git a/etc/NEWS b/etc/NEWS index 9fbe695..a95cead 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -59,6 +59,9 @@ in these situations. *** The kqueue library is integrated for *BSD and Mac OS X machines. +--- +** Support for non-string values of `time-stamp-format' has been removed. + ** Tramp *** New connection method "sg", which allows to edit files under diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el index d58942c..79524fb 100644 --- a/lisp/time-stamp.el +++ b/lisp/time-stamp.el @@ -43,10 +43,7 @@ (defcustom time-stamp-format "%:y-%02m-%02d %02H:%02M:%02S %u" "Format of the string inserted by \\[time-stamp]. -The value may be a string or a list. Lists are supported only for -backward compatibility; see variable `time-stamp-old-format-warn'. - -A string is used verbatim except for character sequences beginning +This is a string, used verbatim except for character sequences beginning with %, as follows. The values of non-numeric formatted items depend on the locale setting recorded in `system-time-locale' and `locale-coding-system'. The examples here are for the default @@ -107,17 +104,6 @@ otherwise would have been updated." :group 'time-stamp :version "19.29") -(defcustom time-stamp-old-format-warn 'ask - "Action if `time-stamp-format' is an old-style list. -If `error', the format is not used. If `ask', the user is queried about -using the time-stamp-format. If `warn', a warning is displayed. -If nil, no notification is given." - :type '(choice (const :tag "Don't use the format" error) - (const ask) - (const warn) - (const :tag "No notification" nil)) - :group 'time-stamp) - (defcustom time-stamp-time-zone nil "The time zone to be used by \\[time-stamp]. Its format is that of the ZONE argument of the `format-time-string' function," @@ -420,26 +406,14 @@ With ARG, turn time stamping on if and only if arg is positive." "Generate the new string to be inserted by \\[time-stamp]. Optionally use format TS-FORMAT instead of `time-stamp-format' to format the string." - (or ts-format - (setq ts-format time-stamp-format)) - (if (stringp ts-format) - (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) - (not (y-or-n-p "Use non-string time-stamp-format? ")))) - (message "Warning: no time-stamp: time-stamp-format not a string") - (sit-for 1) - nil) - (t - (cond ((eq time-stamp-old-format-warn 'warn) - (message "Obsolescent time-stamp-format type; should be string") - (sit-for 1))) - (time-stamp-fconcat ts-format " "))))) + (if (stringp (or ts-format (setq ts-format time-stamp-format))) + (time-stamp--format (time-stamp-string-preprocess ts-format) nil))) + (defconst time-stamp-no-file "(no file)" "String to use when the buffer is not associated with a file.") +;;; FIXME This comment was written in 1996! ;;; time-stamp is transitioning to using the new, expanded capabilities ;;; of format-time-string. During the process, this function implements ;;; intermediate, compatible formats and complains about old, soon to @@ -676,28 +650,6 @@ otherwise the value of the function `system-name'." mail-host-address) (system-name))) -;;; the rest of this file is for version 1 compatibility - -(defun time-stamp-fconcat (list sep) - "Similar to (mapconcat \\='funcall LIST SEP) but LIST allows literals. -If an element of LIST is a symbol, it is funcalled to get the string to use; -the separator SEP is used between two strings obtained by funcalling a -symbol. Otherwise the element itself is inserted; no separator is used -around literals." - (let ((return-string "") - (insert-sep-p nil)) - (while list - (cond ((symbolp (car list)) - (if insert-sep-p - (setq return-string (concat return-string sep))) - (setq return-string (concat return-string (funcall (car list)))) - (setq insert-sep-p t)) - (t - (setq return-string (concat return-string (car list))) - (setq insert-sep-p nil))) - (setq list (cdr list))) - return-string)) - (provide 'time-stamp) ;;; time-stamp.el ends here commit 4786c02b83a521bb35f8928dac33a884b6ca7cfa Author: Eli Zaretskii Date: Wed Jan 20 19:34:27 2016 +0200 Anoter fix for problematic merge from emacs-25 * src/w32fns.c (globals_of_w32fns): Move initialization of resetstkoflw to a non-Cygwin part. diff --git a/src/w32fns.c b/src/w32fns.c index 01f5d6f..a5018ae 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -9921,6 +9921,7 @@ globals_of_w32fns (void) except_addr = 0; #ifndef CYGWIN prev_exception_handler = SetUnhandledExceptionFilter (my_exception_handler); + resetstkoflw = NULL; #endif DEFVAR_INT ("w32-ansi-code-page", @@ -9935,8 +9936,6 @@ globals_of_w32fns (void) after_deadkey = -1; - resetstkoflw = NULL; - /* MessageBox does not work without this when linked to comctl32.dll 6.0. */ InitCommonControls (); commit 1d5f46b20e98a2fb9b67cb4708a7508b501e4057 Merge: 282030f 64a568d Author: Michael Albinus Date: Wed Jan 20 11:03:36 2016 +0100 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs commit 282030fd3408871e9e67abdc4037edbb35b63162 Author: Michael Albinus Date: Wed Jan 20 11:03:15 2016 +0100 * test/Makefile.in (mostlyclean): Use ${LOGFILES}. diff --git a/test/Makefile.in b/test/Makefile.in index 9f70113..0034f10 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -164,7 +164,7 @@ check-doit: ${LOGFILES} .PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean mostlyclean: - -@for f in *.log; do test ! -f $$f || mv $$f $$f~; done + -@for f in ${LOGFILES}; do test ! -f $$f || mv $$f $$f~; done clean: -rm -f ${LOGFILES} ${LOGSAVEFILES} commit 64a568d6100e5eab5b86e8bd31846212654d1fcf Author: Eli Zaretskii Date: Wed Jan 20 11:47:19 2016 +0200 Fix MS-Windows build broken by a botched merge from emacs-25 * src/w32.c (w32_crypto_hprov): New static variable. (globals_of_w32): Initialize w32_crypto_hprov. (w32_init_crypt_random, w32_init_random): New functions. Include wincrypt.h. * src/w32.h (w32_init_random): Add prototype. diff --git a/src/w32.c b/src/w32.c index 183a4e7..6f1d5fd 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" @@ -2094,6 +2096,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) { @@ -9417,6 +9447,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 097241b..fde3803 100644 --- a/src/w32.h +++ b/src/w32.h @@ -223,6 +223,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