Eshel Yaron [Fri, 31 Mar 2023 14:54:12 +0000 (17:54 +0300)]
Preserve peer information for web page in eww-readable
The :peer property in eww-data affects the face of the page title
in 'header-line-format' as set by 'eww-update-header-line-format'.
Preserving this property in eww-readable avoids having the header
line's appearance change when this command is called.
* lisp/net/eww.el (eww-readable): Preserve eww-data's :peer
property. (Bug#62574)
Jim Porter [Sat, 1 Apr 2023 17:28:02 +0000 (10:28 -0700)]
; Make sure 'eshell-command' tests don't prompt the user
* test/lisp/eshell/eshell-tests.el
(eshell-test/eshell-command/background)
(eshell-test/eshell-command/background-pipeline): Wait for the process
to finish.
Eli Zaretskii [Sat, 1 Apr 2023 06:24:38 +0000 (09:24 +0300)]
Fix new Eshell tests on MS-Windows
* test/lisp/eshell/eshell-tests.el (eshell-test/eshell-command/background)
(eshell-test/eshell-command/background-pipeline): Allow for ".exe"
in the program's name. This fixes these tests on MS-Windows.
João Távora [Thu, 30 Mar 2023 22:52:27 +0000 (23:52 +0100)]
Eglot: unbreak eglot-extend-to-xref on w32
Because of a drive-letter casing mismatch between 'buffer-file-name'
and the return value of 'url-generic-parse-url', the hash-table test
'equal' in 'eglot-current-server' failed.
This failed to recognize that the file xref landed us on really is
managed by the language server that facilitated that jump.
The function w32-long-file-name seems to convert "C:/Users/" to
"c:/Users" consistently and so is a good addition to
eglot--uri-to-path.
* lisp/progmodes/eglot.el (eglot--uri-to-path): Use
w32-long-file-name.
Eli Zaretskii [Thu, 30 Mar 2023 13:34:41 +0000 (16:34 +0300)]
; Clarify documentation of 'cursor' text property
* doc/lispref/text.texi (Special Properties): Clarify that
'cursor' property is only considered when the overlay hides buffer
text on display. (Bug#62540)
Yuan Fu [Fri, 24 Mar 2023 23:45:15 +0000 (16:45 -0700)]
Add two typescript-ts-mode faces (bug#62429)
* lisp/progmodes/typescript-ts-mode.el:
(typescript-ts-mode-jsx-tag-face)
(typescript-ts-mode-jsx-attribute-face): New faces.
(typescript-ts-mode--font-lock-settings): Use new faces.
(tsx-ts-mode): Mention the new faces in the docstring.
Shynur [Wed, 29 Mar 2023 17:29:17 +0000 (01:29 +0800)]
Fix scrolling window when point moves up
This fixes the case when both 'scroll-conservatively' and
'scroll-step' are customized to non-default values.
* src/xdisp.c (try_scrolling): Fix precedence between
'scroll-step' and 'scroll-conservatively' when scrolling with
'previous-line'. (Bug#62530)
Andrea Corallo [Wed, 29 Mar 2023 16:02:30 +0000 (18:02 +0200)]
Comp fix calls to redefined primtives with op-bytecode (bug#61917)
* test/src/comp-tests.el (61917-1): New test.
* src/comp.c (syms_of_comp): New variable.
* lisp/loadup.el: Store primitive arities before dumping.
* lisp/emacs-lisp/comp.el (comp--func-arity): New function.
(comp-emit-set-call-subr): Make use of `comp--func-arity'.
Eli Zaretskii [Tue, 28 Mar 2023 18:08:12 +0000 (21:08 +0300)]
Improve documentation of 'read-choice' and related symbols
* doc/lispref/commands.texi (Reading One Event):
* lisp/subr.el (read-char-choice-use-read-key, read-char-choice)
(read-char-choice-with-read-key, y-or-n-p-use-read-key): Improve
documentation of these functions and variables.
Eli Zaretskii [Tue, 28 Mar 2023 11:08:29 +0000 (14:08 +0300)]
; Fix incompatibility in 'display-buffer-assq-regexp'
* lisp/window.el (display-buffer-assq-regexp): Make it accept a
buffer's name again, as it did in Emacs 28. This makes computing
the buffer's name inside the function unnecessary.
(display-buffer): Always pass the buffer's name to
'display-buffer-assq-regexp'. (Bug#62417)
This change makes it work again, restoring compatibility.
* lisp/subr.el (buffer-match-p): Fix and adjust docstring.
* lisp/window.el (display-buffer-alist): Adjust docstring.
(display-buffer-assq-regexp): Make good on promise of display-buffer-alist.
Dmitry Gutov [Mon, 27 Mar 2023 00:49:13 +0000 (03:49 +0300)]
ruby-ts-mode: Fix/simplify Imenu index generation
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--full-name): Drop '#'
from the end of resulting string when the node is not a method.
Support 'singleton_method' nodes.
(ruby-ts--imenu-helper): Simplify, to create a "flat" list of
entries, rather than a nested one. The previous implementation
had problems (like producing a nested structure of full-qualified
names, thus creating a lot of textual repetition), seems easier to
just follow ruby-mode's example here, at least for Emacs 29's
release.
* test/lisp/progmodes/ruby-ts-mode-tests.el (ruby-ts-imenu-index):
New test.
Ken Brown [Sat, 25 Mar 2023 20:37:51 +0000 (16:37 -0400)]
Skip failing tests on Cygwin with native compilation (bug#62450)
* test/Makefile.in (TEST_NATIVE_COMP): New variable, used to
determine whether to run tests tagged with :nativecomp. Set it to
"no" on Cygwin and to $(HAVE_NATIVE_COMP) otherwise.
* test/lisp/emacs-lisp/benchmark-tests.el (benchmark-tests): Skip
on Cygwin with native-compilation.
Eli Zaretskii [Sun, 26 Mar 2023 11:56:57 +0000 (14:56 +0300)]
; Fix last change
* lisp/net/eww.el (eww-download-directory): Rename from
'eww-default-download-directory'. All users changed. Change
:type to be a directory. Doc fix. (Bug#62435)
Phil Sainty [Sun, 14 Aug 2022 10:34:41 +0000 (22:34 +1200)]
* src/buffer.c (mode-line-format): Remove docs for obsolete %t construct
This documentation had been previously removed in 1999 in [1]
but was subsequently restored again in a different form in 2006
in [2] as the construct was still supported on some systems.
However it looks like it hasn't done what that documentation
indicated since [3] in 2011, and the final remnant of this
functionality was removed in [4] in 2013; so it seems clear that
it's no longer supported and shouldn't be documented now.
kobarity [Sat, 25 Mar 2023 13:59:05 +0000 (22:59 +0900)]
Improve indenting "case" in Python
* lisp/progmodes/python.el (python-info-dedenter-statement-p): Do not
consider the first "case" in the block as dedenter.
* test/lisp/progmodes/python-tests.el
(python-info-dedenter-opening-block-positions-7)
(python-info-dedenter-statement-p-6): New tests. (Bug#62092)
Ken Brown [Fri, 24 Mar 2023 15:35:40 +0000 (11:35 -0400)]
Fix failure of fns-tests-collate-strings on Cygwin
* test/src/fns-tests.el (fns-tests-collate-strings): Use
en_XY.UTF-8 instead of en_DE.UTF-8 as an example of an invalid
locale; en_DE.UTF-8 is actually a valid locale on Cygwin.
Note: The test will still fail on Cygwin releases < 3.5
because of a Cygwin bug. (Bug#62420)
This avoids ballooning the size of variables that contain
large text properties, such as the 'yank-handler' installed
by 'evil-yank-rectangle', which contains a list of lines in
the string.
* lisp/savehist.el (savehist-save): Enable 'print-circle'.
(Bug#62364)
Eli Zaretskii [Fri, 24 Mar 2023 11:10:30 +0000 (14:10 +0300)]
Fix system time sampling on MS-Windows
* src/timefns.c (emacs_localtime_rz) [WINDOWSNT]: Unconditionally
call tzset to make sure we pick up all the changes of time zone,
working around the MS CRT caching.
Yuan Fu [Fri, 24 Mar 2023 07:17:10 +0000 (00:17 -0700)]
Fix treesit_ensure_parsed (bug#62333)
* src/treesit.c (treesit_ensure_parsed): Check for need_reparse after
treesit_sync_visible_region runs, because as the comment says,
treesit_sync_visible_region might modify need_reparse.
Eli Zaretskii [Thu, 23 Mar 2023 09:30:19 +0000 (11:30 +0200)]
; Improve documentation of :predicate in globalized minor modes
* doc/lispref/modes.texi (Defining Minor Modes):
* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Improve documentation of the :predicate keyword in defining
globalized minor modes.
Eli Zaretskii [Thu, 23 Mar 2023 08:31:56 +0000 (10:31 +0200)]
Allow showing prefix commands in Help buffers
* lisp/help.el (describe-bindings-show-prefix-commands): New user
option.
(describe-map): Use it to decide whether to output prefix
commands. Patch by Bob Rogers <rogers@rgrjr.com>. (Bug#62279)
Daniel Martín [Sat, 18 Mar 2023 00:47:32 +0000 (01:47 +0100)]
Fix toolbar item validation in the NS port
* src/nsterm.m ([EmacsView validateToolbarItem:]): Implement this
NSToolbarItemValidation method, which is called by AppKit when it
needs to validate an image item in a toolbar. This solves, in
particular, the problem with having the "Save" icon on the tool
bar enabled at Emacs startup. (Bug#62234)
It's important for a hook in after-change-functions not to change match-data.
Otherwise it breaks functions that make changes in the buffer, such as
for example, successive calls to delete-region in smerge-keep-n, etc.
João Távora [Tue, 21 Mar 2023 09:56:30 +0000 (09:56 +0000)]
Eglot: report window/workDoneProgress capability to language server
In bug#59149, LSP progress reporting was implemented, but Eglot's
'capabilities' statement to the server wasn't changed to include
window/workDoneProgress.
Andrea Corallo [Mon, 20 Mar 2023 16:24:48 +0000 (17:24 +0100)]
Comp fix calls to redefined primtives with op-bytecode (bug#61917)
* lisp/emacs-lisp/comp.el (comp-emit-set-call-subr): Fix compilation
of calls to redefined primtives with dedicated op-bytecode.
* test/src/comp-tests.el (61917-1): New test.
João Távora [Sun, 19 Mar 2023 00:47:55 +0000 (00:47 +0000)]
Improve ergonomics of Eglot's inlay hints
Instead of deleting inlay hints instantly as soon as the affected
changes, make hint overlays span one character (instead of being
length 0). Give the overlays an "evaporate" property.
Given an inlay hints at position POS, its attached to [POS, POS+1] if
it's kind=1 (usually type hints) and [POS-1, POS] otherwise. For
kind=1 hints, the 'cursor position of the first such overlay is also
tweaked, so that's it's less akward to edit around it.