commit 75d8e5773dede1d6c429bd08a4b8d5a0d87fe87b Author: Po Lu Date: Mon Jun 1 12:15:04 2026 +0800 Restore runtime dependencies to documentation files * Makefile.in (MAKE_DOC_FOR_DOCLANG): Remove unnecessary .PHONY definitions for targets which will be encompassed by $(DOC). (MAKE_DOC): Create a common target to to which to assign runtime dependencies. (misc-info-common, misc-dvi-common, misc-html-common) (misc-pdf-common, misc-ps-common): Assign runtime dependencies on Lisp etc. previously assigned to the bare targets now subject to indirection. diff --git a/Makefile.in b/Makefile.in index ac15088418f..a107cbba2ca 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1147,12 +1147,14 @@ PSS = lispref-ps lispintro-ps emacs-ps misc-ps DOCS = $(DVIS) $(HTMLS) $(INFOS) $(PDFS) $(PSS) define MAKE_DOC_FOR_DOCLANG -.PHONY: $(1)-DOCLANG-$(2) -$(1)-DOCLANG-$(2): +$(1)-DOCLANG-$(2): $(1)-common $$(MAKE) -C doc/$$(subst -, DOCLANG=$(2) ,$(1)) endef define MAKE_DOC +# Define a target to which dependencies common to all of the doc files +# in this directory may be assigned. +$(1)-common: $(1): $$(addprefix $(1)-DOCLANG-,$(DOCLANGS)) $$(foreach lang,$(DOCLANGS),$$(eval $$(call MAKE_DOC_FOR_DOCLANG,$(1),$$(lang)))) @@ -1174,10 +1176,10 @@ ps: $(PSS) # Depending on src is sufficient, but ends up being slow, since the # uncompiled lisp/org/*.el files are used to build the .texi files # (which can be slow even with the elc files). -misc-info: lisp +misc-info-common: lisp # Using src rather than lisp because one is less likely to get unnecessary # rebuilds of stuff that is not strictly necessary for generating manuals. -misc-dvi misc-html misc-pdf misc-ps: src +misc-dvi-common misc-html-common misc-pdf-common misc-ps-common: src info-dir: ${srcdir}/info/dir commit 6db4271ee8b5934c81e815747544519935f7650d Author: Paul Eggert Date: Sun May 31 10:25:00 2026 -0700 Ignore SO_RCVTIMEO errors in emacsclient * lib-src/emacsclient.c: Include (timeout): Now signed, and initially -1. All uses changed. (decode_options): Do not worry about ERANGE or ranges, as other code now deal with this; the old code was wrong anyway as it mixed uintmax_t with INTMAX_MAX and INTMAX_MIN. But do check for syntax errors and negative values. (set_socket_timeout): Don’t time out if the timeout is 0 or enormous. Silently ignore errors (Bug#81160). (main): Allow --timeout=0, as per documentation. diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index cb8e045d6f3..381481c7fbd 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -74,6 +74,7 @@ char *w32_getenv (const char *); #include #include #include +#include #include #include #include @@ -146,8 +147,9 @@ static char const *socket_name; /* If non-NULL, the filename of the authentication file. */ static char const *server_file; -/* Seconds to wait before timing out (0 means wait forever). */ -static uintmax_t timeout; +/* Seconds to wait before timing out. Negative means no --timeout so + use DEFAULT_TIMEOUT, 0 means wait forever. */ +static intmax_t timeout = -1; /* If non-NULL, the tramp prefix emacs must use to find the files. */ static char const *tramp_prefix; @@ -539,10 +541,8 @@ decode_options (int argc, char **argv) break; case 'w': - timeout = strtoumax (optarg, &endptr, 10); - if (timeout <= 0 || - ((timeout == INTMAX_MAX || timeout == INTMAX_MIN) - && errno == ERANGE)) + timeout = strtoimax (optarg, &endptr, 10); + if (timeout < 0 || endptr == optarg || *endptr) { fprintf (stderr, "Invalid timeout: \"%s\"\n", optarg); exit (EXIT_FAILURE); @@ -1952,28 +1952,30 @@ start_daemon_and_retry_set_socket (void) return emacs_socket; } +/* Set SOCKET's timeout to SECONDS. + If SECONDS is zero or out of range, do not set the timeout. + Silently ignore errors, as POSIX says it is implementation-defined as + to whether SO_RCVTIMEO works. Although we could fall back on + non-blocking I/O if setsockopt fails, it's not worth the trouble. */ static void -set_socket_timeout (HSOCKET socket, int seconds) +set_socket_timeout (HSOCKET socket, intmax_t seconds) { - int ret; + if (seconds <= 0) + return; #ifndef WINDOWSNT struct timeval timeout; - timeout.tv_sec = seconds; + if (ckd_add (&timeout.tv_sec, seconds, 0)) + return; timeout.tv_usec = 0; - ret = setsockopt (socket, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof timeout); + setsockopt (socket, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof timeout); #else DWORD timeout; - if (seconds > INT_MAX / 1000) - timeout = INT_MAX; - else - timeout = seconds * 1000; - ret = setsockopt (socket, SOL_SOCKET, SO_RCVTIMEO, (char *) &timeout, sizeof timeout); + if (ckd_mul (&timeout, seconds, 1000)) + return; + setsockopt (socket, SOL_SOCKET, SO_RCVTIMEO, (char *) &timeout, sizeof timeout); #endif - - if (ret < 0) - sock_err_message ("setsockopt"); } static bool @@ -2210,7 +2212,7 @@ main (int argc, char **argv) } fflush (stdout); - set_socket_timeout (emacs_socket, timeout > 0 ? timeout : DEFAULT_TIMEOUT); + set_socket_timeout (emacs_socket, timeout < 0 ? DEFAULT_TIMEOUT : timeout); bool saw_response = false; ptrdiff_t nrecv = 0; @@ -2236,7 +2238,7 @@ main (int argc, char **argv) if (timeout > 0) { /* Don't retry if we were given a --timeout flag. */ - fprintf (stderr, "\nServer not responding; timed out after %ju seconds", + fprintf (stderr, "\nServer not responding; timed out after %jd seconds", timeout); retry = false; } commit 8902361cba867e7d4aa6cb844214636a6eabe7fb Author: Vincent Belaïche Date: Sun May 31 14:57:41 2026 +0200 README for manual translations available, and how to compile them diff --git a/doc/translations/README b/doc/translations/README index bac8bc5d188..f97f4fb105c 100644 --- a/doc/translations/README +++ b/doc/translations/README @@ -1,3 +1,19 @@ +* Translated Emacs manuals +** Translations available + +Translations for language _doclang_ can be found under directory +doc/translations/_doclang_. + +** Compiling a manual translation + +For the info output, and, say, SES manual in French: + + make -C doc/misc ses DOCLANG=fr + +For the pdf output: + + make -C doc/misc ses-fr.pdf DOCLANG=fr + * Translating the Emacs manuals ** Copyright assignment commit 35af8d1099e2f3187c70c4c661a44231bdec1f4c Author: Vincent Belaïche Date: Sat May 30 16:53:15 2026 +0200 Make build in doc/ happen in parallel over DOCLANGS This also avoids using ";" in make rules, which doesn't propagate errors from the first command to the entire line. * Makefile.in (MAKE_DOC_FOR_DOCLANG): New. (MAKE_DOC): delegate to 'MAKE_DOC_FOR_DOCLANG' per language doc build. diff --git a/Makefile.in b/Makefile.in index e0a8d1ae579..ac15088418f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1145,10 +1145,17 @@ PDFS = lispref-pdf lispintro-pdf emacs-pdf misc-pdf PSS = lispref-ps lispintro-ps emacs-ps misc-ps DOCS = $(DVIS) $(HTMLS) $(INFOS) $(PDFS) $(PSS) + +define MAKE_DOC_FOR_DOCLANG +.PHONY: $(1)-DOCLANG-$(2) +$(1)-DOCLANG-$(2): + $$(MAKE) -C doc/$$(subst -, DOCLANG=$(2) ,$(1)) + +endef define MAKE_DOC -$(1): - $(foreach lang,$(DOCLANGS),$$(MAKE) -C doc/$$(subst -, DOCLANG=$(lang) ,$$@);) +$(1): $$(addprefix $(1)-DOCLANG-,$(DOCLANGS)) +$$(foreach lang,$(DOCLANGS),$$(eval $$(call MAKE_DOC_FOR_DOCLANG,$(1),$$(lang)))) endef $(foreach doc,$(DOCS),$(eval $(call MAKE_DOC,$(doc)))) commit 3d01d53c1e345e144dc0089bc47647bfdc50b4bf Author: Vincent Belaïche Date: Sat May 30 16:40:59 2026 +0200 Make doc/ build fail on DOCLANG=dummy * doc/misc/Makefile.in (DOCLANG): Call 'error' when asked to produce manuals for a language we don't know about. diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index 1d0a55e997e..11a2dc3d517 100644 --- a/doc/misc/Makefile.in +++ b/doc/misc/Makefile.in @@ -66,6 +66,7 @@ MAKEINFO_OPTS = --force -I$(emacsdir) ifeq ($(DOCLANG),) DOCLANG:=default else ifeq ($(wildcard $(srcdir)/../translations/$(DOCLANG)/info_common.mk),) +$(error No manual language $(DOCLANG) found) DOCLANG:=default endif commit 1f662e2ab70486f7051ebc890620393e2a8879d9 Author: Vincent Belaïche Date: Sat May 30 16:28:55 2026 +0200 ; * m4/texinfo.m4 (gl_SET_MAKEINFO): Fix introductory comment. diff --git a/m4/texinfo.m4 b/m4/texinfo.m4 index 251d039df2c..231d0b35736 100644 --- a/m4/texinfo.m4 +++ b/m4/texinfo.m4 @@ -12,7 +12,8 @@ AC_REQUIRE([gl_SET_DOCMISC_W32]) AC_REQUIRE([gl_SET_DOCLANGS]) ]) dnl -dnl gl_FIND_MAKEINFO +dnl gl_SET_MAKEINFO +dnl set the MAKEINFO precious variable to the suitable makeinfo compiler. AC_DEFUN([gl_SET_MAKEINFO],[dnl [## Require makeinfo >= 4.13 (last of the 4.x series) to build the manuals. : ${MAKEINFO:=makeinfo} commit c44f7ada0c01c3b0b774f6e6b7ed85d29e4887a0 Author: Vincent Belaïche Date: Sat May 30 16:26:55 2026 +0200 Avoid using the LANG environment variable Amend commit 75153f7b769 " Fix clash with locale variable" by Andreas Schwab. Use DOCLANG instead of INFO_LANG for renaming, as documentation does not produce only info output, and DOCLANG is iterating over DOCLANGS. * Makefile.in: Rename 'LANG' to 'DOCLANG' to avoid clash with well-known environment variable. * doc/misc/Makefile.in: Adjusted accordingly, rename 'INFO_LANG' to 'DOCLANG' where Andreas had already renamed 'LANG'. * doc/translations/fr/misc/ses-fr.texi: rename 'INFO_LANG' to 'DOCLANG' in explanatory comment. diff --git a/Makefile.in b/Makefile.in index b9164afa55d..e0a8d1ae579 100644 --- a/Makefile.in +++ b/Makefile.in @@ -796,7 +796,7 @@ install-info: info [ -f "$(DESTDIR)${infodir}/dir" ] || \ [ ! -f ${srcdir}/info/dir ] || \ ${INSTALL_DATA} ${srcdir}/info/dir "$(DESTDIR)${infodir}/dir"; \ - info_misc="$(foreach lang,$(DOCLANGS),`MAKEFLAGS= $(MAKE) --no-print-directory -s -C doc/misc LANG=$(lang) echo-info`)"; \ + info_misc="$(foreach lang,$(DOCLANGS),`MAKEFLAGS= $(MAKE) --no-print-directory -s -C doc/misc DOCLANG=$(lang) echo-info`)"; \ cd ${srcdir}/info ; \ for elt in ${INFO_NONMISC} $${info_misc}; do \ for f in `ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \ @@ -946,7 +946,7 @@ uninstall: uninstall-$(NTDIR) uninstall-doc uninstall-gsettings-schemas done -rm -rf "$(DESTDIR)${libexecdir}/emacs/${version}" thisdir=`pwd -P`; \ - (info_misc="$(foreach lang,$(DOCLANGS),`MAKEFLAGS= $(MAKE) --no-print-directory -s -C doc/misc LANG=$(lang) echo-info`)"; \ + (info_misc="$(foreach lang,$(DOCLANGS),`MAKEFLAGS= $(MAKE) --no-print-directory -s -C doc/misc DOCLANG=$(lang) echo-info`)"; \ if cd "$(DESTDIR)${infodir}"; then \ for elt in ${INFO_NONMISC} $${info_misc}; do \ (cd "$${thisdir}"; \ @@ -1124,7 +1124,7 @@ TAGS tags: lib lib-src # src $(MAKE) -C doc/emacs tags $(MAKE) -C doc/lispintro tags $(MAKE) -C doc/lispref tags - $(foreach LANG,$(DOCLANGS),$(MAKE) -C doc/misc LANG=$(LANG) tags;) + $(foreach DOCLANG,$(DOCLANGS),$(MAKE) -C doc/misc DOCLANG=$(DOCLANG) tags;) CHECK_TARGETS = check check-maybe check-expensive check-all check-byte-compile .PHONY: $(CHECK_TARGETS) @@ -1147,7 +1147,7 @@ PSS = lispref-ps lispintro-ps emacs-ps misc-ps DOCS = $(DVIS) $(HTMLS) $(INFOS) $(PDFS) $(PSS) define MAKE_DOC $(1): - $(foreach lang,$(DOCLANGS),$$(MAKE) -C doc/$$(subst -, LANG=$(lang) ,$$@);) + $(foreach lang,$(DOCLANGS),$$(MAKE) -C doc/$$(subst -, DOCLANG=$(lang) ,$$@);) endef $(foreach doc,$(DOCS),$(eval $(call MAKE_DOC,$(doc)))) diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index 2cf4cf26eea..1d0a55e997e 100644 --- a/doc/misc/Makefile.in +++ b/doc/misc/Makefile.in @@ -63,21 +63,21 @@ INSTALL_DATA = @INSTALL_DATA@ MAKEINFO = @MAKEINFO@ MAKEINFO_OPTS = --force -I$(emacsdir) -ifeq ($(INFO_LANG),) -INFO_LANG:=default -else ifeq ($(wildcard $(srcdir)/../translations/$(LANG)/info_common.mk),) -INFO_LANG:=default +ifeq ($(DOCLANG),) +DOCLANG:=default +else ifeq ($(wildcard $(srcdir)/../translations/$(DOCLANG)/info_common.mk),) +DOCLANG:=default endif -lang_suffix:=$(filter-out -default,-$(INFO_LANG)) -lang_subdir:=$(filter-out ../translations/default/misc/,../translations/$(INFO_LANG)/misc/) +lang_suffix:=$(filter-out -default,-$(DOCLANG)) +lang_subdir:=$(filter-out ../translations/default/misc/,../translations/$(DOCLANG)/misc/) ## On MS Windows, efaq-w32; otherwise blank. DOCMISC_W32 = @DOCMISC_W32@ DOCMISC_W32_TARGET = efaq-w32 ## Info files to build and install on all platforms. -include $(srcdir)/../translations/$(INFO_LANG)/info_common.mk +include $(srcdir)/../translations/$(DOCLANG)/info_common.mk ## Info files to install on current platform. INFO_INSTALL = $(INFO_COMMON) $(DOCMISC_W32) diff --git a/doc/translations/fr/misc/ses-fr.texi b/doc/translations/fr/misc/ses-fr.texi index 9d17f174786..368858413f1 100644 --- a/doc/translations/fr/misc/ses-fr.texi +++ b/doc/translations/fr/misc/ses-fr.texi @@ -11,11 +11,11 @@ @syncodeindex ky cp @c %**end of header @c compiler info avec -@c make -C doc/misc ../../info/ses-fr.info INFO_LANG=fr +@c make -C doc/misc ../../info/ses-fr.info DOCLANG=fr @c ou juste -@c make -C doc/misc ses INFO_LANG=fr +@c make -C doc/misc ses DOCLANG=fr @c compiler pdf avec -@c make -C doc/misc ses-fr.pdf INFO_LANG=fr +@c make -C doc/misc ses-fr.pdf DOCLANG=fr @copying Ce fichier documente @acronym{SES} : le tableur simple d’Emacs (Simple commit 75153f7b7693b8980e4b383fbcbcbb5600fdd076 Author: Andreas Schwab Date: Sun May 31 11:06:55 2026 +0200 Fix clash with locale variable LANG is a locale variable, use INFO_LANG instead. * doc/misc/Makefile.in (INFO_LANG): Renamed from LANG, all uses changed. * doc/translations/fr/misc/ses-fr.texi: Use INFO_LANG instead of LANG. diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index bb09f15f65a..2cf4cf26eea 100644 --- a/doc/misc/Makefile.in +++ b/doc/misc/Makefile.in @@ -63,21 +63,21 @@ INSTALL_DATA = @INSTALL_DATA@ MAKEINFO = @MAKEINFO@ MAKEINFO_OPTS = --force -I$(emacsdir) -ifeq ($(LANG),) -LANG:=default +ifeq ($(INFO_LANG),) +INFO_LANG:=default else ifeq ($(wildcard $(srcdir)/../translations/$(LANG)/info_common.mk),) -LANG:=default +INFO_LANG:=default endif -lang_suffix:=$(filter-out -default,-$(LANG)) -lang_subdir:=$(filter-out ../translations/default/misc/,../translations/$(LANG)/misc/) +lang_suffix:=$(filter-out -default,-$(INFO_LANG)) +lang_subdir:=$(filter-out ../translations/default/misc/,../translations/$(INFO_LANG)/misc/) ## On MS Windows, efaq-w32; otherwise blank. DOCMISC_W32 = @DOCMISC_W32@ DOCMISC_W32_TARGET = efaq-w32 ## Info files to build and install on all platforms. -include $(srcdir)/../translations/$(LANG)/info_common.mk +include $(srcdir)/../translations/$(INFO_LANG)/info_common.mk ## Info files to install on current platform. INFO_INSTALL = $(INFO_COMMON) $(DOCMISC_W32) diff --git a/doc/translations/fr/misc/ses-fr.texi b/doc/translations/fr/misc/ses-fr.texi index 4e204ad94e5..9d17f174786 100644 --- a/doc/translations/fr/misc/ses-fr.texi +++ b/doc/translations/fr/misc/ses-fr.texi @@ -11,11 +11,11 @@ @syncodeindex ky cp @c %**end of header @c compiler info avec -@c make -C doc/misc ../../info/ses-fr.info LANG=fr +@c make -C doc/misc ../../info/ses-fr.info INFO_LANG=fr @c ou juste -@c make -C doc/misc ses LANG=fr +@c make -C doc/misc ses INFO_LANG=fr @c compiler pdf avec -@c make -C doc/misc ses-fr.pdf LANG=fr +@c make -C doc/misc ses-fr.pdf INFO_LANG=fr @copying Ce fichier documente @acronym{SES} : le tableur simple d’Emacs (Simple commit 64f4ce7b2d9d8bf8c291b8b6993f9b4ced51814c Author: Eli Zaretskii Date: Sun May 31 11:36:15 2026 +0300 Allow optionally disabling the use of TABs for TTY cursor movement * src/term.c (syms_of_term) : New var. : Doc fix. * src/cm.c (calccost): Use it to disable use of TABs for cursor motion on text terminals. * etc/NEWS: Announce the new variable. diff --git a/etc/NEWS b/etc/NEWS index a5806a99e31..e764545c508 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -37,6 +37,18 @@ exit status to 256 if sending input to that process returned EPIPE. Now when this happens, Emacs closes the file descriptor to write to the child process, but allows it to continue execution as normal. +--- +** New variable 'tty-cursor-movement-use-TAB'. +If this is set to the nil value, Emacs will not use TABs to optimize +cursor motion on text-mode terminals. This is for the rare cases where +the hardware tabs of the terminal were set to a non-default value by the +'tabs' command or similar, or if using TABs for cursor movement has any +other undesired effects. The default is t, which preserves past +behavior. + +If this variable is nil, 'tty-cursor-movement-use-TAB-BS' has no effect, +and Emacs will never use TABs for any cursor-movement sequences. + * Editing Changes in Emacs 32.1 diff --git a/src/cm.c b/src/cm.c index 4693b69c26e..f453fc2650a 100644 --- a/src/cm.c +++ b/src/cm.c @@ -225,7 +225,8 @@ calccost (struct tty_display_info *tty, goto dodelta; /* skip all the tab junk */ } /* Tabs (the toughie) */ - if (tty->Wcm->cc_tab >= BIG || !tty->Wcm->cm_usetabs) + if (!tty_cursor_movement_use_TAB + || tty->Wcm->cc_tab >= BIG || !tty->Wcm->cm_usetabs) goto olddelta; /* forget it! */ /* diff --git a/src/term.c b/src/term.c index 1a5ed74d698..8777a3b6a65 100644 --- a/src/term.c +++ b/src/term.c @@ -5263,9 +5263,20 @@ On TTY frames, as a display optimization, Emacs may move to a position by "overshooting" with TAB characters and one BACKSPACE character, when this is more efficient. This combination can interfere with the functioning of some software, such as screen readers. Set this to -non-nil to enable this optimization. */); +non-nil to enable this optimization. +If `tty-cursor-movement-use-TAB' is nil, this variable has no effect, +as Emacs will never use TABs for cursor movement. */); tty_cursor_movement_use_TAB_BS = 0; + DEFVAR_BOOL ("tty-cursor-movement-use-TAB", tty_cursor_movement_use_TAB, + doc: /* Whether TTY frames may use TAB for cursor motion. +On TTY frames, as a display optimization, Emacs may move cursor to a +position with TAB characters, when this is more efficient. This might +produce wrong results if the hardware tabs of the terminal were set to +be of different width than Emacs expects. Set this to nil to disable +using TABs for cursor motion. */); + tty_cursor_movement_use_TAB = 1; + defsubr (&Stty_display_color_p); defsubr (&Stty_display_color_cells); defsubr (&Stty_no_underline);