]> code.delx.au - gnu-emacs/commitdiff
Merge from origin/emacs-25
authorJohn Wiegley <johnw@newartisans.com>
Tue, 19 Jan 2016 06:56:34 +0000 (22:56 -0800)
committerJohn Wiegley <johnw@newartisans.com>
Tue, 19 Jan 2016 06:56:34 +0000 (22:56 -0800)
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

1  2 
etc/NEWS
lisp/dired-x.el
src/w32.c
src/w32.h

diff --combined etc/NEWS
index 66e8e770a083066cdea55c77c1d131d142fc2b75,40cfef3e075ab978d01671c88f98719a4460f823..56f0ec35ba912522cdb102f04a74516345656204
+++ b/etc/NEWS
@@@ -22,65 -22,6 +22,65 @@@ Temporary note
  When you add a new item, use the appropriate mark if you are sure it applies,
  otherwise leave it unmarked.
  
 +\f
 +* Installation Changes in Emacs 25.2
 +
 +** 'configure' detects the kqueue file notification library on *BSD
 +and Mac OS X machines.
 +
 +\f
 +* Startup Changes in Emacs 25.2
 +
 +\f
 +* Changes in Emacs 25.2
 +
 +** It is possible to disable attempted recovery on fatal signals
 +
 +Two new variables allow to disable attempts to recover from stack
 +overflow and to avoid automatic auto-save when Emacs is delivered a
 +fatal signal.  `attempt-stack-overflow-recovery', if set to `nil',
 +will disable attempts to recover from C stack overflows; Emacs will
 +then crash as with any other fatal signal.
 +`attempt-orderly-shutdown-on-fatal-signal', if set to `nil', will
 +disable attempts to auto-save the session and shut down in an orderly
 +fashion when Emacs receives a fatal signal; instead, Emacs will
 +terminate immediately.  Both variables are non-`nil' by default.
 +These variables are for users who would like to avoid the small
 +probability of data corruption due to techniques Emacs uses to recover
 +in these situations.
 +
 +\f
 +* Editing Changes in Emacs 25.2
 +
 +\f
 +* Changes in Specialized Modes and Packages in Emacs 25.2
 +
 +** File Notifications
 +
 +*** The kqueue library is integrated for *BSD and Mac OS X machines.
 +
 +** Tramp
 +
 +*** New connection method "sg", which allows to edit files under
 +different group ID.
 +
 +\f
 +* New Modes and Packages in Emacs 25.2
 +
 +\f
 +* Incompatible Lisp Changes in Emacs 25.2
 +
 +\f
 +* Lisp Changes in Emacs 25.2
 +
 +** New var syntax-ppss-table to control the syntax-table used in syntax-ppss
 +
 +** Autoload files can be generated without timestamps,
 +by setting `autoload-timestamps' to nil.
 +
 +\f
 +* Changes in Emacs 25.2 on Non-Free Operating Systems
 +
  \f
  * Installation Changes in Emacs 25.1
  
@@@ -225,11 -166,6 +225,11 @@@ the variable `dir-locals-file' for mor
  added via the new Network Security Manager (NSM) and controlled via
  the `network-security-level' variable.
  
 +---
 +** International domain names (IDNA) are now encoded via the new
 +puny.el library, so that one can visit web sites like
 +"http://méxico.icom.museum".
 +
  ** 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
@@@ -239,12 -175,9 +239,12 @@@ controlled by the `tls-program' variabl
  +++
  ** C-h l now also lists the commands that were run.
  
 -+++
 -** x-select-enable-clipboard is renamed select-enable-clipboard
 -and x-select-enable-primary is renamed select-enable-primary.
 +** The new M-s M-w key binding uses eww to search the web for the
 +text in the region.
 +
 +** M-x suggests shorthands and ignores obsolete commands for completion.
 +** x-select-enable-clipboard is renamed select-enable-clipboard.
 +x-select-enable-primary and renamed select-enable-primary.
  Additionally they both now apply to all systems (OSX, GNUstep, Windows, you
  name it), with the proviso that on some systems (e.g. Windows)
  select-enable-primary is ineffective since the system doesn't
@@@ -281,6 -214,14 +281,6 @@@ 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'.
  
@@@ -460,9 -401,6 +460,9 @@@ additionally need to add `getSelection
  `erc-network-hide-list' and `erc-channel-hide-list' will only hide the
  specified message types for the respective specified targets.
  
 +*** New variable `erc-default-port-tls' used to connect to TLS IRC
 +servers.
 +
  ** Midnight-mode
  
  ---
@@@ -661,11 -599,6 +661,11 @@@ useful when, for example, one needs to 
  whether to use variable-pitch fonts or not.  The user can also
  customize the `shr-use-fonts' variable.
  
 ++++
 +*** A new command `C' (`eww-toggle-colors') can be used to toggle
 +whether to use the HTML-specified colors or not.  The user can also
 +customize the `shr-use-colors' variable.
 +
  +++
  *** A new command `R' (`eww-readable') will try do identify the main
  textual parts of a web page and display only that, leaving menus and
@@@ -801,8 -734,6 +801,8 @@@ 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
  
@@@ -1181,10 -1112,6 +1181,10 @@@ compress many marked files into a singl
  compression command is determined from the new
  `dired-compress-files-alist' variable.
  
 ++++
 +*** `W' is now bound to `browse-url-of-dired-file', and is useful for
 +viewing HTML files and the like.
 +
  ** Tabulated List Mode
  
  +++
@@@ -1484,8 -1411,6 +1484,6 @@@ buffers to allow certain parts of the t
  +++
  ** 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.
  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.
@@@ -1570,6 -1496,7 +1569,7 @@@ permissions set to temporary values (e.
  +++
  ** 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
@@@ -1797,6 -1724,7 +1797,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.
  
diff --combined lisp/dired-x.el
index 053b3cb9738f519c0b19624b8cca959fdfe66938,dccaa9e96ca0d6ceea92bcd1df3b3540a77f4e86..e8cea85d988e7736e53388156a0d918e2bc580d1
@@@ -816,16 -816,14 +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)
@@@ -1669,7 -1667,7 +1667,7 @@@ If `current-prefix-arg' is non-nil, use
  
  ;; Local Variables:
  ;; byte-compile-dynamic: t
 -;; generated-autoload-file: "dired.el"
 +;; generated-autoload-file: "dired-loaddefs.el"
  ;; End:
  
  ;;; dired-x.el ends here
diff --combined src/w32.c
index ea3a9dafad5d48bb5bc313160ba55af9d834971b,6f1d5fd169862088290d24153f760210568f32ae..183a4e7e9d9239dd6493632d6506747cd07d6cbc
+++ b/src/w32.c
@@@ -224,6 -224,8 +224,6 @@@ typedef struct _REPARSE_DATA_BUFFER 
  
  #include <iphlpapi.h> /* should be after winsock2.h */
  
 -#include <wincrypt.h>
 -
  #include <c-strcase.h>
  
  #include "w32.h"
@@@ -484,6 -486,7 +484,7 @@@ typedef DWORD (WINAPI *GetAdaptersInfo_
  
  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
@@@ -1550,8 -1553,8 +1551,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)
      {
@@@ -1641,8 -1644,8 +1642,8 @@@ filename_from_ansi (const char *fn_in, 
  {
    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)
      {
@@@ -2093,6 -2096,34 +2094,6 @@@ 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)
  {
@@@ -9104,14 -9135,14 +9105,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)
@@@ -9298,6 -9329,7 +9299,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
         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");
      }
  }
@@@ -9410,6 -9447,8 +9417,6 @@@ 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 --combined src/w32.h
index 501056d38c603790cd651864701b9184464d254a,fde3803c739fd7b01726dbec32fff8345180b91b..097241b1b8f5cc6c0d1993915f09d75b48f02f98
+++ b/src/w32.h
@@@ -183,6 -183,7 +183,7 @@@ typedef int (WINAPI *MultiByteToWideCha
  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);
@@@ -222,6 -223,9 +223,6 @@@ extern int w32_memory_info (unsigned lo
  /* 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 <gnutls/gnutls.h>