* lisp/editorconfig.el (editorconfig--get-indentation-python-mode):
New function.
(editorconfig-indentation-alist): Use it.
(editorconfig-indent-size-vars): Improve docstring.
(editorconfig--default-indent-size-function): Add docstring.
* doc/man/ebrowse.1:
* doc/man/emacs.1.in:
* doc/man/emacsclient.1:
* doc/man/etags.1: Add 'time-stamp-time-zone' to local variables to
prefer UTC when generating timestamp.
For some control structures, PHP provides an alternative syntax.
A new rule has been added to handle this syntax.
* lisp/progmodes/php-ts-mode.el (php-ts-mode--indent-styles):
New rule for PHP alternative syntax. (Bug#71710)
The old regex also captured functions with two or more
uppercase characters. This new regex fixes that issue.
* lisp/progmodes/php-ts-mode.el (php-ts-mode--font-lock-settings):
New regex that match only user-defined constants. (Bug#71593)
The Compilation mode recognizes Kotlin/Gradle errors but only in
the now legacy format. The current format, which has been in wide
use for about a year, is not supported. This change adds support
for the current format.
* etc/compilation.txt: (symbols): Add examples of non-legacy
Kotlin/Gradle warnings and errors.
* lisp/progmodes/compile.el: (compilation-error-regexp-alist-alist):
Rename 'gradle-kotlin' to 'gradle-kotlin-legacy' and add
'grade-kotlin' that matches the errors and warnings outputted by
the current (non-legacy) Kotlin/Gradle. (Bug#70797)
* test/lisp/progmodes/compile-tests.el
(compile-tests--test-regexps-data): Rename 'gradle-kotlin' to
'gradle-kotlin-legacy' and add two test cases for the newly added,
non-legacy Kotlin/Gradle warnings and errors.
* src/keyboard.c (read_char): Arrange that the original event be
recorded when a posn is promoted to a prefix key and an END_TIME
is suppressing additions to this_command_keys.
The previous implementation in 6ae2b74ed2 only stopped at prompts,
which isn't the right behavior (bug#61545).
* lisp/eshell/em-prompt.el (eshell-forward-paragraph)
(eshell-backward-paragraph): Reimplement to handle prompts and
paragraphs (the latter by calling the original 'forward-paragraph').
* test/lisp/eshell/em-prompt-tests.el
(em-prompt-test/next-previous-prompt/multiline): Rename.
(em-prompt-test/forward-backward-paragraph-1): New function.
(em-prompt-test/forward-backward-paragraph)
(em-prompt-test/forward-backward-paragraph/multiline): New tests.
Both Comint and Eshell do this, and it can significantly slow down
commands that write a lot of output (bug#71576).
* lisp/comint.el (comint-password-prompt-max-length): New variable...
(comint-watch-for-password-prompt): ... use it. Additionally, use the
matched result for the Emacs-based password prompt.
* lisp/eshell/esh-mode.el (eshell-password-prompt-max-length): New
variable...
(eshell-watch-for-password-prompt): ... use it.
* etc/NEWS: Announce this change.
* lisp/net/net-utils.el (ping): With a prefix argument, prompt the user
for flags to pass to the "ping" command. (Bug#71438)
* etc/NEWS: Document the above change.
Copyright-paperwork-exempt: yes
* doc/lispref/frames.texi (Window System Selections):
* doc/misc/ediff.texi (Patch and Diff Programs):
* doc/misc/efaq-w32.texi (Third-party multibyte, Swap Caps NT)
(Subprocesses and floppy drive):
* etc/PROBLEMS:
* lisp/printing.el (pr-path-alist, pr-command):
* lisp/ps-print.el: Remove more references to Windows 95, which is not
supported by Emacs.
* src/xdisp.c (handle_line_prefix): Set the 'align_visually_p'
only after pushing the iterator.
(pop_it): Reset the 'align_visually_p' flag. (Bug#71605)
* src/dispextern.h (struct it): New flag 'align_visually_p'.
* src/xdisp.c (handle_line_prefix): Set the 'align_visually_p'
flag for 'wrap-prefix'.
(produce_stretch_glyph): If 'align_visually_p' flag is set, count
the :align-to offset from the beginning of the screen line, not
from BOL. (Bug#71605)
* doc/lispref/display.texi (Truncation, Specified Space): Document
the special handling of ':align-to' in 'wrap-prefix'.
* src/alloc.c (mark_frame): Mark this frame's image cache, if it
exist.
(mark_terminals): Cease marking T->image_cache.
* src/androidfns.c (unwind_create_frame, Fx_create_frame)
(android_create_tip_frame):
* src/haikufns.c (unwind_create_frame, haiku_create_frame)
(haiku_create_tip_frame):
* src/nsfns.m (unwind_create_frame):
* src/pgtkfns.c (unwind_create_frame, Fx_create_frame)
(x_create_tip_frame):
* src/xfns.c (unwind_create_frame, Fx_create_frame)
(x_create_tip_frame):
* src/w32fns.c (unwind_create_frame, Fx_create_frame)
(w32_create_tip_frame): Remove adjustments of the frame image
cache's reference count rendered redundant by the assignment of
image caches to individual frames rather than terminals.
* src/dispextern.h (struct image_cache) <scaling_col_width>: New
field.
* src/frame.c (gui_set_font): In lieu of clearing F's image
cache unconditionally, establish whether the column width as
considered by compute_image_size has changed, and if so, adjust
or reassign the frame's image cache.
(make_frame): Clear F->image_cache.
* src/frame.h (struct frame) <image_cache>: New field.
(FRAME_IMAGE_CACHE): Return F->image_cache.
* src/image.c (make_image_cache): Clear C->scaling_col_width.
(cache_image): Adjust to new means of assigning image caches to
frames.
* src/termhooks.h (struct terminal) <image_cache>: Delete field.
* src/xfaces.c (init_frame_faces): Do image cache assignment
with all new frames.
* lisp/window.el (display-buffer-override-next-command):
display-buffer-overriding-action's car can be either a function or a
list of functions. When a function,
(push action (car display-buffer-overriding-action)) will create a
cons-cell (action . function) instead of a list. In the clear-fun
callback, trying to
(delq action (car display-buffer-overriding-action)) causes an
wrong-type-argument error.
Copyright-paperwork-exempt: yes
The upstream version `editorconfig-indentation-alist` is a lot
more complete than what we got from the
copyright-covered commits. The changes come from contributors
who (may) have not signed paperwork. I have not tracked all of
the corresponding commits (there are many) but from what I can
tell, most of those are the sole (and "trivial") contribution
of its author, and in any case there is very little creativity
involved since it just lists the variables used by the
corresponding mode, so I believe it's perfectly OK to include
those here. Many of them would be covered by our default
heuristic (which looks for vars of the form like `<mode>-basic-offset`),
but it's preferable to reduce changes with upstream.
* lisp/editorconfig.el (editorconfig-indentation-alist):
Synchronize with upstream. Remove obsolete `sh-indentation`.
(editorconfig--get-indentation-web-mode): Update based on upstream
changes to `editorconfig-indentation-alist`.
Also, remove the old `editorconfig.texi` since most of it is not
applicable to the (current) bundled version of the code anyway.
* etc/NEWS: Add entry for EditorConfig.
* doc/emacs/custom.texi (EditorConfig support): New node.
* lisp/editorconfig-core-handle.el (editorconfig-core-handle--parse-file):
Return a `editorconfig-core-handle`.
(editorconfig-core-handle): Simplify accordingly.
(editorconfig-core-handle--parse-file): Push `sections` and `props`
in reverse order to avoid the usual O(N²) complexity.
Work directly in the buffer instead of extracting "lines" from it, so
as to reduce memory allocation. Similarly, use careful regexps so we
can extract trimmed strings without an explicit trim operation.
Use `eobp`.
(editorconfig-core-handle--string-trim): Delete function, not used any more.
* lisp/editorconfig-fnmatch.el (editorconfig-fnmatch--do-translate):
Accumulate partial results in reverse order to pay a single O(N)
reverse at the end instead of N times O(N) concatenations.
This code risks setting `tab-width` even when it's not
requested, and these rules are better handled in
`editorconfig--get-indentation` in any case.
* lisp/editorconfig-core.el (editorconfig-core-get-properties):
Delete function, unused.
(editorconfig-core-get-properties-hash): Comment out defaulting code.
Match relative file names against the glob pattern instead of
trying to construct a glob pattern that matches the absolute
file name (where the code failed to escape the possible
special chars).
* lisp/editorconfig-core-handle.el
(editorconfig-core-handle-section-get-properties): Delete `dir` arg.
(editorconfig-core-handle-get-properties-hash)
(editorconfig-core-handle-get-properties): Adjust call accordingly.
Use `declare` to mark it obsolete.
(editorconfig-core-handle--fnmatch-p): Delete `dir` arg.
* lisp/editorconfig.el: Drop redundant `require`s of pcase, nadvice, rx.
Remove unnecessary (and incorrect) `defvar`s in `eval-when-compile`.
(find-library-name, lm-version): Move declarations to right after
the corresponding `require` so we have a reason to believe they're defined.
(editorconfig-version): Use `package-get-version` when available.
* lisp/editorconfig-core.el (editorconfig-core-get-nearest-editorconfig)
(editorconfig-core-get-properties, editorconfig-core-get-properties-hash):
* lisp/editorconfig-fnmatch.el (editorconfig-fnmatch-p):
Remove autoload cookies.