emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scratch/pkg d057e8cbda3 1/2: Merge remote-tracking branch 'origin/master


From: Gerd Moellmann
Subject: scratch/pkg d057e8cbda3 1/2: Merge remote-tracking branch 'origin/master' into scratch/pkg
Date: Tue, 8 Aug 2023 02:17:20 -0400 (EDT)

branch: scratch/pkg
commit d057e8cbda31dc73347b0108a834a257448b32a1
Merge: 075dfe91c12 52ad5dc479e
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>

    Merge remote-tracking branch 'origin/master' into scratch/pkg
---
 .gitignore                        |   1 +
 configure.ac                      |  31 ++--
 doc/lispref/loading.texi          |   4 +-
 doc/lispref/modes.texi            |   4 -
 etc/NEWS                          |   4 +
 exec/config.h.in                  | 358 --------------------------------------
 lisp/emacs-lisp/easy-mmode.el     |  10 +-
 lisp/emacs-lisp/timer.el          |   9 +-
 lisp/eshell/em-dirs.el            |  10 +-
 lisp/help-fns.el                  |   8 +-
 lisp/international/fontset.el     |   8 +-
 lisp/tooltip.el                   |   4 +-
 msdos/sed1v2.inp                  |   4 +
 msdos/sedlibmk.inp                |   2 +-
 nt/gnulib-cfg.mk                  |  12 --
 src/comp.c                        |   4 +-
 src/fileio.c                      |   2 +-
 src/filelock.c                    |  27 +--
 src/lisp.h                        |   9 +-
 src/msdos.c                       |   9 +-
 src/sysdep.c                      |  12 +-
 src/sysstdio.h                    |   2 -
 test/lisp/eshell/em-dirs-tests.el |  23 +++
 test/lisp/help-fns-tests.el       |  23 ++-
 24 files changed, 127 insertions(+), 453 deletions(-)

diff --git a/.gitignore b/.gitignore
index b1bf157cb3d..4717611ab8c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -382,6 +382,7 @@ exec/exec1
 exec/deps/*
 exec/autom4te.cache
 exec/config.h
+exec/config.h.in
 exec/config-mips.m4
 exec/configure
 exec/*.s.s
diff --git a/configure.ac b/configure.ac
index c77fab3eefd..e01465c2af0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -723,7 +723,7 @@ AS_IF([test "x$XCONFIGURE" = "xandroid" \
 
 # There is little point in enabling checking in the build machine if
 # cross-compiling for Android.
-AS_IF([test -z "$with_android" || test -n "$XCONFIGURE"],[
+AS_IF([test "$with_android" = no || test -n "$XCONFIGURE"],[
   if test x$ac_enable_checking != x ; then
     AC_DEFINE([ENABLE_CHECKING], [1],
   [Define to 1 if expensive run-time data type and consistency checks are 
enabled.])
@@ -7768,7 +7768,7 @@ AC_SUBST([SUBDIR_MAKEFILES_IN])
 SMALL_JA_DIC=$with_small_ja_dic
 AC_SUBST([SMALL_JA_DIC])
 
-dnl The following commands are run on the host system when building
+dnl The following commands are run on the build system when building
 dnl Emacs.
 
 if test "$XCONFIGURE" != "android"; then
@@ -7848,19 +7848,20 @@ if test "$XCONFIGURE" != "android"; then
   dnl machine.
   AS_MKDIR_P([cross/etc])
 
-  dnl Link gnulib files to cross/lib as well.
-  dnl af_alg.h and lib/save-cwd.h are copied manually from
-  dnl gnulib, and as such aren't specified in gl_FILE_LIST.
-  emacs_files='gl_FILE_LIST lib/af_alg.h lib/save-cwd.h'
-  dnl These files are specific to Emacs.
-  emacs_files="$emacs_files lib/fingerprint.c lib/fingerprint.h \
-                 lib/save-cwd.c lib/openat-die.c lib/save-cwd.c \
-                lib/min-max.h"
-  for file in $emacs_files; do
-    AS_IF([expr "X${file}J" : "Xlib/.*[[ch]]J" >/dev/null],
-      [AS_IF([test -f "$srcdir/$file"],
-        [AC_CONFIG_LINKS([cross/$file:$file])])])
-  done
+  AS_IF([test "x$with_android" != "xno"], [
+    dnl Link gnulib files to cross/lib as well.  af_alg.h and
+    dnl lib/save-cwd.h are copied manually from gnulib, and as such
+    dnl aren't specified in gl_FILE_LIST.
+    emacs_files='gl_FILE_LIST lib/af_alg.h lib/save-cwd.h'
+    dnl These files are specific to Emacs.
+    emacs_files="$emacs_files lib/fingerprint.c lib/fingerprint.h \
+                  lib/save-cwd.c lib/openat-die.c lib/save-cwd.c \
+                  lib/min-max.h"
+    for file in $emacs_files; do
+      AS_IF([expr "X${file}J" : "Xlib/.*[[ch]]J" >/dev/null],
+       [AS_IF([test -f "$srcdir/$file"],
+         [AC_CONFIG_LINKS([cross/$file:$file])])])
+    done])
 fi
 
 # Make java/Makefile
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi
index d6fc4e8d636..125011c780f 100644
--- a/doc/lispref/loading.texi
+++ b/doc/lispref/loading.texi
@@ -660,9 +660,7 @@ and @code{define-overloadable-function} (see the commentary 
in
 @item Definitions for major or minor modes:
 @code{define-minor-mode}, @code{define-globalized-minor-mode},
 @code{define-generic-mode}, @code{define-derived-mode},
-@code{easy-mmode-define-minor-mode},
-@code{easy-mmode-define-global-mode}, @code{define-compilation-mode},
-and @code{define-global-minor-mode}.
+@code{define-compilation-mode}, and @code{define-global-minor-mode}.
 
 @item Other definition types:
 @code{defcustom}, @code{defgroup}, @code{deftheme}, @code{defclass}
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index b4f69e79155..00148420893 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -1794,10 +1794,6 @@ and will always be loaded by that time, enabling it by 
default is
 harmless.  But these are unusual circumstances.  Normally, the
 initial value must be @code{nil}.
 
-@findex easy-mmode-define-minor-mode
-  The name @code{easy-mmode-define-minor-mode} is an alias
-for this macro.
-
   Here is an example of using @code{define-minor-mode}:
 
 @smallexample
diff --git a/etc/NEWS b/etc/NEWS
index 6cdeeacc158..16dd7d5f791 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -736,6 +736,10 @@ provokes an error if used numerically.
 The compatibility aliases 'x-defined-colors', 'x-color-defined-p',
 'x-color-values', and 'x-display-color-p' are now obsolete.
 
++++
+** 'easy-mmode-define-{minor-mode,global-mode}' aliases are now obsolete.
+Use 'define-minor-mode' and 'define-globalized-minor-mode' instead.
+
 
 * Lisp Changes in Emacs 30.1
 
diff --git a/exec/config.h.in b/exec/config.h.in
deleted file mode 100644
index 3e04af37f79..00000000000
--- a/exec/config.h.in
+++ /dev/null
@@ -1,358 +0,0 @@
-/* config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* Copyright (C) 2023 Free Software Foundation, Inc.
-
-This file is part of GNU Emacs.
-
-GNU Emacs 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.
-
-GNU Emacs 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 GNU Emacs.  If not, see <https://www.gnu.org/licenses/>. */
-
-/* Define to number of reserved bytes past the stack frame. */
-#undef ABI_RED_ZONE
-
-/* Define if building universal (internal helper macro) */
-#undef AC_APPLE_UNIVERSAL_BUILD
-
-/* Define to number of the `clone3' system call. */
-#undef CLONE3_SYSCALL
-
-/* Define to number of the `clone' system call. */
-#undef CLONE_SYSCALL
-
-/* Virtual address for loading PIC executables */
-#undef EXECUTABLE_BASE
-
-/* Define to 1 if the system utilizes 64-bit ELF. */
-#undef EXEC_64
-
-/* Define to number of the `exec' system call. */
-#undef EXEC_SYSCALL
-
-/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't.
-   */
-#undef HAVE_DECL_STPCPY
-
-/* Define to 1 if you have the declaration of `stpncpy', and to 0 if you
-   don't. */
-#undef HAVE_DECL_STPNCPY
-
-/* Define to 1 if you have the `getpagesize' function. */
-#undef HAVE_GETPAGESIZE
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the <minix/config.h> header file. */
-#undef HAVE_MINIX_CONFIG_H
-
-/* Define to 1 if process_vm_readv is available. */
-#undef HAVE_PROCESS_VM
-
-/* Define to 1 if `si_syscall' is a member of `siginfo_t'. */
-#undef HAVE_SIGINFO_T_SI_SYSCALL
-
-/* Define to 1 if stdbool.h conforms to C99. */
-#undef HAVE_STDBOOL_H
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdio.h> header file. */
-#undef HAVE_STDIO_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the `stpcpy' function. */
-#undef HAVE_STPCPY
-
-/* Define to 1 if you have the `stpncpy' function. */
-#undef HAVE_STPNCPY
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <sys/uio.h> header file. */
-#undef HAVE_SYS_UIO_H
-
-/* Define to 1 if the system has the type `uintptr_t'. */
-#undef HAVE_UINTPTR_T
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if you have the <wchar.h> header file. */
-#undef HAVE_WCHAR_H
-
-/* Define to 1 if the system has the type `_Bool'. */
-#undef HAVE__BOOL
-
-/* Virtual address for loading PIC interpreters */
-#undef INTERPRETER_BASE
-
-/* Define to 1 if MIPS NABI calling convention is being used. */
-#undef MIPS_NABI
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define to number of the `readlinkat' system call. */
-#undef READLINKAT_SYSCALL
-
-/* Define to number of the `readlink' system call. */
-#undef READLINK_SYSCALL
-
-/* Define to 1 if the library is used within a signal handler. */
-#undef REENTRANT
-
-/* Define to 1 if the stack grows downwards. */
-#undef STACK_GROWS_DOWNWARDS
-
-/* Define to register holding the stack pointer. */
-#undef STACK_POINTER
-
-/* Define to 1 if all of the C90 standard headers exist (not just the ones
-   required in a freestanding environment). This macro is provided for
-   backward compatibility; new code need not use it. */
-#undef STDC_HEADERS
-
-/* Define to register holding arg1 to system calls. */
-#undef SYSCALL_ARG1_REG
-
-/* Define to register holding arg2 to system calls. */
-#undef SYSCALL_ARG2_REG
-
-/* Define to register holding arg3 to system calls. */
-#undef SYSCALL_ARG3_REG
-
-/* Define to register holding arg0 to system calls. */
-#undef SYSCALL_ARG_REG
-
-/* Define to header holding system call numbers. */
-#undef SYSCALL_HEADER
-
-/* Define to register holding the system call number. */
-#undef SYSCALL_NUM_REG
-
-/* Define to register holding value of system calls. */
-#undef SYSCALL_RET_REG
-
-/* Define to header holding USER_REGS_STRUCT. */
-#undef USER_HEADER
-
-/* Define to structure holding user registers. */
-#undef USER_REGS_STRUCT
-
-/* Define to word type used by tracees. */
-#undef USER_WORD
-
-/* Enable extensions on AIX 3, Interix.  */
-#ifndef _ALL_SOURCE
-# undef _ALL_SOURCE
-#endif
-/* Enable general extensions on macOS.  */
-#ifndef _DARWIN_C_SOURCE
-# undef _DARWIN_C_SOURCE
-#endif
-/* Enable general extensions on Solaris.  */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
-#endif
-/* Enable GNU extensions on systems that have them.  */
-#ifndef _GNU_SOURCE
-# undef _GNU_SOURCE
-#endif
-/* Enable X/Open compliant socket functions that do not require linking
-   with -lxnet on HP-UX 11.11.  */
-#ifndef _HPUX_ALT_XOPEN_SOCKET_API
-# undef _HPUX_ALT_XOPEN_SOCKET_API
-#endif
-/* Identify the host operating system as Minix.
-   This macro does not affect the system headers' behavior.
-   A future release of Autoconf may stop defining this macro.  */
-#ifndef _MINIX
-# undef _MINIX
-#endif
-/* Enable general extensions on NetBSD.
-   Enable NetBSD compatibility extensions on Minix.  */
-#ifndef _NETBSD_SOURCE
-# undef _NETBSD_SOURCE
-#endif
-/* Enable OpenBSD compatibility extensions on NetBSD.
-   Oddly enough, this does nothing on OpenBSD.  */
-#ifndef _OPENBSD_SOURCE
-# undef _OPENBSD_SOURCE
-#endif
-/* Define to 1 if needed for POSIX-compatible behavior.  */
-#ifndef _POSIX_SOURCE
-# undef _POSIX_SOURCE
-#endif
-/* Define to 2 if needed for POSIX-compatible behavior.  */
-#ifndef _POSIX_1_SOURCE
-# undef _POSIX_1_SOURCE
-#endif
-/* Enable POSIX-compatible threading on Solaris.  */
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# undef _POSIX_PTHREAD_SEMANTICS
-#endif
-/* Enable extensions specified by ISO/IEC TS 18661-5:2014.  */
-#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
-# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
-#endif
-/* Enable extensions specified by ISO/IEC TS 18661-1:2014.  */
-#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
-# undef __STDC_WANT_IEC_60559_BFP_EXT__
-#endif
-/* Enable extensions specified by ISO/IEC TS 18661-2:2015.  */
-#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
-# undef __STDC_WANT_IEC_60559_DFP_EXT__
-#endif
-/* Enable extensions specified by ISO/IEC TS 18661-4:2015.  */
-#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
-# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
-#endif
-/* Enable extensions specified by ISO/IEC TS 18661-3:2015.  */
-#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
-# undef __STDC_WANT_IEC_60559_TYPES_EXT__
-#endif
-/* Enable extensions specified by ISO/IEC TR 24731-2:2010.  */
-#ifndef __STDC_WANT_LIB_EXT2__
-# undef __STDC_WANT_LIB_EXT2__
-#endif
-/* Enable extensions specified by ISO/IEC 24747:2009.  */
-#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
-# undef __STDC_WANT_MATH_SPEC_FUNCS__
-#endif
-/* Enable extensions on HP NonStop.  */
-#ifndef _TANDEM_SOURCE
-# undef _TANDEM_SOURCE
-#endif
-/* Enable X/Open extensions.  Define to 500 only if necessary
-   to make mbstate_t available.  */
-#ifndef _XOPEN_SOURCE
-# undef _XOPEN_SOURCE
-#endif
-
-
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
-   significant byte first (like Motorola and SPARC, unlike Intel). */
-#if defined AC_APPLE_UNIVERSAL_BUILD
-# if defined __BIG_ENDIAN__
-#  define WORDS_BIGENDIAN 1
-# endif
-#else
-# ifndef WORDS_BIGENDIAN
-#  undef WORDS_BIGENDIAN
-# endif
-#endif
-
-/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
-   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
-   #define below would cause a syntax error. */
-#undef _UINT32_T
-
-/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
-   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
-   #define below would cause a syntax error. */
-#undef _UINT64_T
-
-/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
-   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
-   #define below would cause a syntax error. */
-#undef _UINT8_T
-
-/* Define as a signed integer type capable of holding a process identifier. */
-#undef pid_t
-
-/* Define to `unsigned int' if <sys/types.h> does not define. */
-#undef size_t
-
-/* Define to `int' if <sys/types.h> does not define. */
-#undef ssize_t
-
-/* Define to the type of an unsigned integer type of width exactly 16 bits if
-   such a type exists and the standard includes do not define it. */
-#undef uint16_t
-
-/* Define to the type of an unsigned integer type of width exactly 32 bits if
-   such a type exists and the standard includes do not define it. */
-#undef uint32_t
-
-/* Define to the type of an unsigned integer type of width exactly 64 bits if
-   such a type exists and the standard includes do not define it. */
-#undef uint64_t
-
-/* Define to the type of an unsigned integer type of width exactly 8 bits if
-   such a type exists and the standard includes do not define it. */
-#undef uint8_t
-
-/* Define to the type of an unsigned integer type wide enough to hold a
-   pointer, if such a type exists, and if the system does not define it. */
-#undef uintptr_t
-
-
-#ifdef HAVE_STDBOOL_H
-# include <stdbool.h>
-#else
-# ifndef HAVE__BOOL
-#  ifdef __cplusplus
-typedef bool _Bool;
-#  else
-#   define _Bool signed char
-#  endif
-# endif
-# define bool _Bool
-# define false 0
-# define true 1
-# define __bool_true_false_are_defined 1
-#endif
-
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif /* HAVE_SYS_PARAM_H */
-
-#ifndef MAX
-#define MAX(a, b) ((a) > (b) ? (a) : (b))
-#endif /* MAX */
-
-#ifndef MIN
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
-#endif /* MIN */
-
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index 20681374ee3..529f6e90e88 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -142,8 +142,6 @@ it is disabled.")
           (insert (format "\\{%s}" keymap-sym)))
         (buffer-string)))))
 
-;;;###autoload
-(defalias 'easy-mmode-define-minor-mode #'define-minor-mode)
 ;;;###autoload
 (defmacro define-minor-mode (mode doc &rest body)
   "Define a new minor mode MODE.
@@ -442,8 +440,6 @@ No problems result if this variable is not bound.
 ;;; make global minor mode
 ;;;
 
-;;;###autoload
-(defalias 'easy-mmode-define-global-mode #'define-globalized-minor-mode)
 ;;;###autoload
 (defalias 'define-global-minor-mode #'define-globalized-minor-mode)
 ;;;###autoload
@@ -841,6 +837,12 @@ Interactively, COUNT is the prefix numeric argument, and 
defaults to 1."
            ,@body))
        (put ',prev-sym 'definition-name ',base))))
 
+;; When deleting these two, also delete them from loaddefs-gen.el.
+;;;###autoload
+(define-obsolete-function-alias 'easy-mmode-define-minor-mode 
#'define-minor-mode "30.1")
+;;;###autoload
+(define-obsolete-function-alias 'easy-mmode-define-global-mode 
#'define-globalized-minor-mode "30.1")
+
 (provide 'easy-mmode)
 
 ;;; easy-mmode.el ends here
diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el
index 7544279d8aa..468c46519fd 100644
--- a/lisp/emacs-lisp/timer.el
+++ b/lisp/emacs-lisp/timer.el
@@ -1,6 +1,6 @@
 ;;; timer.el --- run a function with args at some time in future -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 1996, 2001-2023 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2023 Free Software Foundation, Inc.
 
 ;; Maintainer: emacs-devel@gnu.org
 ;; Package: emacs
@@ -226,8 +226,6 @@ the time of the current timer.  That's because the activated
 timer will fire right away."
   (timer--activate timer (not dont-wait) reuse-cell 'idle))
 
-(defalias 'disable-timeout #'cancel-timer)
-
 (defun cancel-timer (timer)
   "Remove TIMER from the list of active timers."
   (timer--check timer)
@@ -348,7 +346,6 @@ This function is called, by name, directly by the C code."
                    (memq timer timer-list))
           (setf (timer--triggered timer) nil))))))
 
-;; This function is incompatible with the one in levents.el.
 (defun timeout-event-p (event)
   "Non-nil if EVENT is a timeout event."
   (and (listp event) (eq (car event) 'timer-event)))
@@ -448,6 +445,7 @@ If REPEAT is non-nil, repeat the timer every REPEAT seconds.
 
 This function returns a timer object which you can use in `cancel-timer'.
 This function is for compatibility; see also `run-with-timer'."
+  (declare (obsolete run-with-timer "30.1"))
   (run-with-timer secs repeat function object))
 
 (defun run-with-idle-timer (secs repeat function &rest args)
@@ -580,6 +578,9 @@ If the user does not answer after SECONDS seconds, return 
DEFAULT-VALUE."
   (dolist (timer timer-idle-list)
     (if (timerp timer) ;; FIXME: Why test?
         (setf (timer--triggered timer) nil))))
+
+(define-obsolete-function-alias 'disable-timeout #'cancel-timer "30.1")
+
 
 (provide 'timer)
 
diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el
index 5284df9ab59..640d3676750 100644
--- a/lisp/eshell/em-dirs.el
+++ b/lisp/eshell/em-dirs.el
@@ -429,9 +429,13 @@ in the minibuffer:
          (and eshell-cd-shows-directory
               (eshell-printn result)))
        (run-hooks 'eshell-directory-change-hook)
-       (if eshell-list-files-after-cd
-           ;; Let-bind eshell-last-command around this?
-           (eshell-plain-command "ls" (cdr args)))
+        (when eshell-list-files-after-cd
+          ;; Call "ls", but don't update the last-command information.
+          (let ((eshell-last-command-name)
+                (eshell-last-command-status)
+                (eshell-last-arguments))
+            (eshell-protect
+             (eshell-plain-command "ls" (cdr args)))))
        nil))))
 
 (put 'eshell/cd 'eshell-no-numeric-conversions t)
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 2d94182df33..fc8f431fd11 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -2071,11 +2071,9 @@ keymap value."
         (if (symbolp keymap)
             (error "Not a keymap variable: %S" keymap)
           (error "Not a keymap")))
-      (let ((sym nil))
-        (unless sym
-          (setq sym (cl-gentemp "KEYMAP OBJECT (no variable) "))
-          (setq used-gentemp t)
-          (set sym keymap))
+      (let ((sym (cl-gentemp "KEYMAP OBJECT (no variable) ")))
+        (setq used-gentemp t)
+        (set sym keymap)
         (setq keymap sym)))
     ;; Follow aliasing.
     (setq keymap (or (ignore-errors (indirect-variable keymap)) keymap))
diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el
index bbb1993ba3c..d879920b1d0 100644
--- a/lisp/international/fontset.el
+++ b/lisp/international/fontset.el
@@ -1207,7 +1207,8 @@ Internal use only.  Should be called at startup time."
       (list (cons (purecopy "-cdac$")  1.3)))
 
 (defvar x-font-name-charset-alist nil
-  "This variable has no meaning now.  Just kept for backward compatibility.")
+  "This variable has no meaning starting with Emacs 22.1.")
+(make-obsolete-variable 'x-font-name-charset-alist nil "30.1")
 
 ;;; XLFD (X Logical Font Description) format handler.
 
@@ -1273,9 +1274,8 @@ Return nil if PATTERN doesn't conform to XLFD."
 (defun x-compose-font-name (fields &optional _reduce)
   "Compose X fontname from FIELDS.
 FIELDS is a vector of XLFD fields, of length 12.
-If a field is nil, wild-card letter `*' is embedded.
-Optional argument REDUCE exists just for backward compatibility,
-and is always ignored."
+If a field is nil, wild-card letter `*' is embedded."
+  (declare (advertised-calling-convention (fields) "30.1"))
   (concat "-" (mapconcat (lambda (x) (or x "*")) fields "-")))
 
 
diff --git a/lisp/tooltip.el b/lisp/tooltip.el
index 8d92caed08e..0881a7c7bf9 100644
--- a/lisp/tooltip.el
+++ b/lisp/tooltip.el
@@ -194,13 +194,13 @@ This might return nil if the event did not occur over a 
buffer."
 (defun tooltip-cancel-delayed-tip ()
   "Disable the tooltip timeout."
   (when tooltip-timeout-id
-    (disable-timeout tooltip-timeout-id)
+    (cancel-timer tooltip-timeout-id)
     (setq tooltip-timeout-id nil)))
 
 (defun tooltip-start-delayed-tip ()
   "Add a one-shot timeout to call function `tooltip-timeout'."
   (setq tooltip-timeout-id
-       (add-timeout (tooltip-delay) 'tooltip-timeout nil)))
+        (run-with-timer (tooltip-delay) 'tooltip-timeout nil)))
 
 (defun tooltip-timeout (_object)
   "Function called when timer with id `tooltip-timeout-id' fires."
diff --git a/msdos/sed1v2.inp b/msdos/sed1v2.inp
index 1b96cc7ddc4..dd7f650e8e3 100644
--- a/msdos/sed1v2.inp
+++ b/msdos/sed1v2.inp
@@ -213,6 +213,10 @@ s/ *@WEBP_LIBS@//
 /^XCONFIGURE *=/s/@XCONFIGURE@//
 /^[ \t]*MAKE_PDUMPER_FINGERPRINT = *$/c\
 MAKE_PDUMPER_FINGERPRINT =
+# While this variable is named abs_top_builddir, the distinction is
+# only relevant when Emacs is undergoing cross-compilation.
+/^abs_top_builddir =*/s/@abs_top_builddir@/../
+s/\$(abs_top_builddir)\/src\/lisp.mk/lisp.mk/
 /^lisp\.mk:/,/^$/c\
 lisp.mk: $(lispsource)/loadup.el\
        @rm -f $@\
diff --git a/msdos/sedlibmk.inp b/msdos/sedlibmk.inp
index 4300be47d0b..f3554e7b001 100644
--- a/msdos/sedlibmk.inp
+++ b/msdos/sedlibmk.inp
@@ -489,7 +489,7 @@ OMIT_GNULIB_MODULE_strtoll = true\
 OMIT_GNULIB_MODULE_symlink = true\
 OMIT_GNULIB_MODULE_sys_select = true\
 OMIT_GNULIB_MODULE_sys_time = true\
-OMIT_GNULIB_MODULE_crypto\/md5 = true\
+OMIT_GNULIB_MODULE_crypto\/md5 = true
 /^arg-nonnull\.h:/,/^[         ][      ]*mv /c\
 arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h\
        sed -n -e '/GL_ARG_NONNULL/,$$p' < 
$(top_srcdir)/build-aux/snippet/arg-nonnull.h > $@
diff --git a/nt/gnulib-cfg.mk b/nt/gnulib-cfg.mk
index d7241976f83..fe29e942d80 100644
--- a/nt/gnulib-cfg.mk
+++ b/nt/gnulib-cfg.mk
@@ -55,27 +55,18 @@ OMIT_GNULIB_MODULE_file-has-acl = true
 OMIT_GNULIB_MODULE_float = true
 OMIT_GNULIB_MODULE_fpucw = true
 OMIT_GNULIB_MODULE_free-posix = true
-OMIT_GNULIB_MODULE_frexp-nolibm = true
-OMIT_GNULIB_MODULE_frexpl-nolibm = true
 OMIT_GNULIB_MODULE_fseterr = true
 OMIT_GNULIB_MODULE_fsusage = true
 OMIT_GNULIB_MODULE_futimens = true
 OMIT_GNULIB_MODULE_getdelim = true
 OMIT_GNULIB_MODULE_getline = true
 OMIT_GNULIB_MODULE_inttypes-incomplete = true
-OMIT_GNULIB_MODULE_isnand-nolibm = true
-OMIT_GNULIB_MODULE_isnanf-nolibm = true
-OMIT_GNULIB_MODULE_isnanl-nolibm = true
 OMIT_GNULIB_MODULE_lchmod = true
 OMIT_GNULIB_MODULE_malloc-posix = true
-OMIT_GNULIB_MODULE_math = true
 OMIT_GNULIB_MODULE_nanosleep = true
 OMIT_GNULIB_MODULE_nproc = true
 OMIT_GNULIB_MODULE_open = true
 OMIT_GNULIB_MODULE_pipe2 = true
-OMIT_GNULIB_MODULE_printf-frexp = true
-OMIT_GNULIB_MODULE_printf-frexpl = true
-OMIT_GNULIB_MODULE_printf-posix = true
 OMIT_GNULIB_MODULE_realloc-gnu = true
 OMIT_GNULIB_MODULE_realloc-posix = true
 OMIT_GNULIB_MODULE_secure_getenv = true
@@ -92,7 +83,4 @@ OMIT_GNULIB_MODULE_sys_types = true
 OMIT_GNULIB_MODULE_unistd = true
 OMIT_GNULIB_MODULE_utimens = true
 OMIT_GNULIB_MODULE_utimensat = true
-OMIT_GNULIB_MODULE_vasnprintf = true
-OMIT_GNULIB_MODULE_vasprintf = true
-OMIT_GNULIB_MODULE_vfprintf-posix = true
 OMIT_GNULIB_MODULE_xsize = true
diff --git a/src/comp.c b/src/comp.c
index 1bde4ae5821..b81a80b00f8 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -776,7 +776,7 @@ comp_hash_source_file (Lisp_Object filename)
 #else
   int res = md5_stream (f, SSDATA (digest));
 #endif
-  fclose (f);
+  emacs_fclose (f);
 
   if (res)
     xsignal2 (Qfile_notify_error, build_string ("hashing failed"), filename);
@@ -4749,7 +4749,7 @@ DEFUN ("comp--release-ctxt", Fcomp__release_ctxt, 
Scomp__release_ctxt,
     gcc_jit_context_release (comp.ctxt);
 
   if (logfile)
-    fclose (logfile);
+    emacs_fclose (logfile);
   comp.ctxt = NULL;
 
   return Qt;
diff --git a/src/fileio.c b/src/fileio.c
index 290481c2b5d..b5c3add836e 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2598,7 +2598,7 @@ internal_delete_file (Lisp_Object filename)
 {
   Lisp_Object tem;
 
-  tem = internal_condition_case_2 (Fdelete_file_internal, filename,
+  tem = internal_condition_case_1 (Fdelete_file_internal, filename,
                                   Qt, internal_delete_file_1);
   return NILP (tem);
 }
diff --git a/src/filelock.c b/src/filelock.c
index fea0044e219..66b8fd2ceac 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -143,10 +143,6 @@ static void get_boot_time_1 (const char *, bool);
 static time_t
 get_boot_time (void)
 {
-#if defined (BOOT_TIME)
-  int counter;
-#endif
-
   if (boot_time_initialized)
     return boot_time;
   boot_time_initialized = 1;
@@ -196,8 +192,9 @@ get_boot_time (void)
   /* Try to get boot time from the current wtmp file.  */
   get_boot_time_1 (WTMP_FILE, 1);
 
-  /* If we did not find a boot time in wtmp, look at wtmp, and so on.  */
-  for (counter = 0; counter < 20 && ! boot_time; counter++)
+  /* If we did not find a boot time in wtmp, look at wtmp.1,
+     wtmp.1.gz, wtmp.2, wtmp.2.gz, and so on.  */
+  for (int counter = 0; counter < 20 && ! boot_time; counter++)
     {
       Lisp_Object filename = Qnil;
       bool delete_flag = false;
@@ -442,18 +439,12 @@ lock_file_1 (Lisp_Object lfname, bool force)
   char lock_info_str[MAX_LFINFO + 1];
   intmax_t pid = getpid ();
 
-  if (boot)
-    {
-      if (sizeof lock_info_str
-          <= snprintf (lock_info_str, sizeof lock_info_str,
-                      "%s@%s.%"PRIdMAX":%"PRIdMAX,
-                       user_name, host_name, pid, boot))
-        return ENAMETOOLONG;
-    }
-  else if (sizeof lock_info_str
-           <= snprintf (lock_info_str, sizeof lock_info_str,
-                       "%s@%s.%"PRIdMAX,
-                        user_name, host_name, pid))
+  char const *lock_info_fmt = (boot
+                              ? "%s@%s.%"PRIdMAX":%"PRIdMAX
+                              : "%s@%s.%"PRIdMAX);
+  int len = snprintf (lock_info_str, sizeof lock_info_str,
+                     lock_info_fmt, user_name, host_name, pid, boot);
+  if (! (0 <= len && len < sizeof lock_info_str))
     return ENAMETOOLONG;
 
   return create_lock_file (SSDATA (lfname), lock_info_str, force);
diff --git a/src/lisp.h b/src/lisp.h
index 115796bf926..516157c8c6b 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -5189,8 +5189,15 @@ extern int emacs_open (const char *, int, int);
 extern int emacs_open_noquit (const char *, int, int);
 extern int emacs_pipe (int[2]);
 extern int emacs_close (int);
-extern FILE *emacs_fdopen (int, const char *);
+#if !(defined HAVE_ANDROID && !defined ANDROID_STUBIFY)
+# define emacs_fclose fclose
+#else
 extern int emacs_fclose (FILE *);
+#endif
+extern FILE *emacs_fdopen (int, const char *)
+  ATTRIBUTE_MALLOC ATTRIBUTE_DEALLOC (emacs_fclose, 1);
+extern FILE *emacs_fopen (char const *, char const *)
+  ATTRIBUTE_MALLOC ATTRIBUTE_DEALLOC (emacs_fclose, 1);
 extern int emacs_unlink (const char *);
 extern int emacs_symlink (const char *, const char *);
 extern int emacs_rmdir (const char *);
diff --git a/src/msdos.c b/src/msdos.c
index 75a39045cee..1b7f2d4ae21 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -979,11 +979,15 @@ tty_draw_row_with_mouse_face (struct window *w, struct 
glyph_row *row,
   if (hl == DRAW_MOUSE_FACE)
     {
       int vpos = row->y + WINDOW_TOP_EDGE_Y (w);
-      int kstart = start_hpos + WINDOW_LEFT_EDGE_X (w);
+      int kstart = (start_hpos + WINDOW_LEFT_EDGE_X (w)
+                   + row->used[LEFT_MARGIN_AREA]);
       int nglyphs = end_hpos - start_hpos;
       int offset = ScreenPrimary + 2*(vpos*screen_size_X + kstart) + 1;
       int start_offset = offset;
 
+      if (end_hpos >= row->used[TEXT_AREA])
+       nglyphs = row->used[TEXT_AREA] - start_hpos;
+
       if (tty->termscript)
        fprintf (tty->termscript, "\n<MH+ %d-%d:%d>",
                 kstart, kstart + nglyphs - 1, vpos);
@@ -1021,6 +1025,9 @@ tty_draw_row_with_mouse_face (struct window *w, struct 
glyph_row *row,
         temporarily move cursor coordinates to the beginning of
         the highlight region.  */
       new_pos_X = start_hpos + WINDOW_LEFT_EDGE_X (w);
+      /* The coordinates supplied by the caller are relative to the
+        text area, not the window itself.  */
+      new_pos_X += row->used[LEFT_MARGIN_AREA];
       new_pos_Y = row->y + WINDOW_TOP_EDGE_Y (w);
 
       if (tty->termscript)
diff --git a/src/sysdep.c b/src/sysdep.c
index a995bc66741..0f8b70c8248 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -2644,15 +2644,13 @@ emacs_fdopen (int fd, const char *mode)
    clear information associated with the FILE's file descriptor if
    necessary.  */
 
+#if defined HAVE_ANDROID && !defined ANDROID_STUBIFY
 int
 emacs_fclose (FILE *stream)
 {
-#if !(defined HAVE_ANDROID && !defined ANDROID_STUBIFY)
-  return fclose (stream);
-#else
   return android_fclose (stream);
-#endif
 }
+#endif
 
 /* Wrappers around unlink, symlink, rename, renameat_noreplace, and
    rmdir.  These operations handle asset and content directories on
@@ -3492,7 +3490,7 @@ get_up_time (void)
          Lisp_Object subsec = Fcons (make_fixnum (upfrac), make_fixnum (hz));
          up = Ftime_add (sec, subsec);
        }
-      fclose (fup);
+      emacs_fclose (fup);
     }
   unblock_input ();
 
@@ -3540,7 +3538,7 @@ procfs_ttyname (int rdev)
                }
            }
        }
-      fclose (fdev);
+      emacs_fclose (fdev);
     }
   unblock_input ();
   return build_string (name);
@@ -3582,7 +3580,7 @@ procfs_get_total_memory (void)
          }
       while (!done);
 
-      fclose (fmem);
+      emacs_fclose (fmem);
     }
   unblock_input ();
   return retval;
diff --git a/src/sysstdio.h b/src/sysstdio.h
index 5a973c833cc..8e9e5bec86c 100644
--- a/src/sysstdio.h
+++ b/src/sysstdio.h
@@ -28,8 +28,6 @@ along with GNU Emacs.  If not, see 
<https://www.gnu.org/licenses/>.  */
 #include <attribute.h>
 #include <unlocked-io.h>
 
-extern FILE *emacs_fopen (char const *, char const *)
-  ATTRIBUTE_MALLOC ATTRIBUTE_DEALLOC (fclose, 1);
 extern void errputc (int);
 extern void errwrite (void const *, ptrdiff_t);
 extern void close_output_streams (void);
diff --git a/test/lisp/eshell/em-dirs-tests.el 
b/test/lisp/eshell/em-dirs-tests.el
index d30b3d7d73f..9864b72ba78 100644
--- a/test/lisp/eshell/em-dirs-tests.el
+++ b/test/lisp/eshell/em-dirs-tests.el
@@ -99,4 +99,27 @@
      (eshell-match-command-output "echo $-[1][/ 1 3]"
                                   "(\"some\" \"here\")\n"))))
 
+(ert-deftest em-dirs-test/cd ()
+  "Test that changing directories with `cd' works."
+  (ert-with-temp-directory tmpdir
+    (write-region "text" nil (expand-file-name "file.txt" tmpdir))
+    (with-temp-eshell
+     (eshell-match-command-output (format "cd '%s'" tmpdir)
+                                  "\\`\\'")
+     (should (equal default-directory tmpdir)))))
+
+(ert-deftest em-dirs-test/cd/list-files-after-cd ()
+  "Test that listing files after `cd' works."
+  (let ((eshell-list-files-after-cd t))
+    (ert-with-temp-directory tmpdir
+      (write-region "text" nil (expand-file-name "file.txt" tmpdir))
+      (with-temp-eshell
+       (eshell-match-command-output (format "cd '%s'" tmpdir)
+                                    "file.txt\n")
+       (should (equal default-directory tmpdir))
+       ;; Make sure we didn't update the last-command information when
+       ;; running "ls".
+       (should (equal eshell-last-command-name "#<function eshell/cd>"))
+       (should (equal eshell-last-arguments (list tmpdir)))))))
+
 ;; em-dirs-tests.el ends here
diff --git a/test/lisp/help-fns-tests.el b/test/lisp/help-fns-tests.el
index 243a45ae6d2..56c521e765e 100644
--- a/test/lisp/help-fns-tests.el
+++ b/test/lisp/help-fns-tests.el
@@ -132,6 +132,12 @@ Return first line of the output of (describe-function-1 
FUNC)."
 
 
 ;;; Tests for describe-keymap
+
+(defvar-keymap help-fns-test-map
+  "a" 'test-cmd-a
+  "b" 'test-cmd-b
+  "c" 'test-cmd-c)
+
 (ert-deftest help-fns-test-find-keymap-name ()
   (should (equal (help-fns-find-keymap-name lisp-mode-map) 'lisp-mode-map))
   ;; Follow aliasing.
@@ -142,27 +148,32 @@ Return first line of the output of (describe-function-1 
FUNC)."
     (makunbound 'foo-test-map)))
 
 (ert-deftest help-fns-test-describe-keymap/symbol ()
-  (describe-keymap 'minibuffer-local-must-match-map)
+  (describe-keymap 'help-fns-test-map)
   (with-current-buffer "*Help*"
-    (should (looking-at "^minibuffer-local-must-match-map is"))))
+    (should (looking-at "^help-fns-test-map is"))
+    (should (re-search-forward (rx word-start "a" word-end
+                                   (+ blank)
+                                   word-start "test-cmd-a" word-end)
+                               nil t))))
 
 (ert-deftest help-fns-test-describe-keymap/value ()
-  (describe-keymap minibuffer-local-must-match-map)
+  (describe-keymap help-fns-test-map)
   (with-current-buffer "*Help*"
     (should (looking-at "\nKey"))))
 
 (ert-deftest help-fns-test-describe-keymap/not-keymap ()
   (should-error (describe-keymap nil))
-  (should-error (describe-keymap emacs-version)))
+  (should-error (describe-keymap emacs-version))
+  (should-error (describe-keymap 'some-undefined-variable-foobar)))
 
 (ert-deftest help-fns-test-describe-keymap/let-bound ()
-  (let ((foobar minibuffer-local-must-match-map))
+  (let ((foobar help-fns-test-map))
     (describe-keymap foobar)
     (with-current-buffer "*Help*"
       (should (looking-at "\nKey")))))
 
 (ert-deftest help-fns-test-describe-keymap/dynamically-bound-no-file ()
-  (setq help-fns-test--describe-keymap-foo minibuffer-local-must-match-map)
+  (setq help-fns-test--describe-keymap-foo help-fns-test-map)
   (describe-keymap 'help-fns-test--describe-keymap-foo)
   (with-current-buffer "*Help*"
     (should (looking-at "^help-fns-test--describe-keymap-foo is"))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]