Visuwesh [Fri, 29 Sep 2023 14:53:56 +0000 (20:23 +0530)]
Fix doc-view conversion indicator for svg images
* lisp/doc-view.el (doc-view-pdf->png-converter-mupdf): Show the
correct pdf->svg indicator when producing svg images. (Bug#62713)
Ivan Sokolov [Fri, 24 Mar 2023 20:27:13 +0000 (23:27 +0300)]
Sort package-selected-packages on save
Michael Albinus [Sun, 1 Oct 2023 09:28:20 +0000 (11:28 +0200)]
Some tramp-tests.el fixes
* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory):
Improve check.
(tramp--test-check-files): Don't err out when "printenv" doesn't
exist on remote side.
(tramp-test47-read-password): Remove :unstable tag.
(tramp-test47-read-otp-password): Rename.
Michael Albinus [Sun, 1 Oct 2023 09:27:41 +0000 (11:27 +0200)]
Improve handling of "--dired" in Tramp
* lisp/net/tramp-sh.el (tramp-bsd-unames): New defconst.
(tramp-sh-handle-file-ownership-preserved-p)
(tramp-open-connection-setup-interactive-shell)
(tramp-get-ls-command): Use it.
(tramp-sh-handle-insert-directory): Improve handling of "--dired".
Michael Albinus [Sun, 1 Oct 2023 09:27:01 +0000 (11:27 +0200)]
; Add missing GNU ELPA :core package statement
Po Lu [Sun, 1 Oct 2023 09:07:58 +0000 (17:07 +0800)]
Update Android port
* doc/emacs/input.texi (On-Screen Keyboards): Revise
documentation to reflect changes.
* src/keyboard.c (lispy_function_keys) <KEYCODE_DPAD_CENTER>:
Define select key absent out of negligence.
* src/xterm.c (syms_of_xterm) <x-quit-keysym>: Default to nil.
(bug#66040)
Mauro Aranda [Sat, 16 Sep 2023 21:15:40 +0000 (18:15 -0300)]
Fix indentation in perl-mode (Bug#35925)
* lisp/progmodes/perl-mode.el (perl--format-regexp): New defconst.
(perl--end-of-format-p): New function.
(perl-continuation-line-p): Use it.
(perl-calculate-indent): Use it. Make the lines of the formlist stay
at column 0.
* test/lisp/progmodes/cperl-mode-resources/cperl-bug-35925.pl: New
test file.
* test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-35925): New
test.
john muhl [Fri, 22 Sep 2023 23:36:18 +0000 (18:36 -0500)]
Various fixes to lua-ts-mode font-locking
* lisp/progmodes/lua-ts-mode.el (lua-ts--font-lock-settings):
Identify functions and assignments in more places. Use constant
face for goto/labels. (Bug#66162)
Stefan Kangas [Sat, 30 Sep 2023 23:08:17 +0000 (01:08 +0200)]
Bump buffers-menu-max-size to 15 on graphical displays
* lisp/menu-bar.el (buffers-menu-max-size): Bump default to 15 on
graphical displays. (Bug#64398)
Stefan Kangas [Sat, 30 Sep 2023 22:06:16 +0000 (00:06 +0200)]
; Add missing GNU ELPA :core package statements
* lisp/bind-key.el:
* lisp/emacs-lisp/map.el:
* lisp/erc/erc.el:
* lisp/external-completion.el:
* lisp/net/ntlm.el:
* lisp/net/soap-client.el:
* lisp/progmodes/python.el:
* lisp/svg.el:
* lisp/use-package/use-package.el: Add GNU ELPA :core package
statements.
Eli Zaretskii [Sat, 30 Sep 2023 17:54:42 +0000 (13:54 -0400)]
Merge etc/NEWS from origin/emacs-29
Eli Zaretskii [Sat, 30 Sep 2023 17:50:07 +0000 (13:50 -0400)]
Merge from origin/emacs-29
4776d90c31b Add new Tramp test
ca5b48fd76d Fix tmm-mid-prompt :type (Bug#66179)
7447d3df94e Fix tree-sitter indentation conflict with multiple languages
bee18e52737 Fix bug#66093 in Tramp
7d5fee0feaa Support regeneration of ja-dic.el under '--with-small-ja-...
Conflicts:
make-dist
Eli Zaretskii [Sat, 30 Sep 2023 17:39:09 +0000 (20:39 +0300)]
; * lisp/progmodes/elixir-ts-mode.el (treesit-node-p): Declare.
Eli Zaretskii [Sat, 30 Sep 2023 17:16:40 +0000 (20:16 +0300)]
; * src/regex-emacs.c (forall_firstchar_1): Fix compilation error.
Alan Mackenzie [Sat, 30 Sep 2023 14:32:50 +0000 (14:32 +0000)]
Complete yesterday's commit for cl-print.el
I.e. commit the needed change to the test suite.
* test/lisp/emacs-lisp/cl-print-tests.el
(cl-print-tests-ellipsis-string): Bind cl-print-string-length.
Only bind print-length and print-level where they are
specifically needed.
Stefan Monnier [Sat, 30 Sep 2023 13:42:02 +0000 (09:42 -0400)]
Merge remote-tracking branch 'refs/remotes/origin/master'
Stefan Monnier [Sat, 30 Sep 2023 13:41:35 +0000 (09:41 -0400)]
* configure.ca (open_memstream): New checked function
Po Lu [Sat, 30 Sep 2023 11:39:54 +0000 (19:39 +0800)]
Eschew non-portable constructs in configure.ac
* configure.ac (gl_gcc_warnings): Delete `test -o' and simplify
long test condition correspondingly.
Mattias Engdegård [Sat, 30 Sep 2023 08:38:48 +0000 (10:38 +0200)]
; Make configure work on Solaris after last change
* configure.ac: Solaris /bin/sh doesn't have `test -e`.
Po Lu [Sat, 30 Sep 2023 07:36:49 +0000 (15:36 +0800)]
Update Android port
* src/androidmenu.c (android_menu_show): Properly encode pane
names before deriving Java strings from them.
* src/sfntfont.c (sfnt_parse_style, sfntfont_list_1): Intern
adstyles.
Gerd Möllmann [Sat, 30 Sep 2023 05:41:19 +0000 (07:41 +0200)]
; Fix a glob in .clangd
Po Lu [Sat, 30 Sep 2023 00:30:59 +0000 (08:30 +0800)]
Fix last change
* src/search.c (Fre__describe_compiled): Correct typos and
pointer signedness missmatch.
Stefan Monnier [Fri, 29 Sep 2023 21:46:20 +0000 (17:46 -0400)]
regex.c: Remove the old analyzes functions
After testing and checking that the changes brought by the new
consolidated analysis function (which are all cases of improved
optimizations) are indeed safe, remove the old code.
* src/regex-emacs.c (analyze_first_old): Delete function.
(analyze_first): Don't call it any more.
(skip_noops): Delete function.
(mutually_exclusive_aux): Delete function.
(mutually_exclusive_p): Don't call it any more.
Stefan Monnier [Fri, 29 Sep 2023 21:39:10 +0000 (17:39 -0400)]
regex.c: Consolidate the two analysis functions
We currently have two functions that analyze the bytecode
to try and apply optimizations: `analyze_first` and `mutually_exclusive_p`.
Extract the common code between them into a new function `forall_firstchar`,
and then rewrite the old ones on top of that one.
Along the way, we get slightly better analyses that reverts
the recent de-optimizations but without re-introducing the
corresponding bugs.
* src/regex-emacs.c (forall_firstchar_1, forall_firstchar): New functions.
(analyze_first_old): Rename from `analyze_first`.
(struct anafirst_data): New struct.
(analyze_first_fastmap, analyze_first_null): New functions.
(analyze_first): Rewrite to use `forall_firstchar` with those two functions.
Take a `bufp` rather than a `multibyte` arg.
(regex_compile, re_compile_fastmap): Adjust calls accordingly.
(struct mutexcl_data): New struct.
(mutually_exclusive_one): New function.
(mutually_exclusive_p): Rewrite to use `forall_firstchar` with that function.
Stefan Monnier [Fri, 29 Sep 2023 20:41:37 +0000 (16:41 -0400)]
regex.c: Various cosmetic changes
* src/regex-emacs.c (extract_address): New function.
(skip_noops, mutually_exclusive_aux, re_match_2_internal): Use it.
(regex_compile): Fix oversight in last commit.
(analyze_first): Return a bool rather than an int.
(re_compile_fastmap): Simplify accordingly.
(re_match_2_internal): Share the common code between the fail and
success exit paths.
Stefan Monnier [Fri, 29 Sep 2023 19:22:06 +0000 (15:22 -0400)]
* src/regex-emacs.c (STORE_NUMBER): Make it a plain function
Stefan Monnier [Fri, 29 Sep 2023 18:55:24 +0000 (14:55 -0400)]
search.c (re--describe-compiled): New function (bug#66261)
This provides a fairly primitive but handy way to see what
a regexp compiles to without having to enable REGEX_EMACS_DEBUG
and wade through tons of stderr output.
* doc/lispref/searching.texi (Regexp Problems): Mention
`re--describe-compiled`.
* src/regex-emacs.c (debug_putchar, print_fastmap)
(print_partial_compiled_pattern, print_compiled_pattern): Add `dest`
argument, and compile also when `ENABLE_CHECKING` is set.
(DEBUG_PRINT_COMPILED_PATTERN, print_double_string, regex_compile):
Adjust to additional argument.
* src/regex-emacs.h (print_compiled_pattern): Declare.
* src/search.c (Fre__describe_compiled): New function.
(syms_of_search): Defsubr it.
Alan Mackenzie [Fri, 29 Sep 2023 16:14:04 +0000 (16:14 +0000)]
Stop truncating strings too much in cl-print-string-with-limit
This fixes bug#65680, by introducing a new variable limiting
the length of a printed string, rather than abusing
print-length for that purpose.
* lisp/emacs-lisp/cl-print.el (cl-print-string-length): New
variable.
(cl-print-object <string>, cl-print--string-props): Use
cl-print-string-length rather than print-length here.
(cl-print-string-with-limit): bind cl-print-string-length based
on argument `limit'. Decrement it by a quarter at each trial
iteration of printing.
Mattias Engdegård [Fri, 29 Sep 2023 15:48:09 +0000 (17:48 +0200)]
Small clean-up of byte-compile-docstring-style-warn
* lisp/emacs-lisp/bytecomp.el (byte-compile-docstring-style-warn):
Make the code slightly cheaper. It's still dominated by the
huge cost of `byte-compile--wide-docstring-p`, though.
Mattias Engdegård [Fri, 29 Sep 2023 13:00:45 +0000 (15:00 +0200)]
Include `all` in `byte-compile-warnings` defcustom type
* lisp/emacs-lisp/bytecomp.el (byte-compile-warnings):
Let "All" mean `all`, not `t`.
Mattias Engdegård [Fri, 29 Sep 2023 10:43:10 +0000 (12:43 +0200)]
Detect developer builds in git worktrees as well
* configure.ac (gcc-warnings): Don't require .git to be a directory.
If you wondered why you didn't get any warnings, this may have been
the reason.
Harald Jörg [Fri, 29 Sep 2023 14:46:23 +0000 (16:46 +0200)]
; cperl-mode-tests.el: Avoid using skip-when
* test/lisp/progmodes/cperl-mode-tests.el: Add a hint to the
commentary that the tests are intended to run on older Emacsen.
(cperl-test-bug-10483): Replace skip-when by skip-unless followed
by a negation.
(cperl-test-bug-37127): Replace skip-when by skip-unless followed
by a negation.
Alan Mackenzie [Fri, 29 Sep 2023 12:07:32 +0000 (12:07 +0000)]
CC Mode: Fix bug in whitespace scanning functions
c-forward-sws and c-backward-sws were scanning over spaces and
linefeeds marked with the string-fence syntax-table text
property. Fix this by (i) removing the WS text properties
c-in-sws and c-is-sws from characters when setting the
string-fence on them; (ii) checking the syntax of "space"
characters when scanning over them.
* lisp/progmodes/cc-defs.el (c-skip-ws-chars-forward)
c-skip-ws-chars-backward, c-put-string-fence): New macros.
* lisp/progmodes/cc-awk.el
(c-awk-set-string-regexp-syntax-table-properties): Use
c-put-string-fence.
* lisp/progmodes/cc-engine.el (c-beginning-of-statement-1):
Correct the determination of macro-start.
(c-forward-sws, c-backward-sws): Replace skip-chars-forward by
c-skip-ws-chars-forward and skip-chars-backward by
c-skip-ws-chars-backward.
(c-unmark-<>-around-region, c-after-change-unmark-ml-strings)
(c-propertize-ml-string-opener): Use c-put-string-fence.
* lisp/progmodes/cc-mode.el (c-put-syn-tab): Use
c-put-string-fence when appropriate.
Stefan Kangas [Thu, 28 Sep 2023 10:59:43 +0000 (12:59 +0200)]
; Mention 64-bit first in FAQ on large files
* doc/misc/efaq.texi (Problems with very large files): Mention
64-bit machines before 32-bit ones, as they are more common.
Eshel Yaron [Wed, 27 Sep 2023 16:27:12 +0000 (18:27 +0200)]
; Substitute quotes in obsoletion notice in 'C-h f'
* lisp/help-fns.el (help-fns--obsolete): Substitute quotes in string
arguments to 'obsolete' declarations.
* lisp/emacs-lisp/advice.el (defadvice): Markup symbols in 'obsolete'
declaration. (Bug#66240)
Stefan Kangas [Tue, 26 Sep 2023 16:42:57 +0000 (18:42 +0200)]
Simplify alist lookups in align-region
* lisp/align.el (align-region): Simplify alist lookup caching.
Juri Linkov [Thu, 28 Sep 2023 17:13:22 +0000 (20:13 +0300)]
* lisp/tab-line.el: Move Touch screen support section to the better place.
Stefan Monnier [Thu, 28 Sep 2023 16:37:44 +0000 (12:37 -0400)]
regex.c (mutually_exclusive_aux) <wordbound>: Remove optimization
Another case that was too optimistic. Better use \> or \< rather
than \b if you want your regexp to be handled efficiently.
* src/regex-emacs.c (mutually_exclusive_aux) <wordbound>: Cancel optimization.
* test/src/regex-emacs-tests.el (regexp-tests-backtrack-optimization):
New test.
Juri Linkov [Thu, 28 Sep 2023 06:53:55 +0000 (09:53 +0300)]
; * etc/NEWS: Demote outline 'describe-bindings-outline-rules' under Help.
* lisp/menu-bar.el (kill-this-buffer): Fix typo in comments.
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
Michael Albinus [Mon, 25 Sep 2023 10:48:32 +0000 (12:48 +0200)]
Add new Tramp test
* test/lisp/net/tramp-tests.el (tramp-test46-read-password):
Use `copy-tree' but `copy-sequence'.
(tramp-test46-read-otp-password): New test.
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)
Mauro Aranda [Sun, 24 Sep 2023 12:31:01 +0000 (09:31 -0300)]
Fix tmm-mid-prompt :type (Bug#66179)
* lisp/tmm.el (tmm-mid-prompt): Allow nil.
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.
Augustin Chéneau [Wed, 20 Sep 2023 10:23:22 +0000 (12:23 +0200)]
Fix tree-sitter indentation conflict with multiple languages
* lisp/treesit.el (treesit--indent-1): Use bol instead of point.
Copyright-paperwork-exempt: yes
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)
Michael Albinus [Sun, 24 Sep 2023 15:15:05 +0000 (17:15 +0200)]
Fix bug#66093 in Tramp
* lisp/net/tramp-sshfs.el (tramp-methods): Use "%a".
(tramp-sshfs-handle-process-file): Replace ?a by "-t".
* lisp/net/tramp.el (tramp-methods): Adapt docstring. (Bug#66093)
(tramp-handle-make-process): Replace ?a by "-t" if indicated.
Eli Zaretskii [Sun, 24 Sep 2023 12:30:01 +0000 (15:30 +0300)]
Support regeneration of ja-dic.el under '--with-small-ja-dic'
* lisp/international/ja-dic-cnv.el (skkdic-convert): Record the
value of SMALL_JA_DIC option used to produce ja-dic.el.
* leim/Makefile.in (small-ja-dic-option): New target, triggers
regeneration of ja-dic.el when the value of SMALL_JA_DIC option
changes by the configure script. Suggested by Ulrich Mueller
<ulm@gentoo.org>.
(${leimdir}/ja-dic/ja-dic.el): Depend on 'small-ja-dic-option'.
(Bug#66125)
* make-dist (possibly_non_vc_files):
* .gitignore: Add 'leim/small-ja-dic-option'.
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.