Michael Albinus [Sun, 10 Nov 2024 11:35:15 +0000 (12:35 +0100)]
Precise password cache in Tramp
* doc/misc/tramp.texi (Password handling):
Describe auth-source-cache-expiry and auth-source-do-cache instead
of password-cache-expiry and password-cache. (Bug#74105)
* lisp/net/tramp.el (tramp-read-passwd): Check for `auth-sources'
being non-nil.
Eli Zaretskii [Sun, 10 Nov 2024 09:48:34 +0000 (11:48 +0200)]
Fix picture-mode with full-width characters
* lisp/textmodes/picture.el (picture-insert): Don't rely on
'move-to-column' to move to the column that is its argument: this
might be false when full-width characters are involved.
Eli Zaretskii [Sun, 10 Nov 2024 08:56:40 +0000 (10:56 +0200)]
Fix movement to the left in picture-mode
* lisp/textmodes/picture.el (picture-insert): Measure width by
counting columns on display, not by using 'string-width', because
the latter is inaccurate when TABs are involved. (Bug#74255)
Stefan Kangas [Sun, 10 Nov 2024 00:29:18 +0000 (01:29 +0100)]
Don't pcomplete 'find -newerxy' flag
* lisp/pcmpl-gnu.el (pcomplete/find): Remove -newerxy flag.
This flag is not used verbatim like that, and we already complete
the "-newer" flag, which should be all that users need.
Problem reported by Juri Linkov <juri@linkov.net>.
Ola Nilsson [Mon, 4 Nov 2024 22:33:09 +0000 (23:33 +0100)]
Add functions supported by GNU Make 4.3.
* lisp/progmodes/make-mode.el (makefile-gnumake-functions-alist):
Add missing GNU Make functions, according to The GNU Make Manual
0.75 for GNU Make, and reorder the list of functions. (Bug#74207)
Joost Kremers [Thu, 30 May 2024 23:38:54 +0000 (01:38 +0200)]
vtable: allow resetting column alignment when table data changes
* lisp/emacs-lisp/vtable.el (vtable--compute-columns): If a column
was not created with an explicit 'align' property, allow changing
this property when the column data changes from numeric to
non-numeric (or vice versa). This makes it possible to add data to
an empty table, because in a table without data all columns are
assumed to be numeric and right-aligned. (Bug#73775)
* lisp/net/tramp.el (tramp-make-tramp-file-name): Don't call
`tramp-add-hops' during file name completion.
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory): Use `tramp-cache-undefined'
for an empty `tramp-default-proxies-alist'.
(tramp-add-hops): Extend. Remove existing entries with same
target and different proxy, if needed. (Bug#74219)
Ethan Kong [Sat, 19 Oct 2024 04:43:27 +0000 (12:43 +0800)]
Fix 'internal_equal' so that it uses at most one hash table
The old implementation passed the hash table by value in
recursive tests, which would cause each recursive level to
initialize its own hash table, causing excess memory usage.
* src/fns.c (internal_equal): Delegate to 'internal_equal_1'.
(internal_equal_1): New function; body from old 'internal_equal'.
Pass the hash table argument by reference instead of by value.
(Bug#73883)
Stephen Gildea [Fri, 8 Nov 2024 18:42:30 +0000 (10:42 -0800)]
time-stamp: minor adjustments to %P and modifier characters
* lisp/time-stamp.el (time-stamp-string-preprocess): %P variations;
allow (and ignore) "*", "E", and "O" as modifier characters.
(time-stamp-inserts-lines): safe-local-variable only if booleanp
Stefan Kangas [Fri, 8 Nov 2024 13:21:12 +0000 (14:21 +0100)]
Update special attributes for Python 3.13
* lisp/progmodes/python.el (python-font-lock-keywords-level-2)
(python--treesit-special-attributes): Update special attributes,
making it current for Python 3.13.
Robert Pluim [Thu, 7 Nov 2024 20:03:20 +0000 (21:03 +0100)]
Ensure `move-frame-functions' trigger on macOS frame resize
* src/nsterm.m ([EmacsView windowWillResize:toSize:]): Call
windowDidMove to ensure that MOVE_FRAME_EVENT events are
generated when a frame is resized. (Bug#74074)
Michael Albinus [Tue, 5 Nov 2024 14:57:42 +0000 (15:57 +0100)]
Several Tramp cleanups
* lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection):
Move setting of sentinel up.
* lisp/net/tramp-cache.el (tramp-get-connection-property)
(tramp-set-connection-property): Don't raise a debug message for
the `tramp-cache-version' key.
Cecilio Pardo [Mon, 4 Nov 2024 17:58:40 +0000 (18:58 +0100)]
Support :transform-smoothing on images (MS-Windows) (bug#57166)
* src/dispextern.h (struct image): Add field 'smoothing' for
NTGUI.
* src/image.c (image_set_transform): Assign the 'smoothing'
field of the image struct.
* src/w32gdiplus.h: Add references to more GDI+ functions.
* src/w32image.c (gdiplus_init): Add references to more GDI+
functions.
* src/w32term.c (w32_draw_image_foreground): If the image is
marked for smoothing and GDI+ is available, draw it with GDI+
bilinear interpolation.
* etc/NEWS: New entry for this change.
Stefan Kangas [Tue, 5 Nov 2024 03:19:22 +0000 (04:19 +0100)]
pcomplete/find: Support new GNU find expressions
* lisp/pcmpl-gnu.el (pcomplete/find): Add expressions from new GNU find:
"-newerxy" (4.3.3) and "-files0-from" (4.9.0). This list is now
complete as of GNU findutils 4.10.0, released on 2024-06-01.
Jim Porter [Mon, 21 Oct 2024 01:01:10 +0000 (18:01 -0700)]
Move more of Eshell range handling to the parser phase
* lisp/eshell/esh-util.el (eshell-range): New struct.
(eshell--range-string-p, eshell--string-to-range): New functions.
* lisp/eshell/esh-arg.el (eshell-parse-integer)
(eshell-parse-range-token): New functions...
(eshell-parse-argument-hook): ... add them.
(eshell--after-range-token-regexp): New defsubst.
(eshell-concat-1): Don't remove the 'number' property; we use that when
handling range arguments.
(eshell--range-token): New constant.
(eshell-unmark-range-token): New function.
* lisp/eshell/esh-var.el (eshell-parse-index): Update implementation to
use parsed range argument.
* test/lisp/eshell/esh-var-tests.el (esh-var-test/interp-var-indices):
Test range index using variables.
Cecilio Pardo [Mon, 28 Oct 2024 21:18:13 +0000 (22:18 +0100)]
Add support for 'yank-media' on MS-Windows
Adds the capacity to handle types different from strings to the
clipboard management functions on MS-Windows, and some logic
required to convert media types names and content to be what
yank-media and the modes that use it expect (bug#71909).
* lisp/term/w32-win.el (w32--selection-target-translations): New
variable that holds the name translations for media types.
(w32--translate-selection-target): New function, translate the
name of a media type.
(w32--translate-reverse-selection-target): New function, reverse
translation.
(w32--get-selection): Modified to translate target names when
asked for targets, and retrieve media types when asked for them.
(w32--mime-type-textual-p): New function, checks if a MIME type
is textual.
* lisp/textmodes/sgml-mode.el (html-mode--image-yank-handler):
Fixed the image save mechanism, that added line feed characters
on MS-Windows, breaking binary formats.
* src/w32image.c (gdiplus_init): Modified to fetch more
functions fromm gdiplus.
(get_encoder_clsid): Renamed to 'w32_gdip_get_encoder_clsid'
and made nonstatic.
(gdiplus_startup): Renamed to 'w32_gdiplus_startup' and
made nonstatic.
* src/w32select.c (stdfmt_name): Made global, was static
function.
(convert_dibv5_to_png): New function to convert DIBV5 clipboard
format to PNG.
(get_clipboard_format_name): New function get the name of a
format given its index.
(Fw32__get_clipboard_data_media): New function, retrieves and
converts media content.
(syms_of_w32select): Export new lisp functions.
* src/w32gdiplus.h: New file, for definitions in w32image.c
* doc/lispref/frames.texi: Updated with MS-Windows support.
* etc/NEWS: Added entry about new feature.
Sebastián Monía [Thu, 24 Oct 2024 17:09:11 +0000 (13:09 -0400)]
More lax doctype check in EWW (bug#73133)
The regexp to match doctype tags was simplified and will match
more legacy entries; also correct binding of 'case-fold-search'.
* lisp/net/eww.el (eww--html buffer-list): Update function.
Stephen Berman [Thu, 31 Oct 2024 09:46:27 +0000 (10:46 +0100)]
Fix bugs in dabbrev-expand (bug#74090)
* lisp/dabbrev.el (dabbrev-expand): Use the buffer where the
expansion was found when setting the internal variables used to
determine the next expansion or a replacement expansion.
* test/lisp/dabbrev-tests.el (ert-x): Require for
'ert-with-temp-directory', 'ert-resource-directory' and
'ert-resource-file'.
(with-dabbrev-test): New macro.
(dabbrev-expand-test-same-buffer-{1,2,3,4})
(dabbrev-expand-test-other-buffer-{1,2,3,4})
(dabbrev-expand-test-minibuffer-{1,2,3,4}): New tests.
* test/lisp/dabbrev-resources/dabbrev-expand.el:
* test/lisp/dabbrev-resources/INSTALL_BEGIN: New test resources.
* lisp/progmodes/c-ts-common.el:
(c-ts-common-comment-indent-new-line): Delete trailing
whitespace before inserting newline. The insert-line-break
function is the same as in c-indent-new-comment-line.
Laurence Warne [Wed, 30 Oct 2024 14:12:13 +0000 (15:12 +0100)]
Work on proced-tests.el
* test/lisp/proced-tests.el
(proced--assert-process-valid-cpu-refinement-explainer): New function
for explaining refinement test failures in greater detail.
Stefan Monnier [Tue, 29 Oct 2024 02:14:10 +0000 (22:14 -0400)]
(with-peg-rules): Fix references to rulesets (bug#74018)
PEG rules get "compiled" to functions with name `peg-rule <RULE>`.
`define-peg-ruleset` instead defines it PEG rules with name
`peg-rule <RULESET> <RULE>`, so that they can be made visible
by `with-peg-rules` simply by adding local aliases from
`peg-rule <RULE>` to `peg-rule <RULESET> <RULE>`.
Apparently when I added `define-peg-ruleset` I somehow failed to
install some of the corresponding code in `with-peg-rules`, so
the aliases were not installed, making it "impossible" to use
rulesets.
[ I still have no idea how this happened and/or where
the missing code went, so I "recreated" it. ]
* lisp/progmodes/peg.el (with-peg-rules): Install the aliases
for the rulesets.
(peg--translate-rule-body): Try and preserve
location info when emitting a warning.
* test/lisp/progmodes/peg-tests.el (peg-test-myrules): New ruleset.
(peg-test-ruleset): New test.
Laurence Warne [Sun, 27 Oct 2024 15:50:20 +0000 (16:50 +0100)]
Fix flakey proced refine tests (Bug#73441)
* test/lisp/proced-tests.el (proced-refine-test)
(proced-refine-with-update-test): Use the much simpler CPU refinement
for testing 'proced-refine'. The previous tests made the incorrect
assumption that refining on the PID of process A only filtered the
buffer to contain process A and its children, whereas in actuality
the children of process A's children, their children, and so on will
also be shown.
(proced-update-preserves-pid-at-point-test): Mark as unstable.