Eli Zaretskii [Sun, 23 Jun 2024 17:57:26 +0000 (20:57 +0300)]
; * admin/release-branch.txt: Update and fix typo.
Stefan Kangas [Sun, 23 Jun 2024 14:28:31 +0000 (16:28 +0200)]
; Fix typos
Michael Albinus [Sat, 22 Jun 2024 17:52:06 +0000 (19:52 +0200)]
Backport: Minor changes in tramp-tests.el
* test/lisp/net/tramp-tests.el (tramp--test-shell-file-name):
Use connection-local value.
(tramp--test-shell-command-switch): New defun.
(tramp-test28-process-file)
(tramp-test34-explicit-shell-file-name): Use it.
(tramp--test-supports-processes-p): Simplify.
(tramp--test-check-files): Use `tramp-compat-seq-keep'.
(tramp-test45-asynchronous-requests): Don't let-bind `shell-file-name'.
(tramp-test45-asynchronous-requests): Adjust timer.
(tramp-test45-asynchronous-requests): Add another test message.
(cherry picked from commit
c95caade15d295fa6cc31d337028faa15142b388)
Michael Albinus [Sat, 22 Jun 2024 17:49:45 +0000 (19:49 +0200)]
Backport: Tramp: Fix bug#71709, and other minor changes
* lisp/net/tramp-message.el (tramp-backtrace): Print also in batch mode.
* lisp/net/tramp.el (tramp-skeleton-file-exists-p): Check for
property only.
(tramp-skeleton-make-process): Don't set `default-directory'.
(tramp-handle-make-process): Set it. (Bug#71709)
(cherry picked from commit
8456cb9b698dfbfc90af82b3ebcd739fc22be4e4)
Eli Zaretskii [Sun, 23 Jun 2024 10:48:54 +0000 (06:48 -0400)]
New branch emacs-30
* README:
* configure.ac:
* nt/README.W32:
* etc/refcards/ru-refcard.tex:
* msdos/sed2v2.inp:
* lisp/cus-edit.el (customize-changed-options-previous-release):
Cut the emacs-30 release branch.
Eli Zaretskii [Sun, 23 Jun 2024 10:42:29 +0000 (06:42 -0400)]
* admin/admin.el: (set-version): Fix regexp for configure.ac.
Po Lu [Sun, 23 Jun 2024 08:41:36 +0000 (16:41 +0800)]
Disable Ffile_system_info for Android special directories
* src/fileio.c (Ffile_system_info): Return Qnil if FILENAME
refers to a special directory.
Martin Rudalics [Sun, 23 Jun 2024 08:26:57 +0000 (10:26 +0200)]
Fix a bug in 'switch-to-buffer'
* lisp/window.el (switch-to-buffer): When asked to switch to the
buffer of the selected window,
'switch-to-buffer-obey-display-actions' is non-nil and
'pop-to-buffer' uses the selected window, don't try to restore
window start and point from 'window-prev-buffers' (Bug#71616).
Jim Porter [Thu, 20 Jun 2024 03:59:59 +0000 (20:59 -0700)]
Fix zooming images in SHR
Previously, for images with no alt-text, the zoomed image wouldn't get
properly inserted. For images with alt-text, both the zoomed and
unzoomed image would be displayed at once (bug#71666).
* lisp/net/shr.el (shr-sliced-image): New face.
(shr-zoom-image): Reimplement using
'next/previous-single-property-change', and don't bother deleting any of
the text.
(shr-image-fetched): Clean up any overlays when deleting the old region.
(shr-put-image): Ensure we always have a non-empty string to put the
image on. For sliced images, just use "*", since we'll repeat it, so we
can't preserve the original buffer text exactly anyway. Apply an
overlay to sliced images to prevent unsightly text decorations.
(shr-tag-img): Move the placeholder space insertion where it should be
and explain what it's doing.
* test/lisp/net/shr-tests.el (shr-test--max-wait-time)
(shr-test-wait-for): New helper functions.
(shr-test/zoom-image): New test.
Eli Zaretskii [Sun, 23 Jun 2024 05:01:28 +0000 (08:01 +0300)]
; Doc fix in 'php-ts-mode'.
* lisp/progmodes/php-ts-mode.el (php-ts-mode-css-fontify-colors):
Doc fix.
Vincenzo Pupillo [Sat, 22 Jun 2024 21:11:17 +0000 (23:11 +0200)]
Colorize CSS property value like `css--fontify-region'
If the value of a property is text representing a CSS color,
it will be fontified such that its background is the color
itself. 'php-ts-mode-css-fontify-colors' can be used to
disable this behaviour.
* lisp/progmodes/php-ts-mode.el (php-ts-mode-css-fontify-colors):
New custom var.
* lisp/progmodes/php-ts-mode.el (php-ts-mode--colorize-css-value):
New function.
* lisp/progmodes/php-ts-mode.el (php-ts-mode): Use the new
function. (Bug#71724)
Eli Zaretskii [Sun, 23 Jun 2024 04:57:22 +0000 (07:57 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Po Lu [Sun, 23 Jun 2024 04:52:55 +0000 (12:52 +0800)]
* configure.ac: Disable kqueue on Haiku.
Vincenzo Pupillo [Sat, 22 Jun 2024 20:36:54 +0000 (22:36 +0200)]
Fix 'Customize' menu entry for 'php-ts-mode'
* lisp/progmodes/php-ts-mode.el (php-ts-mode-menu):
Replace menu entry with 'php-ts-mode' group. (Bug#71723)
Po Lu [Sun, 23 Jun 2024 04:49:45 +0000 (12:49 +0800)]
Fix compilation on prerelease versions of Haiku
* src/kqueue.c (Fkqueue_add_watch): Don't specify EV_ENABLE
unless it is defined.
Paul Eggert [Sun, 23 Jun 2024 00:42:04 +0000 (20:42 -0400)]
Fix FIXME in comment
* src/timefns.c (decode_float_time): Explain why the code
can use large precision here, removing a FIXME by updating
the containing comment.
Stefan Kangas [Sat, 22 Jun 2024 22:27:04 +0000 (00:27 +0200)]
Update SKK-JISYO.L from upstream
* leim/SKK-DIC/SKK-JISYO.L: Update from
https://raw.githubusercontent.com/skk-dev/dict/master/SKK-JISYO.L
Stefan Kangas [Sat, 22 Jun 2024 22:27:02 +0000 (00:27 +0200)]
Update publicsuffix.txt from upstream
* etc/publicsuffix.txt: Update from
https://publicsuffix.org/list/public_suffix_list.dat
dated 2024-06-21 13:05:36 UTC.
Stefan Kangas [Sat, 22 Jun 2024 22:16:42 +0000 (00:16 +0200)]
Add assignment form as `etc/copyright-assign.txt`
This change was discussed in:
https://lists.gnu.org/r/emacs-devel/2023-12/msg00326.html
* etc/copyright-assign.txt: New file copied from
https://www.gnu.org/s/gnulib/Copyright/request-assign.future
* doc/emacs/trouble.texi (Copyright Assignment):
* etc/TODO: Point to above new file.
Stefan Kangas [Sat, 22 Jun 2024 21:46:46 +0000 (23:46 +0200)]
; Merge from origin/emacs-29
The following commit was skipped:
0f01cb0ebd1 Bump Emacs version to 29.4.50
Stefan Kangas [Sat, 22 Jun 2024 21:42:02 +0000 (23:42 +0200)]
Bump Emacs version to 29.4.50
* README:
* configure.ac:
* etc/NEWS:
* msdos/sed2v2.inp:
* nt/README.W32: Bump Emacs version to 29.4.50.
Vincenzo Pupillo [Sat, 22 Jun 2024 14:22:16 +0000 (16:22 +0200)]
Fix for grammar change of keyword "virtual" in tree-sitter-cpp
The new rule works with both the new (>= 0.22.1) and the
old (<= 0.22.0) grammar libraries.
* lisp/progmodes/c-ts-mode.el (c-ts-mode--keywords): Removed
the keyword "virtual".
* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings):
New font lock rule. (Bug#71518)
Stefan Kangas [Sat, 22 Jun 2024 17:25:35 +0000 (19:25 +0200)]
Revert "; * etc/HISTORY: Delete never-released Emacs 28.3."
This reverts commit
ea057131220bba504d28812dc8be58007017b029.
Some GNU/Linux distros have offered Emacs 28.3 based on this tag, so
this entry should be kept.
Michael Albinus [Fri, 21 Jun 2024 13:41:19 +0000 (15:41 +0200)]
Update Tramp version (don't merge to master)
* lisp/net/trampver.el (customize-package-emacs-version-alist):
Adapt Tramp version integrated in Emacs 29.4.
Stefan Kangas [Sat, 22 Jun 2024 16:49:14 +0000 (18:49 +0200)]
Manually merge NEWS.29 from emacs-29
* etc/NEWS.29: Manually merge from etc/NEWS on the 'emacs-29' branch.
Stefan Kangas [Sat, 22 Jun 2024 16:51:29 +0000 (18:51 +0200)]
; * etc/HISTORY: Delete never-released Emacs 28.3.
Stefan Kangas [Sat, 22 Jun 2024 16:47:20 +0000 (18:47 +0200)]
Merge from origin/emacs-29
fd15d89ec51 Merge remote-tracking branch 'origin/emacs-29' into emacs-29
6a299b3cace Release Emacs 29.4
7f7b28a2500 ; Wayland SECONDARY selection problem
Stefan Kangas [Sat, 22 Jun 2024 16:47:20 +0000 (18:47 +0200)]
; Merge from origin/emacs-29
The following commits were skipped:
c0bfe429485 List Andrea Corallo as co-maintainer in ack.texi
b3d6880512f * admin/MAINTAINERS: Add myself in (co-)maintainers.
Stefan Kangas [Sat, 22 Jun 2024 16:47:18 +0000 (18:47 +0200)]
Merge from origin/emacs-29
7cc939bf27e ; * lisp/ldefs-boot.el: Regenerated for Emacs 29.4
# Conflicts:
# lisp/ldefs-boot.el
Stefan Kangas [Sat, 22 Jun 2024 16:47:18 +0000 (18:47 +0200)]
; Merge from origin/emacs-29
The following commit was skipped:
959eacc2a70 Bump Emacs version to 29.4
Stefan Kangas [Sat, 22 Jun 2024 16:44:19 +0000 (18:44 +0200)]
Merge from origin/emacs-29
9a02fce714c Update files for Emacs 29.4
d96c54d3883 * admin/authors.el: Update for Emacs 29.4
fd207432e50 * etc/NEWS: Update for Emacs 29.4
c645e1d8205 org-link-expand-abbrev: Do not evaluate arbitrary unsafe ...
Stefan Kangas [Sat, 22 Jun 2024 16:42:06 +0000 (18:42 +0200)]
Replace literal whitespace with `\s`
* test/lisp/vc/log-edit-tests.el (log-edit-fill-entry-confinement)
(log-edit-fill-entry-space-substitution)
(log-edit-fill-entry-initial-wrapping): Replace literal space character
with '\s', to avoid tripping up merge scripts.
Stefan Kangas [Sat, 22 Jun 2024 16:37:49 +0000 (18:37 +0200)]
; Merge from origin/emacs-29
The following commit was skipped:
50a237c4689 Update Tramp version (don't merge to master)
Eli Zaretskii [Sat, 22 Jun 2024 16:39:37 +0000 (19:39 +0300)]
; * lisp/editorconfig.el (editorconfig-indentation-alist): Fix :type.
Stefan Monnier [Sat, 22 Jun 2024 16:26:09 +0000 (12:26 -0400)]
Fix non-existing `editorconfig-set-indentation-python-mode`
* 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.
Stefan Kangas [Sat, 22 Jun 2024 16:21:03 +0000 (18:21 +0200)]
Merge remote-tracking branch 'origin/emacs-29' into emacs-29
Stefan Kangas [Sat, 22 Jun 2024 16:18:06 +0000 (18:18 +0200)]
Release Emacs 29.4
* ChangeLog.4:
* etc/HISTORY: Update files for Emacs 29.4.
Stefan Kangas [Sat, 22 Jun 2024 14:52:18 +0000 (16:52 +0200)]
Add before-save-hook to man page files
* doc/man/ebrowse.1:
* doc/man/emacs.1.in:
* doc/man/emacsclient.1:
* doc/man/etags.1: Add 'before-save-hook' that runs 'time-stamp' to
local variables.
Stefan Kangas [Sat, 22 Jun 2024 14:50:12 +0000 (16:50 +0200)]
Use UTC when generating man page timestamps
* 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.
Eli Zaretskii [Sat, 22 Jun 2024 12:23:18 +0000 (08:23 -0400)]
Merge from origin/emacs-29
7f7b28a2500 ; Wayland SECONDARY selection problem
Eli Zaretskii [Sat, 22 Jun 2024 12:23:18 +0000 (08:23 -0400)]
; Merge from origin/emacs-29
The following commit was skipped:
f3e80dd0f70 * admin/emacs-shell-lib: Backport to Bash 4.4 or older.
Eli Zaretskii [Sat, 22 Jun 2024 12:23:18 +0000 (08:23 -0400)]
Merge from origin/emacs-29
ce85d3811da Fix bug#49289 also for other auth-source backends
Eli Zaretskii [Sat, 22 Jun 2024 12:14:19 +0000 (15:14 +0300)]
; * src/xfns.c (unwind_create_frame): Add missing definition.
Eli Zaretskii [Sat, 22 Jun 2024 10:38:53 +0000 (13:38 +0300)]
Allow to expand truncated long lines in *Compilation* buffers
* lisp/progmodes/compile.el (compilation-button-map): Bind keys
in 'compilation-button-map' to allow expanding the truncated
text. (Bug#71683)
Troy Brown [Thu, 20 Jun 2024 00:14:07 +0000 (20:14 -0400)]
Eglot: Fix command execution (bug#71642)
* lisp/progmodes/eglot.el (eglot--lsp-interface-alist): Add
ExecuteCommandParams interface.
(eglot--execute): Fix handling of Command and CodeAction and add
ExecuteCommandParams.
Copyright-paperwork-exempt: yes
Vincenzo Pupillo [Fri, 21 Jun 2024 21:24:33 +0000 (23:24 +0200)]
Support for indentation of PHP alternative syntax control structures
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)
Eli Zaretskii [Sat, 22 Jun 2024 09:21:31 +0000 (12:21 +0300)]
; Wayland SECONDARY selection problem
* etc/PROBLEMS: Document problems with SECONDARY selection on
Wayland. (Bug#71656)
Manuel Giraud [Mon, 17 Jun 2024 09:06:28 +0000 (11:06 +0200)]
Prevent auto-revert when deleting entry (bug#71264)
* lisp/dired.el (require): Require "autorevert" for
`auto-revert-mode' usage.
(dired-internal-do-deletions): Temporarily prevent auto-revert.
Vincenzo Pupillo [Sun, 16 Jun 2024 14:32:53 +0000 (16:32 +0200)]
Fix font lock regex for user defined constant in PHP
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)
Rudolf Adamkovič [Thu, 2 May 2024 17:06:11 +0000 (19:06 +0200)]
Make Compilation mode recognize non-legacy Kotlin/Gradle errors
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.
Eli Zaretskii [Sat, 22 Jun 2024 06:01:12 +0000 (09:01 +0300)]
; Improve documentation of EditorConfig support
* doc/emacs/custom.texi (EditorConfig support): Improve wording
and indexing.
* doc/emacs/emacs.texi (Top): Update @detailmenu.
Stefan Kangas [Sat, 18 May 2024 17:14:21 +0000 (19:14 +0200)]
List Andrea Corallo as co-maintainer in ack.texi
* doc/emacs/ack.texi (Acknowledgments): List Andrea Corallo as
co-maintainer from 29.3 onwards.
Andrea Corallo [Wed, 15 May 2024 17:17:30 +0000 (19:17 +0200)]
* admin/MAINTAINERS: Add myself in (co-)maintainers.
Stefan Kangas [Sat, 22 Jun 2024 00:30:27 +0000 (02:30 +0200)]
; * lisp/ldefs-boot.el: Regenerated for Emacs 29.4
Stefan Kangas [Fri, 21 Jun 2024 23:16:59 +0000 (01:16 +0200)]
Bump Emacs version to 29.4
Stefan Kangas [Fri, 21 Jun 2024 23:13:01 +0000 (01:13 +0200)]
Update files for Emacs 29.4
* ChangeLog.4:
* etc/AUTHORS: Update for Emacs 29.4.
Stefan Kangas [Fri, 21 Jun 2024 23:06:05 +0000 (01:06 +0200)]
* admin/authors.el: Update for Emacs 29.4
Stefan Kangas [Fri, 21 Jun 2024 14:03:20 +0000 (16:03 +0200)]
* etc/NEWS: Update for Emacs 29.4
Ihor Radchenko [Fri, 21 Jun 2024 13:45:25 +0000 (15:45 +0200)]
org-link-expand-abbrev: Do not evaluate arbitrary unsafe Elisp code
* lisp/org/ol.el (org-link-expand-abbrev): Refuse expanding %(...)
link abbrevs that specify unsafe function. Instead, display a
warning, and do not expand the abbrev. Clear all the text properties
from the returned link, to avoid any potential vulnerabilities caused
by properties that may contain arbitrary Elisp.
Stefan Monnier [Fri, 21 Jun 2024 19:54:28 +0000 (15:54 -0400)]
* doc/emacs/custom.texi (Directory Variables): Add menu
Stefan Kangas [Fri, 21 Jun 2024 18:04:58 +0000 (20:04 +0200)]
Fix `emacs --geometry` flag on macOS
* lisp/startup.el (command-line-ns-option-alist): Fix --geometry
flag on macOS. (Bug#71669)
Mattias Engdegård [Fri, 21 Jun 2024 15:20:42 +0000 (17:20 +0200)]
; eliminate backslash duplicate in regexp
* lisp/editorconfig-fnmatch.el (editorconfig-fnmatch--do-translate):
Remove superfluous backslash.
Stefan Monnier [Fri, 21 Jun 2024 14:37:55 +0000 (10:37 -0400)]
* doc/emacs/custom.texi (EditorConfig support): Add URL
Stefan Monnier [Fri, 21 Jun 2024 14:07:09 +0000 (10:07 -0400)]
Merge remote-tracking branch 'origin/scratch/emacs-editorconfig'
* doc/emacs/custom.texi (EditorConfig support): New node.
* lisp/editorconfig-conf-mode.el, lisp/editorconfig-core-handle.el,
* lisp/editorconfig-core.el, lisp/editorconfig-fnmatch.el,
* lisp/editorconfig-tools.el, lisp/editorconfig.el: New files.
Michael Albinus [Fri, 21 Jun 2024 13:41:19 +0000 (15:41 +0200)]
Update Tramp version (don't merge to master)
* lisp/net/trampver.el (customize-package-emacs-version-alist):
Adapt Tramp version integrated in Emacs 29.4.
Po Lu [Fri, 21 Jun 2024 07:13:03 +0000 (15:13 +0800)]
; * src/keyboard.c (read_char): Typo in comment.
Po Lu [Fri, 21 Jun 2024 07:12:07 +0000 (15:12 +0800)]
Fix execution of tool-bar commands read within minibuffer-error-handler
* 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.
Eli Zaretskii [Fri, 21 Jun 2024 05:50:55 +0000 (08:50 +0300)]
; Avoid byte-compiler warning in comint.el
* lisp/comint.el (subr-x): Actually require it (bug#71576).
Jim Porter [Fri, 14 Jun 2024 04:26:53 +0000 (21:26 -0700)]
Ensure navigating by paragraphs in Eshell stops at prompts and paragraphs
The previous implementation in
6ae2b74ed20 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.
Jim Porter [Sat, 15 Jun 2024 18:03:33 +0000 (11:03 -0700)]
Limit the amount of text we examine when looking for password prompts
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.
Stefan Kangas [Thu, 20 Jun 2024 21:12:31 +0000 (23:12 +0200)]
* admin/emacs-shell-lib: Backport to Bash 4.4 or older.
Tomas Fabrizio Orsi [Sat, 8 Jun 2024 15:11:18 +0000 (12:11 -0300)]
Allow giving "ping" flags with `C-u M-x ping`
* 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
Juri Linkov [Thu, 20 Jun 2024 16:49:30 +0000 (19:49 +0300)]
* lisp/hi-lock.el (hi-lock-revert-buffer-rehighlight): Restore same faces.
After reverting the buffer apply all previous patterns with exactly
the same faces as were assigned to patterns before.
Stefan Kangas [Thu, 20 Jun 2024 13:59:57 +0000 (15:59 +0200)]
Fix misspelled function name in comp.c
* src/comp.c (retrieve_block): Rename from 'retrive_block'.
Update all callers.
Po Lu [Thu, 20 Jun 2024 13:29:39 +0000 (21:29 +0800)]
Fix NS build
* src/nsfns.m (Fx_create_frame, ns_create_tip_frame): Remove
references to deleted variable. (bug#71638)
Stefan Kangas [Thu, 20 Jun 2024 11:30:11 +0000 (13:30 +0200)]
Remove more references to Windows 95
* 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.
Eli Zaretskii [Thu, 20 Jun 2024 10:42:04 +0000 (13:42 +0300)]
Fix last change
* 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)
Eli Zaretskii [Thu, 20 Jun 2024 09:52:06 +0000 (12:52 +0300)]
Fix use of ':align-to' in 'wrap-prefix'
* 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'.
Po Lu [Thu, 20 Jun 2024 09:20:10 +0000 (17:20 +0800)]
* src/frame.c (gui_set_font): Reference image cache after reassignment.
Po Lu [Thu, 20 Jun 2024 09:03:54 +0000 (17:03 +0800)]
; * src/frame.c (make_frame): Typo.
Po Lu [Thu, 20 Jun 2024 09:03:36 +0000 (17:03 +0800)]
Correctly cache images when frames vary in their font metrics
* 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.
Stefan Monnier [Thu, 20 Jun 2024 02:05:36 +0000 (22:05 -0400)]
* lisp/editorconfig.el (editorconfig-version): Delete function
Better use a generic command like `C-h P` or `M-x list-packages`
which works uniformly for all packages.
Rodrigo Kassick [Wed, 19 Jun 2024 21:04:08 +0000 (23:04 +0200)]
Fix display-buffer-override-next-command (bug#71654)
* 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
Stefan Kangas [Wed, 19 Jun 2024 21:21:10 +0000 (23:21 +0200)]
Update leuven-theme to latest upstream version
* etc/themes/leuven-dark-theme.el:
* etc/themes/leuven-theme.el: Update to latest upstream version
https://github.com/fniessen/emacs-leuven-theme/ commit
a504c1d20625fe373ad5ea4ff3d94ea3706cbb87 (2024-03-30).
Philip Kaludercic [Wed, 19 Jun 2024 20:54:05 +0000 (22:54 +0200)]
* lisp/which-key.el (which-key-is-verbose): Remove unused option
Stefan Monnier [Wed, 19 Jun 2024 18:34:26 +0000 (14:34 -0400)]
Integrate feedback from Stefan Kangas and Michael Albinus
* lisp/editorconfig.el, lisp/editorconfig-tools.el, lisp/editorconfig-core.el:
* lisp/editorconfig-core-handle.el, lisp/editorconfig-conf-mode.el:
* lisp/editorconfig-fnmatch.el: Fix the reference to CONTRIBUTORS.
* doc/emacs/custom.texi (EditorConfig support):
* etc/NEWS: Improve wording and markup.
Stefan Monnier [Wed, 19 Jun 2024 18:08:35 +0000 (14:08 -0400)]
(editorconfig-indentation-alist): Sync with upstream
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`.
Stefan Monnier [Tue, 18 Jun 2024 23:00:29 +0000 (19:00 -0400)]
Add doc for EditorConfig support
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.
Stefan Monnier [Tue, 18 Jun 2024 22:16:10 +0000 (18:16 -0400)]
editorconfig-core-handle.el: Reduce allocation in parser
* 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.
Stefan Monnier [Tue, 18 Jun 2024 21:52:45 +0000 (17:52 -0400)]
editorconfig-fnmatch.el: Eliminate O(N^2) complexity
* 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.
Stefan Monnier [Tue, 18 Jun 2024 21:27:37 +0000 (17:27 -0400)]
editorconfig-core.el: Remove unneeded defaulting code
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.
Stefan Monnier [Tue, 18 Jun 2024 21:11:34 +0000 (17:11 -0400)]
editorconfig-core-handle.el: Don't use file names as glob pattern
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.
Stefan Kangas [Tue, 18 Jun 2024 19:17:21 +0000 (21:17 +0200)]
lisp/editorconfig: Minor cosmetic fixes
Stefan Monnier [Tue, 18 Jun 2024 14:51:48 +0000 (10:51 -0400)]
editorconfig.el: Miscellaneous minor changes
* 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.
Stefan Monnier [Tue, 18 Jun 2024 03:25:52 +0000 (23:25 -0400)]
lisp/editorconfig: Advise `find-auto-coding` i.s.o `insert-file-contents`
In Emacs<30, we can't use `auto-coding-functions`, but we can get
almost the same result by advising `find-auto-coding`.
* lisp/editorconfig.el (editorconfig-merge-coding-systems): Return nil
if there's no setting. Don't merge if there's no need.
(editorconfig-set-coding-system-revert); Adjust accordingly.
(editorconfig--filename-codingsystem-hash): Delete var.
(editorconfig--advice-insert-file-contents): Delete function.
(editorconfig--advice-find-file-noselect); Simplify.
(editorconfig--advice-find-auto-coding): New function.
(editorconfig-mode): Use it.
Stefan Monnier [Mon, 10 Jun 2024 21:18:13 +0000 (17:18 -0400)]
lisp/editorconfig: Use new Emacs-30 hooks
* lisp/editorconfig.el (editorconfig--get-coding-system)
(editorconfig--get-dir-local-variables): New functions.
(editorconfig-mode): Use them if possible.
(editorconfig-hack-properties-functions only)
(editorconfig-after-apply-functions): Define only when the old advice
is used, since the new hooks don't support them.
Stefan Monnier [Mon, 10 Jun 2024 20:58:27 +0000 (16:58 -0400)]
(editorconfig-set-local-variables): Get first, set later
In preparation for the use of Emacs-30's
`hack-dir-local-get-variables-functions`, split the job of
`editorconfig-set-local-variables` into getting an alist of settings
and then applying them.
Rename the `editorconfig-set-*` functions to `editorconfig--get-*`
and make them return an alist of settings rather than applying them
(except for `editorconfig-set-coding-system-revert` which arguably
belongs in `editorconfig-tools.el` anyway).
* lisp/editorconfig.el (editorconfig-indentation-alist): Flesh out the doc.
Use the new `editorconfig--get-indentation-*-mode` functions.
(editorconfig--get-indentation-web-mode): New function extracted from
`editorconfig-indentation-alist`.
(editorconfig--get-indentation-*-mode): Don't `boundp`-test the vars.
(editorconfig--default-indent-size-function): New function.
Test `boundp` here.
(editorconfig-indent-size-vars): New var.
(editorconfig--get-indentation, editorconfig--get-trailing-nl): Rewrite.
(editorconfig--add-hook-safe-p): New function.
Add it to the `safe-local-eval-function` property of `add-hook`.
(editorconfig-get-local-variables-functions): New hook.
(editorconfig--get-local-variables): Rewrite using it.
(editorconfig-set-local-variables): Test `editorconfig--should-set` here.
Rewrite it using `editorconfig--get-local-variables`.
Stefan Monnier [Wed, 12 Jun 2024 22:27:15 +0000 (18:27 -0400)]
lisp/editorconfig: Don't hook into `read-only-mode-hook`
Don't re-set variables just because `read-only-mode` is (de)activated,
and with Emacs-30's hooks it would be even less natural to do.
Also `buffer-read-only` can change without calling `read-only-mode`,
so better test it dynamically when we try to trim whitespace.
* lisp/editorconfig.el (editorconfig--delete-trailing-whitespace):
New function.
(editorconfig-set-trailing-ws): Use it. Use `pcase`.
Also prefer `before-save-hook` and use `add/remove-hook` to
manipulate hooks, like god intended.
Don't test `buffer-read-only` any more.
(editorconfig-mode): Don't hook into `read-only-mode-hook` any more.
Stefan Monnier [Wed, 12 Jun 2024 22:05:43 +0000 (18:05 -0400)]
(editorconfig--should-set): Eliminate `lisp-indent-offset` special case
Instead of treating `lisp-indent-offset` specially in
`editorconfig--should-set` (to obey `editorconfig-lisp-use-default-indent`),
use a new function `editorconfig-set-indentation-lisp-mode`
for Lisp modes.
* lisp/editorconfig.el (editorconfig--should-set): Remove `size` argument.
(editorconfig-set-indentation): Adjust calls accordingly.
(editorconfig-set-indentation-lisp-mode): New function.
(editorconfig-indentation-alist): Use it.
Stefan Monnier [Mon, 17 Jun 2024 15:04:47 +0000 (11:04 -0400)]
* lisp/editorconfig.el (editorconfig-mode): Remove `:lighter`
We generally don't want to eat up modeline space with lighters
for global and permanent major modes.