commit 780f674a82a90c4e3e32583059b498bfa57e4a06 (HEAD, refs/remotes/origin/master) Author: Dmitry Gutov Date: Sat May 30 19:57:06 2020 +0300 Don't return transient projects with MAYBE-PROMPT=nil * lisp/progmodes/project.el (project-current): Only return transient projects when called with non-nil MAYBE-PROMPT. Also only update the known projects lists in this case. (https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg03375.html). diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 1f2a4e8471..2d0b6c4a21 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -115,10 +115,11 @@ the user for a different project to look in." maybe-prompt) (setq dir (project-prompt-project-dir) pr (project--find-in-directory dir)))) - (if pr - (project--add-to-project-list-front pr) - (project--remove-from-project-list dir) - (setq pr (cons 'transient dir))) + (when maybe-prompt + (if pr + (project--add-to-project-list-front pr) + (project--remove-from-project-list dir) + (setq pr (cons 'transient dir)))) pr)) (defun project--find-in-directory (dir) commit 3dbe6530b124436550dae4db6cd4b7b380e95377 Author: immerrr Date: Sun May 17 13:47:23 2020 +0200 Minor fix in 'find-alternate-file' This fixes the use case when, for example, 'find-file-hooks' fails. * lisp/files.el (find-alternate-file): If buffer 'oname' exists, kill it before renaming the new one. (Bug#41359) diff --git a/lisp/files.el b/lisp/files.el index cefae20ab5..742fd78df1 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1921,6 +1921,8 @@ killed." (setq buffer-file-truename otrue) (setq dired-directory odir) (lock-buffer) + (if (get-buffer oname) + (kill-buffer oname)) (rename-buffer oname))) (unless (eq (current-buffer) obuf) (with-current-buffer obuf commit 360d7c716dc49aeaa62bd2174e803e0a3eaeaa1b Author: Eli Zaretskii Date: Sat May 30 13:56:20 2020 +0300 Remove private prototype for 'execve' and its uses in MinGW build * src/sysdep.c (emacs_exec_file): Don't compile this function anymore on WINDOWSNT, since it is not used there. This function was the only reason for having 'execve' prototype in ms-w32.h. * nt/inc/ms-w32.h (execve): Remove prototype and the MinGW64 vs ming.org mess that it causes. diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h index cbe35ea105..4cbae16dc5 100644 --- a/nt/inc/ms-w32.h +++ b/nt/inc/ms-w32.h @@ -300,17 +300,6 @@ extern int sys_umask (int); #define execvp _execvp #include /* for intptr_t */ extern intptr_t _execvp (const char *, char **); -#ifdef MINGW_W64 -/* GCC 6 has a builtin execve with the prototype shown below. MinGW64 - changed the prototype in its process.h to match that, although the - library function still calls _execve, which still returns intptr_t. - However, using the prototype with intptr_t causes GCC to emit - warnings. Fortunately, execve is not used in the MinGW build, but - the code that references it is still compiled. */ -extern int execve (const char *, char * const *, char * const *); -#else -extern intptr_t execve (const char *, char * const *, char * const *); -#endif #define tcdrain _commit #define fdopen _fdopen #define fsync _commit diff --git a/src/sysdep.c b/src/sysdep.c index 86e7c20cd0..cbd306a6b6 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -199,6 +199,7 @@ maybe_disable_address_randomization (int argc, char **argv) } #endif +#ifndef WINDOWSNT /* Execute the program in FILE, with argument vector ARGV and environ ENVP. Return an error number if unsuccessful. This is like execve except it reenables ASLR in the executed program if necessary, and @@ -215,6 +216,8 @@ emacs_exec_file (char const *file, char *const *argv, char *const *envp) return errno; } +#endif /* !WINDOWSNT */ + /* If FD is not already open, arrange for it to be open with FLAGS. */ static void force_open (int fd, int flags)