Eli Zaretskii [Thu, 20 Jan 2022 11:42:56 +0000 (13:42 +0200)]
Fix UB in ebrowse
* lib-src/ebrowse.c (matching_regexp): Avoid writing beyond the
limits of 'matching_regexp_buffer'. Patch by Jan Stranik
<jan@stranik.org>. (Bug#53333)
Martin Rudalics [Thu, 20 Jan 2022 09:30:08 +0000 (10:30 +0100)]
Add workaround to handle a problem with Enlightenment WM (Bug#53298)
* src/xterm.c (handle_one_xevent): Handle setting of variable
'x_set_frame_visibility_more_laxly' when receiving an Expose or
FocusIn event (Bug#53298).
(Qexpose): Define symbol.
(x_set_frame_visibility_more_laxly): New Lisp variable.
* etc/PROBLEMS: Mention frame redraw problem with the
Enlightenment WM and 'x-set-frame-visibility-more-laxly'
workaround.
Fix closure-conversion of shadowed captured lambda-lifted vars
Lambda-lifted variables (ones passed explicitly to lambda-lifted
functions) that are also captured in an outer closure and shadowed
were renamed incorrectly (bug#51982).
Reported by Paul Pogonyshev.
* lisp/emacs-lisp/cconv.el (cconv--lifted-arg): New.
(cconv-convert): Provide correct definiens for the closed-over
variable.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
* test/lisp/emacs-lisp/cconv-tests.el (cconv-tests--intern-all)
(cconv-closure-convert-remap-var): Add tests.
Don't fail flymake-tests if `gcc` actually is Clang
* test/lisp/progmodes/flymake-tests.el (flymake-tests--gcc-is-clang)
(different-diagnostic-types, included-c-header-files): Skip tests that
depend on the `gcc` command really being GCC and not Clang.
Stefan Monnier [Mon, 10 Jan 2022 02:02:31 +0000 (21:02 -0500)]
(save-some-buffers): Simplify the fix for bug#46374
* lisp/files.el (save-some-buffers): Only check the
`save-some-buffers-function` property on functions from
`save-some-buffers-default-predicate` since callers which provide
a `pred` argument can arrange to compute `pred` themselves if needed.
* test/lisp/files-tests.el (files-tests-buffer-offer-save): Don't test
with `pred` set to `save-some-buffers-root` since it's not an
appropriate function for that any more.
Dmitry Gutov [Wed, 5 Jan 2022 02:08:10 +0000 (04:08 +0200)]
Fix vc-git with old Git over Tramp and cygwin-mount.el
* lisp/vc/vc-git.el (vc-git-use-literal-pathspecs): New variable.
(vc-git-command, vc-git--call): Use it to determine whether to set
GIT_LITERAL_PATHSPECS=1 (bug#51497).
(vc-git--literal-pathspec, vc-git--literal-pathspecs): Remove.
Update all callers. This reverts the previous solution for bug#39452.
* lisp/progmodes/project.el (project--vc-list-files):
Use the new variable.
Juri Linkov [Sun, 2 Jan 2022 18:00:40 +0000 (20:00 +0200)]
* lisp/tab-line.el: Revert part of the fix in a6adfe21e4 (bug#52881)
(tab-line--get-tab-property, tab-line-auto-hscroll): Use get-pos-property
instead of get-text-property that fails after previous-single-property-change.
Juri Linkov [Fri, 31 Dec 2021 09:20:51 +0000 (11:20 +0200)]
* lisp/tab-line.el (tab-line--get-tab-property): New function (bug#52881).
(tab-line-auto-hscroll): Use ‘tab-line--get-tab-property’ instead of
‘get-pos-property 1’, and ‘get-text-property’ instead of
‘get-pos-property’.
(tab-line-select-tab, tab-line-close-tab): Use tab-line--get-tab-property.
Eli Zaretskii [Thu, 30 Dec 2021 18:28:58 +0000 (20:28 +0200)]
Avoid assertion violations with variable-weight fonts
* src/font.c (font_score, font_delete_unmatched): Don't assume
weight, slant, and width properties of the font must be fixnums:
some variable-weight fonts violate that assumption. Reported
by Sean Whitton <spwhitton@spwhitton.name>. Do not merge to
master. (Bug#52888)
Eli Zaretskii [Wed, 29 Dec 2021 14:39:20 +0000 (16:39 +0200)]
Improve documentation of 'M-X' and related features
* doc/emacs/m-x.texi (M-x): Index 'M-X'.
* doc/lispref/commands.texi (Interactive Call, Command Modes):
Mention 'M-X' and 'execute-extended-command-for-buffer'.
* etc/NEWS: Clarify that the '(declare (completion ...' and
'(declare (modes ...' forms have no effect by default. Likewise
for '(interactive "..." MODE)' specs. (Bug#52839)
Sean Whitton [Mon, 27 Dec 2021 19:58:25 +0000 (12:58 -0700)]
Improve rectangle-mark-mode documentation regarding mark activation
* doc/emacs/killing.texi: Describe how rectangle-mark-mode works when
Transient Mark mode is off. Qualify discussion of
rectangle-exchange-point-and-mark to say that it cycles the four
corners only when the region is active.
* lisp/rect.el (rectangle-mark-mode): State that rectangle-mark-mode
does not activate the mark when Transient Mark mode is off. Reword
sentence about how long the mode lasts to account for when Transient
Mark mode is off. (Bug#42663)
After deleting the dedicated window, such as a window with *Completions*
buffer, select the previously selected window, like most of other 'cond'
branches do in this function (bug#52491).
Martin Rudalics [Wed, 15 Dec 2021 17:53:49 +0000 (18:53 +0100)]
Fix control buffer window height in 'ediff-setup-control-buffer' (Bug#49277)
* lisp/vc/ediff-util.el (ediff-setup-control-buffer): Emulate
original 'shrink-window-if-larger-than-buffer' call by calling
'fit-window-to-buffer' with an appropriate maximum height
argument (Bug#49277).
Philipp Stephani [Tue, 14 Dec 2021 10:17:37 +0000 (11:17 +0100)]
Remove maintainer comment from Emacs 28 module snippet.
This is the same as 44c13eefe8d30841000a96d82f467fb8d222e365 on
master. We should also remove this comment on the release branch,
otherwise it ends up in the emacs-module.h shipped to users.
Kévin Le Gouguec [Mon, 13 Dec 2021 04:17:00 +0000 (05:17 +0100)]
Make `M-x run-python' select the window again
Interactively, we want M-x run-python to focus the interpreter buffer.
The previous code failed in two ways:
- the call to 'display-buffer' was not reached if an interpreter
was already running,
- set-buffer is ineffectual if the interpreter's window is not
selected: once Emacs returns to the command loop, the current buffer
will revert back to what the selected window contains.
* lisp/progmodes/python.el (python-shell-make-comint): Handle the SHOW
argument regardless of whether an interpreter buffer exists, and use
pop-to-buffer to select the window.
(run-python): Delegate buffer management to
'python-shell-make-comint'.
* test/lisp/progmodes/python-tests.el
(python-tests--run-python-selects-window): Rename from
'python-tests--bug31398', and adjust assertions (bug#52380).
Po Lu [Fri, 10 Dec 2021 13:36:59 +0000 (21:36 +0800)]
Fix the DJGPP port
* config.bat:
* msdos/sed1v2.inp:
* msdos/sed2v2.inp:
* msdos/sed3v2.inp:
* msdos/sedlibmk.inp: Update for Emacs 28.
* msdos/langinfo.h: New file.
* lisp/loadup.el: Use correct path to temacs when dumping on
MS-DOS.
* src/callproc.c (environ) [MSDOS]: New declaration.
(child_setup, emacs_spawn): Update MS-DOS parts for Emacs 28.
* src/fileio.c (Fcopy_file): Don't use copy_file_range on
MS-DOS.
* src/msdos.c (initialize_msdos_display): Add
`defined_color_hook'.
(openat, fchmodat, futimens, utimensat): New functions.
* src/msdos.h (FRAME_X_DISPLAY): New macro.
* src/process.c: Make some more things conditional on
subprocess support.
(PIPECONN_P, PIPECONN1_P) [!subprocesses]: New placeholder
macros.
(Fnum_processors): Return 1 on MSDOS.
(open_channel_for_module): Avoid subprocess specific code
on MSDOS.
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.