Juri Linkov [Thu, 28 Sep 2023 06:48:51 +0000 (09:48 +0300)]
Unquote #'project-uniquify-dirname-transform in uniquify-dirname-transform.
* lisp/uniquify.el (uniquify-dirname-transform): Use , on #'.
Yuan Fu [Thu, 28 Sep 2023 06:42:32 +0000 (23:42 -0700)]
; * admin/notes/tree-sitter/performance (Experiments): Update.
Yuan Fu [Thu, 28 Sep 2023 00:17:48 +0000 (17:17 -0700)]
; * lisp/treesit.el (treesit--read-major-mode): Use string-suffix-p.
Sam Steingold [Thu, 28 Sep 2023 02:33:26 +0000 (22:33 -0400)]
There are no file modes on windows and dos
* lisp/ls-lisp.el (ls-lisp-verbosity): Add `modes` on GNU & Unix
(ls-lisp-format): When `modes` is not in `ls-lisp-verbosity',
keep just the 1st character of `drwxrwxrwx`.
Po Lu [Thu, 28 Sep 2023 00:46:35 +0000 (08:46 +0800)]
Update Android port
* doc/emacs/android.texi (Android Windowing): Document
`android-keyboard-bell-duration'.
* java/org/gnu/emacs/EmacsService.java (ringBell): New argument
DURATION.
* src/android.c (android_init_emacs_service): Adjust
correspondingly.
(android_bell): Provide the duration of the vibration.
* src/androidfns.c (syms_of_androidfns)
<android_keyboard_bell_duration>: New variable.
Stefan Monnier [Wed, 27 Sep 2023 22:52:00 +0000 (18:52 -0400)]
* lisp/calendar/todo-mode.el: Let-bind `inhibit-read-only`
rather than `buffer-read-only`. Applied throughout the file.
(todo-date-pattern, todo-edit-item--header, todo-convert-legacy-date-time)
(todo-read-date): Remove redundant "" arg to `mapconcat`.
Juri Linkov [Wed, 27 Sep 2023 17:36:07 +0000 (20:36 +0300)]
* lisp/vc/diff-mode.el (diff-apply-buffer): New command (bug#66113).
(diff-mode-map): Bind 'diff-apply-buffer' to 'C-c C-m a'.
Juri Linkov [Wed, 27 Sep 2023 17:21:28 +0000 (20:21 +0300)]
New commands to show replacements as diffs (bug#65854)
* lisp/dired-aux.el (dired-do-replace-regexp-as-diff): New command.
* lisp/misearch.el (multi-file-diff-unsaved): New user option.
(multi-file-replace-as-diff): New function.
(multi-file-replace-regexp-as-diff): New command.
(replace-regexp-as-diff): New command.
(multi-file-diff-no-select): New function.
Stefan Monnier [Wed, 27 Sep 2023 17:29:50 +0000 (13:29 -0400)]
* src/regex-emacs.c (analyze_first): Fix incorrect optimization
The optimization was incorrect in a particular corner case.
In this fix I just disable it conservatively for more cases because
it's not obvious how to fix it while preserving the "good" cases.
We may find a better fix by using an approach like the one
in `mutually_exhaustive_aux`, but for now this is good enough,
especially since \{..\} repetitions are not used very frequently.
* test/src/regex-resources/PTESTS: New test.
Mattias Engdegård [Wed, 27 Sep 2023 10:41:15 +0000 (12:41 +0200)]
; * test/src/regex-emacs-tests.el: suppress relint complaints
Alan Mackenzie [Wed, 27 Sep 2023 09:54:33 +0000 (09:54 +0000)]
Revert "Don't use ellipses while cl-printing strings."
This reverts commit
761f8901fffdb155cbcc7f3b5a2329161c2c1826.
Yuan Fu [Wed, 27 Sep 2023 07:21:40 +0000 (00:21 -0700)]
Don't call font-lock-mode in treesit-major-mode-setup (bug#66223)
* lisp/treesit.el (treesit-major-mode-setup): Remove.
Wilhelm H Kirschbaum [Tue, 26 Sep 2023 19:32:40 +0000 (21:32 +0200)]
Fix treesit-langauge-at-point for elixir-ts-mode.
The treesit-language-at-point function is only suppose to query the
host language.
* lisp/progmodes/elixir-ts-mode.el
(elixir-ts--indent-rules): Add missing rules.
(elixir-ts--treesit-language-at-point): Update function to only query
the host language.
* test/lisp/progmodes/elixir-ts-mode-resources/indent.erts: Add test
for inline docs.
Yuan Fu [Wed, 27 Sep 2023 06:15:14 +0000 (23:15 -0700)]
; * lisp/treesit.el (treesit-language-at-point-function): Fix doc.
Yuan Fu [Wed, 27 Sep 2023 06:13:46 +0000 (23:13 -0700)]
Extract feature list of java-ts-mode to a variable
* lisp/progmodes/java-ts-mode.el:
(java-ts-mode--feature-list): New variable.
(java-ts-mode): Extract out.
Jim Porter [Sat, 23 Sep 2023 01:22:34 +0000 (18:22 -0700)]
Use 'unwind-protect' in more places in Eshell
This lets us simplify the logic for how we reset
'eshell-current-command' and 'eshell-last-async-procs', as well as
improving correctness of Eshell command forms in a few esoteric
scenarios. Additionally, this helps set the stage for better support
of background commands in Eshell (bug#66164).
* lisp/eshell/esh-cmd.el (eshell-cmd-initialize): Remove addition to
'eshell-post-command-hook'; this is handled in 'eshell-resume-command'
and 'eshell-resume-eval' now.
(eshell-resume-command): Handle resetting the prompt as needed.
(eshell-resume-eval): Use 'unwind-protect' to ensure that we set
'eshell-last-async-procs' and 'eshell-current-comment' at the right
times.
(eshell-parse-command, eshell-trap-errors, eshell-manipulate): Use
'unwind-protect'.
(eshell-do-eval): Allow 'eshell-defer' to pass through
'unwind-protect' forms without actually calling the unwinding forms
(yet).
* lisp/eshell/esh-proc.el (eshell-kill-process-function)
(eshell-reset-after-proc): Make obsolete. The behavior is now handled
in 'eshell-resume-command'.
(eshell-gather-process-output, eshell-sentinel)
(eshell-interrupt-process, eshell-kill-process, eshell-quit-process)
(eshell-stop-process, eshell-continue-process): Run 'eshell-kill-hook'
directly.
* test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/throw): New test.
Stefan Monnier [Tue, 26 Sep 2023 15:43:51 +0000 (11:43 -0400)]
regex.c (mutually_exclusive_p): Fix initial value of `loop_beg`
* src/regex-emacs.c (mutually_exclusive_p): Don't pretend that pattern
position 0 has been checked already.
* test/src/regex-emacs-tests.el (regexp-tests-backtrack-optimization):
Add a corresponding regression test plus some other related tests
I had around.
Mattias Engdegård [Tue, 26 Sep 2023 11:33:54 +0000 (13:33 +0200)]
; checkdoc.el: remove unnecessary regexp groups
* lisp/emacs-lisp/checkdoc.el (checkdoc-message-text-next-string):
Remove remains from when the regexp was not written in rx.
Mattias Engdegård [Tue, 26 Sep 2023 11:27:55 +0000 (13:27 +0200)]
vc-annotate.el: make a new face if it didn't exist
* lisp/vc/vc-annotate.el (vc-annotate-lines): Check whether a symbol
is a face, not just its existence. Previously we would sometimes end
up using non-faces resulting in complaints from the display system.
Basil L. Contovounesios [Tue, 26 Sep 2023 08:12:28 +0000 (10:12 +0200)]
Fix ediff-toggle-multiframe cond clauses
* lisp/vc/ediff-util.el (ediff-toggle-multiframe): Remove duplicate
cond clause. Fix parentheses so that trailing 'message' is
contained in fallback clause. Fix indentation.
Basil L. Contovounesios [Mon, 25 Sep 2023 18:38:23 +0000 (20:38 +0200)]
Address defcustom :type warnings
* lisp/calendar/diary-lib.el (diary-display-function):
* lisp/calendar/icalendar.el (icalendar-export-alarms):
* lisp/emacs-lisp/elint.el (elint-ignored-warnings):
* lisp/mail/sendmail.el (send-mail-function):
* lisp/net/gnutls.el (gnutls-verify-error):
* lisp/gnus/mm-decode.el (mm-text-html-renderer):
* lisp/gnus/message.el (message-send-mail-function): Fix misplaced
defcustom :tags (bug#66196).
(message-tool-bar): Remove duplicate, overwritten, and nonexistent
defcustom :type gmm-tool-bar-list-item.
* lisp/progmodes/idlwave.el (idlwave-begin-line-comment): Strip
excessive defcustom :type quoting.
* lisp/progmodes/ps-mode.el (ps-mode-paper-size): Consolidate paper
sizes with same dimensions into a single defcustom menu entry.
* lisp/textmodes/glyphless-mode.el (glyphless-mode-types): Remove
duplicate defcustom :type choice.
Po Lu [Tue, 26 Sep 2023 01:36:38 +0000 (09:36 +0800)]
Update Android port
* src/androidterm.c (android_draw_fringe_bitmap): Sync with
xterm.c.
Po Lu [Tue, 26 Sep 2023 01:35:51 +0000 (09:35 +0800)]
Update Android port
* src/androidterm.c (android_clip_to_row)
(android_draw_fringe_bitmap, android_draw_hollow_cursor)
(android_draw_bar_cursor): Sync with xterm.c.
* src/xterm.c (x_draw_fringe_bitmap): Delete unused variables.
Po Lu [Tue, 26 Sep 2023 01:30:04 +0000 (09:30 +0800)]
Properly clip overlaid fringe bitmaps
* src/xterm.c (x_draw_fringe_bitmap): Save clip rectangle from
x_clip_to_row, and draw only the intersection between it and the
fringe bitmap, for if the bitmap is overlaid, the clip mask will
override the clip rectangle.
(x_clip_to_row): New argument *RECT_RETURN. All callers
changed.
Basil L. Contovounesios [Fri, 22 Sep 2023 10:01:32 +0000 (12:01 +0200)]
Fix a couple of doc-view user options
* lisp/doc-view.el (doc-view-pdf->png-converter-function): Fix
placement and formatting of function-item :doc strings.
(doc-view-odf->pdf-converter-program): Ditto. Tweak initialization
logic to ensure initial value is non-nil and matches :type. Mention
preferred executable soffice first.
(doc-view-mode-p): Assume doc-view-odf->pdf-converter-program is
always non-nil.
Mattias Engdegård [Mon, 25 Sep 2023 15:19:00 +0000 (17:19 +0200)]
Use heuristic to speed up allocation of small vectors (bug#65491)
Instead of scanning vector_free_lists from the appropriate size until
we find a nonempty bucket, start at the last bucket where we last put
something in. This may favour splitting larger vectors than necessary
but in general saves a lot of time in the allocation of small vectors.
Original patch by Ihor Radchenko.
* src/alloc.c (last_inserted_vector_free_idx): New variable.
(setup_on_free_list): Set it.
(allocate_vector_from_block): Use it.
(sweep_vectors): Reset it.
Mattias Engdegård [Mon, 25 Sep 2023 14:49:29 +0000 (16:49 +0200)]
Remove useless half of vector_free_lists array (bug#65491)
The latter half of vector_free_lists was never used in any meaningful
way but it did require traversal during allocation and GC. Reduce it
to sizes we actually allocate, with a bucket for bigger ones.
* src/alloc.c (VECTOR_MAX_FREE_LIST_INDEX): Rename to...
(VECTOR_FREE_LIST_ARRAY_SIZE): ... this and adjust its value.
(vector_free_lists): Use new, smaller size.
(setup_on_free_list, allocate_vector_from_block):
Adapt to new vector_free_lists size.
(pseudovector_nbytes): New function extracted from...
(vectorlike_nbytes): ...here.
Mattias Engdegård [Mon, 25 Sep 2023 13:16:31 +0000 (15:16 +0200)]
; flymake-proc.el: move variable declarations
* lisp/progmodes/flymake-proc.el (flymake-proc--temp-source-file-name)
(flymake-proc--temp-master-file-name): Move to before first use.
Mattias Engdegård [Mon, 25 Sep 2023 12:40:11 +0000 (14:40 +0200)]
macroexp-parse-body: correct parsing of empty body (bug#66136)
* lisp/emacs-lisp/macroexp.el (macroexp-parse-body):
Return an empty body even when there are declarations present.
Previously, the last declaration was considered part of the body,
which is only correct if the input consists of a single string.
Reported by Jens Schmidt.
Stefan Monnier [Mon, 25 Sep 2023 12:02:29 +0000 (08:02 -0400)]
* lisp/faces.el (read-face-name): Expose all lambdas to the compiler
Stefan Kangas [Mon, 25 Sep 2023 09:36:14 +0000 (11:36 +0200)]
Make insert-directory-program a defcustom; use "gls" on *BSD
* lisp/files.el (insert-directory-program): Change into defcustom.
Default to "gls" on *BSD and macOS. (Bug#64791)
Po Lu [Mon, 25 Sep 2023 05:01:44 +0000 (13:01 +0800)]
Update Android port
* doc/lispref/os.texi (Desktop Notifications): Revise
documentation for android-notifications-notify to reflect
changes.
* java/org/gnu/emacs/EmacsDesktopNotification.java (display1):
Convert notification importance to a legacy priority between
Android 7.1 and 4.1.
* java/org/gnu/emacs/EmacsPixmap.java (EmacsPixmap): Remove
immutable bitmap constructor, as the underlying Android API
functions are erroneously implemented.
* src/android.c (android_init_emacs_pixmap): Cease searching for
deleted constructor.
(android_create_pixmap_from_bitmap_data): Create a pixmap, then
fill it with the contents of the bitmap, in lieu of employing
the aforementioned constructor.
* src/androidselect.c (Fandroid_notifications_notify): Revise
doc string.
Stefan Kangas [Sun, 24 Sep 2023 20:20:17 +0000 (22:20 +0200)]
Move bind-key.el from lisp/use-package directory
* lisp/use-package/bind-key.el: Move file from here...
* lisp/bind-key.el: ...to here. (Bug#62751)
Po Lu [Sun, 24 Sep 2023 10:19:38 +0000 (18:19 +0800)]
Update Android port
* java/org/gnu/emacs/EmacsSdk11Clipboard.java
(getClipboardData): Correct typo in comment.
* src/androidvfs.c (android_authority_open)
(android_saf_delete_document): Circumvent JNI dynamic method
dispatch.
João Távora [Sat, 23 Sep 2023 20:54:50 +0000 (21:54 +0100)]
Flymake: unbreak tests
Flymake's normal behaviour implies catching the errors of misbehaving
backends. This behavior is tested by Flymake's automated tests, built
on top of ERT, which means that debug-on-error is always t in the
bodies of said tests (I don't know the rationale for this, but it's
been like this for some time)
Flymake used to shun usage of 'condition-case-unless-debug' because of
this. But since that macro is pretty useful, I started using it
again, and as a consequence, tests started breaking.
The solution is to:
1. stop requiring the deprecated legacy backend 'flymake-proc' (which
by design, always errors, except in rare circumstances).
2. deliberately set debug-on-error to nil around the "dummy backends""
test.
* lisp/progmodes/flymake.el (flymake-proc): Don't require it by
default.
* test/lisp/progmodes/flymake-tests.el:
(dummy-backends): Make robust to ert's debug-on-error setting.
Stefan Kangas [Sun, 24 Sep 2023 06:25:39 +0000 (08:25 +0200)]
; Fix typos
Stefan Kangas [Sun, 24 Sep 2023 06:05:49 +0000 (08:05 +0200)]
; Normalize sort-fields-syntax-table definition
* lisp/sort.el (sort-fields-syntax-table): Normalize definition.
Stefan Kangas [Sun, 24 Sep 2023 00:52:59 +0000 (02:52 +0200)]
; Delete redundant requires from cperl-mode.el
* lisp/progmodes/cperl-mode.el: Delete redundant requires.
Eric Abrahamsen [Sat, 23 Sep 2023 22:33:53 +0000 (15:33 -0700)]
Use delete-region in Gnus message yanking
See Bug#66106
* lisp/gnus/gnus-msg.el (gnus-summary-reply): Not erase-buffer. The
intention was to narrow the buffer to the headers, and then delete
just those headers. But erase-buffer doesn't respect narrowing, so
use (delete-region (point-min) (point-max)) instead.
Eli Zaretskii [Sat, 23 Sep 2023 13:41:11 +0000 (09:41 -0400)]
; Merge from origin/emacs-29
The following commit was skipped:
ead491d2307 ; Handle authentication properly when reconnecting to IRC
Eli Zaretskii [Sat, 23 Sep 2023 13:41:11 +0000 (09:41 -0400)]
Merge from origin/emacs-29
476933b2356 ; * lisp/simple.el (shell-command-to-string): Fix quotation.
e27ec0e4144 Improve remote-file-name-inhibit-cache :type
Eli Zaretskii [Sat, 23 Sep 2023 13:41:10 +0000 (09:41 -0400)]
; Merge from origin/emacs-29
The following commit was skipped:
de50e2ad4cd Ensure bind-key is its own package
Eli Zaretskii [Sat, 23 Sep 2023 13:41:02 +0000 (09:41 -0400)]
Merge from origin/emacs-29
c966e7ec381 * lisp/net/tramp.el (tramp-skeleton-write-region): Fix mi...
a2953ea3003 Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
5cba5ee8905 Fix tree-sitter range update function
41333cb2d5f ; * etc/NEWS: Fix typos.
a3a9ed40d89 ; * CONTRIBUTE: Clarify "mark" wrt NEWS entries. (Bug#66...
0a6a9ac6f14 ; * etc/NEWS: Fix last change.
5611274bbda Announce handling 'org-protocol' URI scheme in NEWS
# Conflicts:
# lisp/treesit.el
Eli Zaretskii [Sat, 23 Sep 2023 13:32:57 +0000 (09:32 -0400)]
; Merge from origin/emacs-29
The following commit was skipped:
1500e4b4329 Make emacsclient handle org-protocol:// links
Eli Zaretskii [Sat, 23 Sep 2023 13:32:57 +0000 (09:32 -0400)]
Merge from origin/emacs-29
6bc3800000c Ensure ucs-names is consistent with Unicode names
93134bb9c2f Make key-translate actually work
85f49a9bc8b Update to Org 9.6.9
2826c26537c Add leim subdirectories to emacs package
Eli Zaretskii [Sat, 23 Sep 2023 13:32:57 +0000 (09:32 -0400)]
; Merge from origin/emacs-29
The following commit was skipped:
9aab258b80a Add missing builtin package declarations
Eli Zaretskii [Sat, 23 Sep 2023 13:32:56 +0000 (09:32 -0400)]
Merge from origin/emacs-29
71a1f0fdc9e Add more missing builtin package declarations
94705f83005 ; Fix last change in shell-command-to-string
Eli Zaretskii [Sat, 23 Sep 2023 13:32:56 +0000 (09:32 -0400)]
; Merge from origin/emacs-29
The following commit was skipped:
c3a70845736 ; * lisp/progmodes/flymake.el (flymake-mode): Fix 'cond'.
Eli Zaretskii [Sat, 23 Sep 2023 13:32:56 +0000 (09:32 -0400)]
Merge from origin/emacs-29
94bef169e2e Document shell-command-to-string security considerations
b74d9e8bad9 Fix shell-indirect-setup-hook :type (Bug#66051)
f549d4330f3 Remove column quoting from sqlite-mode
cf7efabe3ff Add indentation rules for type_arguments
Manphiz [Fri, 15 Sep 2023 07:51:57 +0000 (09:51 +0200)]
; Handle authentication properly when reconnecting to IRC
* lisp/net/rcirc.el (rcirc-reconnect): Set 'rcirc-user-authenticated'
to nil before reconnecting. (Bug#65882)
Po Lu [Sat, 23 Sep 2023 06:20:54 +0000 (14:20 +0800)]
Enlarge dumped_data
* src/w32heap.c (DUMPED_HEAP_SIZE): Increase to 24 MiB, the bare
minimum necessary to build a 32-bit Emacs.
Eli Zaretskii [Sat, 23 Sep 2023 06:09:03 +0000 (09:09 +0300)]
; * lisp/simple.el (shell-command-to-string): Fix quotation.
Po Lu [Sat, 23 Sep 2023 02:07:38 +0000 (10:07 +0800)]
Correct comparisons between size_t and ssize_t
* src/sfnt.c (sfnt_read_table_directory, sfnt_read_cmap_format_0)
(sfnt_read_cmap_format_2, sfnt_read_cmap_format_4)
(sfnt_read_cmap_format_6, sfnt_read_cmap_format_8)
(sfnt_read_cmap_format_12, sfnt_read_cmap_format_14)
(sfnt_read_cmap_table_1, sfnt_read_cmap_table)
(sfnt_read_head_table, sfnt_read_hhea_table, sfnt_read_maxp_table)
(sfnt_read_glyf_table, sfnt_read_hmtx_table, sfnt_read_name_table)
(sfnt_read_meta_table, sfnt_read_ttc_header)
(sfnt_read_default_uvs_table, sfnt_read_nondefault_uvs_table)
(sfnt_read_fvar_table, sfnt_read_gvar_table, sfnt_read_avar_table)
(sfnt_read_cvar_table, sfnt_read_OS_2_table):
* src/sfntfont.c (sfnt_enum_font): Revise code written with only
signed `long' in mind to properly compare size_t values with
ssize_t.
Po Lu [Sat, 23 Sep 2023 01:31:17 +0000 (09:31 +0800)]
Properly apply XY offsets to compound component glyphs
* src/sfnt.c (sfnt_decompose_compound_glyph): Avoid overwriting
X and Y if defer_offsets is false.
Po Lu [Sat, 23 Sep 2023 00:31:45 +0000 (08:31 +0800)]
Display background dialogs using the correct style
* java/org/gnu/emacs/EmacsDialog.java (toAlertDialog): Wrap
CONTEXT within EmacsStyle such that dialogs are displayed in the
same style used by activities.
Basil L. Contovounesios [Fri, 22 Sep 2023 09:27:29 +0000 (11:27 +0200)]
Improve remote-file-name-inhibit-cache :type
* lisp/files.el (remote-file-name-inhibit-cache)
(shell-highlight-undef-remote-file-name-inhibit-cache): Avoid
duplicated :tag string. Try to clarify wording and
formatting (bug#66150).
* lisp/shell.el (shell--highlight-undef-exec-cache): Reference
correct user option in docstring.
Philip Kaludercic [Fri, 22 Sep 2023 10:48:32 +0000 (12:48 +0200)]
File-expand DIRECTORY argument to vc-clone
* lisp/vc/vc.el (vc-clone): Expand directory to avoid issues when
invoking the subprocess. (Bug#66115)
Stefan Kangas [Fri, 22 Sep 2023 09:19:07 +0000 (11:19 +0200)]
Ensure bind-key is its own package
* lisp/finder.el (finder--builtins-alist): Remove "use-package"
directory.
* lisp/use-package/bind-key.el: Declare library as part of the
'bind-key' package.
* lisp/use-package/use-package-bind-key.el:
* lisp/use-package/use-package-core.el:
* lisp/use-package/use-package-delight.el:
* lisp/use-package/use-package-diminish.el:
* lisp/use-package/use-package-ensure-system-package.el:
* lisp/use-package/use-package-ensure.el:
* lisp/use-package/use-package-jump.el:
* lisp/use-package/use-package-lint.el: Declare library as part of the
'use-package' package. (Bug#62751)
Do not merge to master.
Po Lu [Fri, 22 Sep 2023 01:36:40 +0000 (09:36 +0800)]
Enable opening mailto URLs under Android
* doc/emacs/android.texi (Android Startup): Mention how mailto
URLs are treated by the emacsclient wrapper.
* java/AndroidManifest.xml.in: Register `mailto' scheme filters
for EmacsOpenActivity.
* java/org/gnu/emacs/EmacsOpenActivity.java (startEmacsClient):
Extract code that starts Emacs when it isn't already running,
and take a list of arguments rather than a single file name.
(onCreate): If the scheme is `mailto', escape the URI and call
`message-mailto'.
João Távora [Thu, 21 Sep 2023 21:35:05 +0000 (22:35 +0100)]
Flymake: new 'short' option for flymake-show-diagnostics-at-end-of-line
bug#66041
* lisp/progmodes/flymake.el (Version): Bump to 1.3.6
(flymake-eol-information-face): New face.
(flymake-show-diagnostics-at-end-of-line): Support new value short.
(flymake--eol-overlay-summary): Rework.
(flymake--highlight-line):
Manphiz [Fri, 15 Sep 2023 07:51:57 +0000 (09:51 +0200)]
; Handle authentication properly when reconnecting to IRC
* lisp/net/rcirc.el (rcirc-reconnect): Set 'rcirc-user-authenticated'
to nil before reconnecting. (Bug#65882)
Philip Kaludercic [Thu, 14 Sep 2023 13:09:19 +0000 (15:09 +0200)]
package-tests.el: Add test Bug#65475
* test/lisp/emacs-lisp/package-tests.el (with-package-test): Bind
package-selected-packages.
(package-test-bug65475): Add test.
Philip Kaludercic [Wed, 13 Sep 2023 09:58:22 +0000 (11:58 +0200)]
; Handle edge-case when deleting the last package
* lisp/emacs-lisp/package.el (package-delete): Rebind 'package-alist'
while calling 'package--used-elsewhere-p'. (bug#65475)
Stefan Monnier [Thu, 21 Sep 2023 15:58:44 +0000 (11:58 -0400)]
* src/regex-emacs.c (mutually_exclusive_aux) [ENABLE_CHECKING]: Fix if
Stefan Monnier [Thu, 21 Sep 2023 15:47:31 +0000 (11:47 -0400)]
regex-emacs.c (mutually_exclusive_aux): Rework again
Rework the way we handle loops. This new code does not really work
better than the previous one, but it has the advantage of being "fail
safe" and also that we can dynamically check if our assumptions about
the shape of the bytecode are satisfied or not.
* src/regex-emacs.c (mutually_exclusive_aux): Replace `done_beg` and
`done_end` with `loop_beg` and `loop_end`.
(mutually_exclusive_p): Adjust accordingly.
(analyze_first): Fix incorrect assertion.
João Távora [Thu, 21 Sep 2023 13:02:59 +0000 (14:02 +0100)]
Flymake: fix bug in end-of-line overlay updates
* lisp/progmodes/flymake.el (flymake--update-eol-overlays): Rename
from flymake--eol-overlay-update and fix.
(flymake--handle-report): Call flymake--update-eol-overlays.
Michael Albinus [Thu, 21 Sep 2023 07:21:20 +0000 (09:21 +0200)]
* lisp/net/tramp.el (tramp-skeleton-write-region): Fix missing comma.
(Bug#66123)
Gerd Möllmann [Thu, 21 Sep 2023 05:06:50 +0000 (07:06 +0200)]
macOS: only cp emacs.pdmp when installing (bug#66022)
* Makefile.in (install-arch-dep): install emacs.pdmp here for
self-contained build
* nextstep/Makefile.in (${ns_applibexecdir}/Emacs.pdmp): Don't cp
emacs.pdmp if self-contained build.
Po Lu [Thu, 21 Sep 2023 01:26:00 +0000 (09:26 +0800)]
; * src/android.c (android_damage_window): Remove unused variable.
Po Lu [Thu, 21 Sep 2023 01:13:09 +0000 (09:13 +0800)]
Update Android port
* src/android.c (android_query_tree, android_get_geometry)
(android_translate_coordinates, android_wc_lookup_string)
(android_get_keysym_name, android_browse_url)
(android_query_battery):
* src/androidmenu.c (android_dismiss_menu, android_menu_show):
Circumvent JNI dynamic method dispatch overhead.
João Távora [Thu, 21 Sep 2023 00:13:50 +0000 (01:13 +0100)]
Flymake: fix eol overlay flicker due to untimely overlay deletion
This commit helps in ensuring that `flymake--eol-overlay-update' is
only called once per cycle.
* lisp/progmodes/flymake.el (flymake--delete-overlay): Don't
delete eol overlay here.
(flymake--eol-overlay-summary): Rework again.
(flymake--eol-overlay-update): Delete eol overlay here.
(flymake-start): Make sure to set all backends reported-p to nil.
João Távora [Wed, 20 Sep 2023 23:27:07 +0000 (00:27 +0100)]
Flymake: more fixes to the end-of-line overlays
bug#66041
* lisp/progmodes/flymake.el (flymake--eol-overlay-summary): Rework.
(flymake--eol-overlay-update): Rework.
(flymake--highlight-line): Simplify.
João Távora [Wed, 20 Sep 2023 23:05:07 +0000 (00:05 +0100)]
Flymake: do use condition-case-unless-debug
The reasons previously highlighted in the FIXME either don't apply
anymore or don't outweigh the advantages of using this macro.
* lisp/progmodes/flymake.el (flymake--run-backend): Do use
condition-case-unless-debug.
João Távora [Wed, 20 Sep 2023 23:03:32 +0000 (00:03 +0100)]
Flymake: more fixes to flymake--highlight-line
Make it robust to diagonstics with invalid bounds.
* lisp/progmodes/flymake.el (flymake--highlight-line): Robustify.
João Távora [Wed, 20 Sep 2023 21:30:25 +0000 (22:30 +0100)]
Flymake: Fix bug in flymake-diagnostics
* lisp/progmodes/flymake.el (flymake-diagnostics): Fix bug.
Jim Porter [Wed, 20 Sep 2023 13:55:34 +0000 (14:55 +0100)]
Flymake: use 'compilation-info' as basis for "note" faces
bug#66041
* lisp/progmodes/flymake.el (flymake-note-echo)
(flymake-note-echo-at-eol): Inherit from 'compilation-info'.
Alan Mackenzie [Wed, 20 Sep 2023 15:51:17 +0000 (15:51 +0000)]
Insert symbol `debug' into two condition-case handlers
This fixes bug#65622. Also correct a mismatch between a
function to which advice is added, and that from which it is
removed.
* lisp/emacs-lisp/macroexp.el (internal-macroexpand-for-load):
Add a `debug' to the condition-case handler for `error', so
that a useful backtrace will be produced on a macro expansion
error.
* lisp/progmodes/elisp-mode.el (elisp--local-variables): Add
`debug' to a condition-case handler, as above. In the
advice-remove call, give the same function, macroexpand-1, as
in the corresponding advice-add call.
João Távora [Wed, 20 Sep 2023 13:45:24 +0000 (14:45 +0100)]
Flymake: fix many problems with the end-of-line overlays
bug#66041
* lisp/progmodes/flymake.el (flymake-diagnostics): Rewrite.
(flymake--really-all-overlays): Rename from flymake--overlays.
(flymake--delete-overlay): Complexify.
(flymake--highlight-line): Rework.
(flymake--handle-report): Update eol overlays
(flymake-mode): use flymake--really-all-overlays.
(flymake-after-change-function): Simplify.
(flymake-goto-next-error): Don't use flymake--overlays.
Andrea Corallo [Wed, 20 Sep 2023 10:08:02 +0000 (12:08 +0200)]
* lisp/emacs-lisp/comp.el (comp-compute-dominator-tree): Simplify.
João Távora [Wed, 20 Sep 2023 10:00:19 +0000 (11:00 +0100)]
Eglot: better consider diagnostics at point on code action requests
* lisp/progmodes/eglot.el (eglot--code-action-bounds): Rename from
eglot--code-action-bounds. Rework to consider diagnostics.
(eglot-code-actions): Use new eglot--code-action-bounds.
(eglot--code-action): Use new eglot--code-action-bounds.
* etc/EGLOT-NEWS: mention change.
GitHub-reference: https://github.com/joaotavora/eglot/discussions/1295
Mattias Engdegård [Wed, 20 Sep 2023 09:22:17 +0000 (11:22 +0200)]
Re-enable -Wswitch when building with Clang
* configure.ac (WERROR_CFLAGS): Remove -Wno-switch, inserted a decade
ago but doesn't seem to be needed now. Please tell me if you
observe otherwise.
Mattias Engdegård [Wed, 20 Sep 2023 08:34:12 +0000 (10:34 +0200)]
Reorder type tests for efficiency
* src/fns.c (Flength, Fdelete, Fnreverse):
Test types in descending order of frequency, roughly.
Mattias Engdegård [Tue, 19 Sep 2023 19:48:19 +0000 (21:48 +0200)]
* src/alloc.c: (cleanup_vector) Dispatch on pseudovector type
Enable the compiler to generate a jump table instead of a chain of
conditional branches.
Paul Eggert [Wed, 20 Sep 2023 08:04:32 +0000 (01:04 -0700)]
Fix off-by-1 typo in vadd_to_log
* src/xdisp.c (vadd_to_log): Fix off-by-1 typo that I introduced
in commit
fbee6265a72a4129d2efbf15a622b13e8b4aae9f
dated Thu Aug 13 13:48:28 2015 -0700.
Problem and fix reported by Robert Pluim (Bug#66098#11).
Juri Linkov [Tue, 19 Sep 2023 17:51:07 +0000 (20:51 +0300)]
* lisp/tab-bar.el (tab-bar-auto-width): Don't check if width changes.
Remove the condition '(< curr-width prev-width)' that was intended to check
if the width stopped to change. But actually it's not only unneeded,
but causes a bug: when the name contains a combining character, then
the width doesn't change, and the name truncation stops too early.
Juri Linkov [Tue, 19 Sep 2023 17:44:16 +0000 (20:44 +0300)]
; * tab-bar, tab-line: Use integer 1 instead of float for height em.
Mattias Engdegård [Tue, 19 Sep 2023 13:18:11 +0000 (15:18 +0200)]
Warn about duplicated :tag strings in defcustom choices
It is bad user experience when two menu items have identical labels.
* lisp/emacs-lisp/bytecomp.el (bytecomp--check-cus-type): Add check.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-test-defcustom-type): Add test case.
Mattias Engdegård [Mon, 18 Sep 2023 17:16:05 +0000 (19:16 +0200)]
Don't use pointer arithmetic for pointer tagging (bug#65491)
This makes for safer code when tagging null pointers in particular,
since pointer arithmetic on NULL is undefined and therefore can be
assumed, by the compiler, not to occur.
* src/lisp.h (untagged_ptr): Remove.
(TAG_PTR): Cast to uintptr_t instead of untagged_ptr.
Protesilaos Stavrou [Tue, 19 Sep 2023 13:03:11 +0000 (16:03 +0300)]
Update modus-themes to their version 4.3.0
* doc/misc/modus-themes.org
(Option for reloading the theme on custom change)
(Option for disabling other themes while loading Modus)
(Option for completion framework aesthetics)
(Option for org-mode block styles, Get a single color from the palette)
(Add padding to mode line, Note on SHR fonts)
(Note on goto-address-mode faces): Use correct markup for 'nil'.
(Custom Org todo keyword and priority faces): Reword statements and
update the value of sample configuration blocks.
(Use more spacious margins or padding in Emacs frames): Mention the
'spacious-padding' package on GNU ELPA.
(Full support for packages or face groups): Document newly supported
packages and remove those that are no longer covered explicitly.
(Indirectly covered packages): Note that css-mode is covered
indirectly.
(Acknowledgements): Expand list of people who have helped with the
project.
* etc/themes/modus-operandi-deuteranopia-theme.el (unless): Add
theme-autoload cookie and relevant metadata.
(modus-operandi-deuteranopia): Expand or tweak the palette, where
necessary.
* etc/themes/modus-operandi-theme.el (unless): Add theme-autoload
cookie and relevant metadata.
(modus-operandi): Expand or tweak the palette, where necessary.
* etc/themes/modus-operandi-tinted-theme.el (unless): Add
theme-autoload cookie and relevant metadata.
(modus-operandi-tinted): Expand or tweak the palette, where necessary.
* etc/themes/modus-operandi-tritanopia-theme.el (unless): Add
theme-autoload cookie and relevant metadata.
(modus-operandi-tritanopia): Expand or tweak the palette, where
necessary.
* etc/themes/modus-vivendi-deuteranopia-theme.el (unless): Add
theme-autoload cookie and relevant metadata.
(modus-vivendi-deuteranopia): Expand or tweak the palette, where
necessary.
* etc/themes/modus-vivendi-theme.el (unless): Add theme-autoload
cookie and relevant metadata.
(modus-vivendi): Expand or tweak the palette, where necessary.
* etc/themes/modus-vivendi-tinted-theme.el (unless): Add
theme-autoload cookie and relevant metadata.
(modus-vivendi-tinted): Expand or tweak the palette, where necessary.
* etc/themes/modus-vivendi-tritanopia-theme.el (unless): Add
theme-autoload cookie and relevant metadata.
(modus-vivendi-tritanopia): Expand or tweak the palette, where
necessary.
* etc/themes/modus-themes.el (modus-themes-preset-overrides-faint)
(modus-themes-preset-overrides-intense)
(modus-themes-preset-overrides-warmer): Make minor tweaks.
(modus-themes--annotate-theme, modus-themes--select-prompt)
(modus-themes--toggle-theme-p, modus-themes-toggle)
(modus-themes--list-colors-prompt, modus-themes--heading)
(modus-themes-faces): Refine internal functions.
The detailed release notes are available here:
<https://protesilaos.com/codelog/2023-09-19-modus-themes-4-3-0/>.
Eli Zaretskii [Tue, 19 Sep 2023 12:10:58 +0000 (15:10 +0300)]
Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29
Po Lu [Tue, 19 Sep 2023 11:59:21 +0000 (19:59 +0800)]
; Fix typos in last change
* src/android.c (android_exception_check_2)
(android_exception_check_3, android_exception_check_4): Fix
typos.
Po Lu [Tue, 19 Sep 2023 11:57:14 +0000 (19:57 +0800)]
Update Android port
* src/android.c (android_exception_check_1)
(android_exception_check_2, android_exception_check_3)
(android_exception_check_4): Permit each object to be NULL.
(android_browse_url): Release VALUE if an exception transpires.
Alan Mackenzie [Tue, 19 Sep 2023 10:25:34 +0000 (10:25 +0000)]
Don't use ellipses while cl-printing strings.
This fixes bug#65680. The former use of print-length as a
bound on the length of the printed string was erroneous,
causing error messages preceding backtracees to get
unnecessarily truncated to 50 characters.
* lisp/emacs-lisp/cl-print.el (cl-print-object <string>):
Remove the substitution of ellipses for long strings.
* test/lisp/emacs-lisp/cl-print-tests.el
(cl-print-tests-ellipsis-string): Remove this test.
Andrea Corallo [Tue, 19 Sep 2023 08:37:33 +0000 (10:37 +0200)]
* lisp/emacs-lisp/comp.el (comp-final1): Clean-up unused form.
Andrea Corallo [Tue, 19 Sep 2023 08:32:50 +0000 (10:32 +0200)]
* lisp/emacs-lisp/comp.el (comp-op-to-fun): Use `string-replace'.
Yuan Fu [Sat, 16 Sep 2023 16:03:16 +0000 (09:03 -0700)]
Fix tree-sitter range update function
* lisp/treesit.el (treesit-update-ranges): If an embedded language
doesn't have any range, don't set its range to nil (which means whole
buffer), instead, set its range to a dummy (1 . 1) zero range.
Yuan Fu [Tue, 19 Sep 2023 03:47:50 +0000 (20:47 -0700)]
Fix treesit--update-ranges-local
* lisp/treesit.el (treesit--update-ranges-local): Don't forget to set
local parser's range when creating it.
Jim Porter [Tue, 19 Sep 2023 01:00:07 +0000 (18:00 -0700)]
; Add debug instrumention for queueing commands in Eshell
* lisp/eshell/esh-cmd.el (eshell-eval-command): Log the new command
form.
Paul Eggert [Mon, 18 Sep 2023 21:09:24 +0000 (14:09 -0700)]
Improve XUNTAG comment
* src/lisp.h (XUNTAG): Shorten (and I hope clarify) new comment.
Mattias Engdegård [Mon, 28 Aug 2023 09:13:10 +0000 (11:13 +0200)]
Don't use pointer arithmetic for untagging Lisp values (bug#65491)
* src/lisp.h (XUNTAG):
Instead of casting a Lisp value to char * and subtracting the tag,
cast it to a suitable integral type and work on that.
This should result in identical or at least equivalent code, except
that it avoids potential problems arising from the restrictions on
pointer arithmetic in C. In particular, a null pointer can be neither
an operand in nor the result of pointer arithmetic.
C compilers know this and would, prior to this change, optimise
XUNTAG(obj, Lisp_Int0, mytype) != NULL
to 1. This means, for example, that make_pointer_integer and
XFIXNUMPTR could not be entrusted with null pointers, and
next_vector in alloc.c was unsafe to use.