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.
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.