Paul Eggert [Thu, 9 Dec 2021 17:03:10 +0000 (09:03 -0800)]
emacsclient takes more care about XDG_RUNTIME_DIR
* lib-src/emacsclient.c (set_local_socket): Revert to the Emacs 27
behavior of not trying TMPDIR if XDG_RUNTIME_DIR is set.
This is one of the suggestions made by Jim Porter and
independently by Ulrich Mueller in Bug#51327.
Emacs got better at quoting shell arguments and the original value
works correctly for vc-git-grep. At the same time, the value
introduced on that commit caused a regression on lgrep.
* lisp/progmodes/grep.el (grep-files-aliases): Use previous value for
`all'. Fixes bug#52367
Eli Zaretskii [Wed, 8 Dec 2021 14:22:10 +0000 (16:22 +0200)]
Fix mode-line display in Calendar mode
* lisp/help.el (substitute-command-keys): New optional argument
NO-FACE, to avoid putting the 'help-key-binding' face on the key
bindings.
* lisp/calendar/calendar.el (calendar-mode-line-entry): Call
'substitute-command-keys' with the new optional argument non-nil.
(Bug#52366)
* doc/lispref/help.texi (Keys in Documentation): Document the new
optional argument of 'substitute-command-keys'.
* etc/NEWS: Announce the addition of a new argument to
'substitute-command-keys'.
Robert Pluim [Tue, 7 Dec 2021 17:43:01 +0000 (18:43 +0100)]
Document native-comp-async-report-warning-errors more
The docstring has a description of how fix problems in lisp code
detected by native compilation, but not the Emacs Lisp manual, so
document it there as well.
* doc/lispref/compile.texi (Native-Compilation Functions): Refer to
'native-comp-async-report-warning-errors'
(Native-Compilation Variables): Explain potential cause of warnings
from native compilation.
Juri Linkov [Mon, 6 Dec 2021 17:24:09 +0000 (19:24 +0200)]
Select the right buffer for event in context-menu functions (bug#9923)
* lisp/mouse.el (context-menu-region):
* lisp/progmodes/prog-mode.el (prog-context-menu):
Switch to the buffer displayed by the window of the event
before using syntax-ppss, char-after.
Stefan Kangas [Fri, 3 Dec 2021 14:57:56 +0000 (15:57 +0100)]
; FAQ: Normalize references to the NEWS.NN file
* doc/misc/efaq.texi (New in Emacs 26, New in Emacs 25)
(New in Emacs 24, New in Emacs 23, New in Emacs 22)
(New in Emacs 21, New in Emacs 20): Normalize the format for
referring to the NEWS.NN file.
Paul Eggert [Fri, 3 Dec 2021 03:01:33 +0000 (19:01 -0800)]
Port to C compilers that lack size-0 arrays
The C standard does not allow size-zero arrays, so redo struct
Lisp_Subr to not use size-zero arrays when native compilation is
not being used. Formerly, the code was using size-zero arrays (a
GNU C extension) to avoid using memory unnecessarily when
HAVE_NATIVE_COMP is not defined. Replace this hack with the
more-traditional hack of putting the relevant members inside
‘#ifdef HAVE_NATIVE_COMP’.
* src/alloc.c (cleanup_vector, mark_object):
* src/comp.c (make_subr):
* src/data.c (Fsubr_native_lambda_list, Fsubr_native_comp_unit):
* src/eval.c (init_eval_once, funcall_lambda):
* src/lisp.h (SUBR_NATIVE_COMPILEDP, SUBR_NATIVE_COMPILED_DYNP)
(SUBR_TYPE):
* src/lread.c (Fload):
Conditionally compile with ‘#ifdef HAVE_NATIVE_COMP’ instead of
with ‘if (NATIVE_COMP_FLAG)’. Redo members like native_comp_u[0]
to be plain native_comp_u. Put all uses of these members inside
‘#ifdef HAVE_NATIVE_COMP’.
* src/lisp.h (struct Lisp_Subr): Members native_comp_u,
native_c_name, lambda_list, type are now all ifdeffed out if
HAVE_NATIVE_COMP is not defined, instead of being size-zero
arrays. All uses changed.
* src/pdumper.c (dump_subr, dump_cold_native_subr)
(dump_do_dump_relocation):
* src/comp.h (NATIVE_COMP_FLAG): Remove; no longer needed.
Paul Eggert [Fri, 3 Dec 2021 02:43:43 +0000 (18:43 -0800)]
Port emacsclient to Solaris 10
Without this patch, the build fails on Solaris 10 with the diagnostic
“Undefined symbol acl_trivial first referenced in file
../lib/libgnu.a(file-has-acl.o)”.
* lib-src/Makefile.in (LIB_HAS_ACL): New macro.
(emacsclient${EXEEXT}): Link with $(LIB_HAS_ACL).
Paul Eggert [Fri, 3 Dec 2021 02:18:39 +0000 (18:18 -0800)]
Work around IBM XL C compiler bug
* src/fileio.c (Fcopy_file): Work around a compiler bug in IBM XL
C for AIX, V12.1 (5765-J02, 5725-C72). Without this patch, the
compiler incorrectly complains “Initialization between types "int"
and "struct timespec" is not allowed” and “Initialization between
types "long" and "struct timespec" is not allowed”.
* test/lisp/tab-bar-tests.el: New file.
(tab-bar-tests-close-other-tabs-with-arg): Test for regression
that closed the selected tab after selecting it.
Juri Linkov [Wed, 1 Dec 2021 17:41:37 +0000 (19:41 +0200)]
* lisp/repeat.el: Use same logic for repeat-check-key and repeat-exit-timeout.
* lisp/repeat.el (repeat-check-key): Use for repeat-check-key the same logic
as is used for repeat-exit-timeout in repeat-post-hook (bug#51390).
(repeat-post-hook): Check for repeat-exit-timeout symbol property.
Juri Linkov [Wed, 1 Dec 2021 17:36:00 +0000 (19:36 +0200)]
* lisp/help.el (help--analyze-key): Prefer posn-set-point over mouse-set-point
* lisp/help.el (help--analyze-key): Use posn-set-point instead of
mouse-set-point that runs the hook mouse-leave-buffer-hook via
mouse-minibuffer-check. Using posn-set-point also unnecessitates
extra conditions added in bug#51421.
* lisp/isearch.el (isearch-describe-key, isearch-describe-mode):
Add precautions to not call isearch-update when the executed
command exited isearch-mode (bug#51173).
Alan Mackenzie [Wed, 1 Dec 2021 15:41:09 +0000 (15:41 +0000)]
CC Mode: Recognise "struct foo {" as introducing a type declaration
This fixes bug #52157.
* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): If such a construct
is parsed, set the flag at-type-decl which is part of the function's return
value.
Juri Linkov [Tue, 30 Nov 2021 19:05:05 +0000 (21:05 +0200)]
* lisp/repeat.el: Fix long-standing problem when a random key activates map
* lisp/repeat.el (repeat-check-key): New defcustom (bug#51390).
(repeat--command-property): New internal function.
(repeat-check-key): New function.
(repeat-post-hook): Use repeat--command-property and repeat-check-key.
* test/lisp/repeat-tests.el (repeat-tests-check-key): New test.
Remove problematic characters from modus-themes.org (bug#52126)
* doc/misc/modus-themes.org
(Enable and load, Font configurations for Org and others)
(Note on highlight-parentheses.el, Note on god-mode.el): Update links to
headings so that they no longer include the removed portions of text.
(Option for color-coding success state, Option for line highlighting)
(Option for line numbers, Option for parenthesis matching)
(Advanced customization, Per-theme customization settings)
(Case-by-case face specs using the themes' palette)
(Face specs at scale using the themes' palette)
(Remap face with local value, Cycle through arbitrary colors)
(Override colors, Override color saturation)
(Font configurations for Org and others, Configure bold and italic faces)
(Custom Org user faces, Update Org block delimiter fontification)
(Measure color contrast, Load theme depending on time of day)
(Backdrop for pdf-tools)
(A theme-agnostic hook for theme loading, Note on EWW and Elfeed fonts)
(Frequently Asked Questions): Remove parentheses from headings as they
can cause problems in the .texi version of the file.
Karl Fogel [Sun, 28 Nov 2021 19:34:57 +0000 (13:34 -0600)]
; Remove an obsolete comment
* src/editfns.c (Ftranspose_regions): Remove an obsolete comment about
memmove, following up to commit 72af86bd8cf of 8 Jul 2010 by Andreas
Schwab and commit 354f9f0fc6cc of 23 Feb 2016 by Fredrik Bergroth,
both of which added calls to memmove.
Mike Kupfer [Fri, 26 Nov 2021 21:59:14 +0000 (13:59 -0800)]
Fix Subject when forwarding message with 2-line From
* lisp/mh-e/mh-comp.el (mh-forwarded-letter-subject): Collapse
two-line From headers into a single line (SF#266). Based on a
suggestion from Lester Buck (many thanks!).
* src/xdisp.c (produce_stretch_glyph): Use the correct face for
non-ASCII characters. Support :relative-width display spec on
Lisp strings, not just on buffer text.
Eli Zaretskii [Sat, 20 Nov 2021 18:08:06 +0000 (20:08 +0200)]
Fix mouse handling with several TTY frames on MS-Windows
* src/w32inevt.c (do_mouse_event): Reset the 'mouse_moved' flag of
the selected frame. Without that, this flag might remain set on a
TTY frame that is not displayed.
martin rudalics [Sat, 20 Nov 2021 09:56:13 +0000 (10:56 +0100)]
Fix mouse events on tab bar or tool bar when 'track-mouse' is t
* lisp/mouse.el (mouse-drag-track):
* lisp/mouse-drag.el (mouse-drag-drag): Set 'track-mouse' to some
value neither t nor nil.
* src/keyboard.c (make_lispy_position): If track_mouse is Qt,
report event on tool or tab bar (Bug#51794).