emacs.git
2 years agoCache UI string for channel modes in ERC
F. Jason Park [Tue, 21 Nov 2023 03:45:30 +0000 (19:45 -0800)]
Cache UI string for channel modes in ERC

* etc/ERC-NEWS: Add entry for more expansive "%m" in header line.
* lisp/erc/erc-common.el (erc--channel-mode-types): New slot
`shortargs' for caching truncated mode args.
* lisp/erc/erc.el (erc--mode-line-chanmodes-arg-len): New internal
variable for adjusting the truncation length of channel-mode arguments
as they appear in the header line.
(erc--mode-line-mode-string): New variable for caching the relevant
"modestring", if any, in ERC buffers.
(erc--process-channel-modes): Don't associate args with group 4/D,
which are all nullary modes.  This fixes a bug in which arguments were
associated with the wrong letters.  Also, set cached mode string for
channel.
(erc--user-modes): Simplify slightly by removing likely useless
variant for overloaded arg AS-TYPE.  This function is new in ERC 5.6.
(erc--channel-modes):  New function.  A higher-level getter for
current channel mode representation to complement `erc--user-modes'.
(erc--parse-user-modes): Set `erc--mode-line-mode-string in server
buffers.
(erc--handle-channel-mode): Change model to associate modes of type A
with a running plus/minus tally of state changes since joining the
channel.
(erc-update-mode-line-buffer): Use cached verbose representation of
channel or user modes instead of calling `erc-format-channel-modes'.
* test/lisp/erc/erc-tests.el (erc--update-channel-modes): Update to
reflect new running tally associations for type A modes.
(erc--channel-modes): New test.
(erc--user-modes): Update to reflect parameter simplification.
(Bug#67220)

2 years agoCC Mode: Fontify int unsigned Foo;
Alan Mackenzie [Fri, 24 Nov 2023 12:22:08 +0000 (12:22 +0000)]
CC Mode: Fontify int unsigned Foo;

This fixes bug#59953.  Foo now gets fontified when unsigned
comes after int.

* lisp/progmodes/cc-engine.el (c-forward-type): Refactor nested
`if' forms into a cond form.  Loop around matches for
c-opt-type-component-key, advancing over them.

2 years agoCC Mode: Add second anchor point to class-open and class-close
Alan Mackenzie [Fri, 24 Nov 2023 10:03:33 +0000 (10:03 +0000)]
CC Mode: Add second anchor point to class-open and class-close

This fixes the second (last) part of bug#66911.  The new second
anchor points allow the indentation of braces in template
classes to be anchored on the keyword 'class' rather than the
`template' at the beginning of the statement.

* lisp/progmodes/cc-engine.el (c-add-class-syntax): Add &rest
args parameter for additional anchor points.  Pass these to
c-add-syntax.
(c-guess-continued-construct): CASE B.1: Note return value from
c-looking-at-decl-block and pass this to c-add-syntax for a
class-open construct.
(c-guess-basic-syntax): CASE 4: Duplicate anchor position for
class-open.
(c-guess-basic-syntax): CASE 5A.2: Note return value of
c-looking-at-decl-block and pass it as extra argument to
c-add-syntax for a class-open construct.
(c-guess-basic-syntax): CASE 5G: Call c-looking-at-decl-block
to determine the second anchor point for a class-close, and
pass it to c-add-class-syntax.

* doc/misc/cc-mode.texi (Class Symbols): Document the anchor
points for class-open and class-close.

2 years agoPrevent touch screen translation from entering invalid state
Po Lu [Fri, 24 Nov 2023 02:39:49 +0000 (10:39 +0800)]
Prevent touch screen translation from entering invalid state

* lisp/subr.el (touch-screen-events-received): New variable.
(read--potential-mouse-event): If a touch screen event's been
registered thus far, continue as though xterm-mouse-mode is
enabled.

* lisp/touch-screen.el (touch-screen-handle-touch): Set that
variable.  If t-s-c-t already exists but the new touch point was
assigned the same number by the system, replace the current tool
with it rather than installing it as the anciliary tool.

2 years ago; Complete merge of emoji.el
Po Lu [Fri, 24 Nov 2023 00:45:18 +0000 (08:45 +0800)]
; Complete merge of emoji.el

* lisp/international/emoji.el (emoji-list): Import changes
from emacs-29.

2 years agoMerge from savannah/emacs-29
Po Lu [Fri, 24 Nov 2023 00:44:34 +0000 (08:44 +0800)]
Merge from savannah/emacs-29

1978b603bc3 Make python-ts-mode's syntax-highlighting more standardized
99658346d1e ; Improve documentation of desktop.el in user manual
f7dc0202127 Fix "Text is read-only" on backspacing initial Calc input
662d54775d5 Add a doc string to simple.el (bug#67355)
5a5e36d2aad ; Improve function documentation tips
86016d8ecdb Mention "visual line" in user manual
4bb65ed77a8 ; * doc/lispref/minibuf.texi (Programmed Completion): Imp...
dfb3dcb404c Allow listing Emoji from a read-only buffer

# Conflicts:
# lisp/calc/calc.el
# lisp/international/emoji.el

2 years ago; Merge from savannah/emacs-29
Po Lu [Fri, 24 Nov 2023 00:38:06 +0000 (08:38 +0800)]
; Merge from savannah/emacs-29

The following commits were skipped:

8256bf4cdfb Fix CRLF handling in Tramp (don't merge)
81b63ec032f Annotate java-ts-mode-test-movement with expected result
054202d48c3 Backport: Add more java indentation tests
d2776d8254f Backport: Add test for java indentation (bug#61115)

2 years agoMerge from savannah/emacs-29
Po Lu [Fri, 24 Nov 2023 00:38:06 +0000 (08:38 +0800)]
Merge from savannah/emacs-29

9af03e0e189 typescript-ts-mode: Support indentation for conditionals ...

2 years ago; Merge from savannah/emacs-29
Po Lu [Fri, 24 Nov 2023 00:38:05 +0000 (08:38 +0800)]
; Merge from savannah/emacs-29

The following commit was skipped:

61cdf42a48f Backport: Add some basic tests for java-ts-mode and types...

2 years agoMerge from savannah/emacs-29
Po Lu [Fri, 24 Nov 2023 00:38:03 +0000 (08:38 +0800)]
Merge from savannah/emacs-29

d72a4ed65ce Fix 'with-sqlite-transaction' when BODY fails
a7b3c923733 ; * doc/emacs/cmdargs.texi (Initial Options): Fix last ch...
fd76a80864d ; Mention that -x and --script ignore file-locals
e0469ddb9d4 ; * doc/emacs/search.texi (Special Isearch): More accurat...
e521669fb3f Fix wording in ELisp Intro manual
da946ca6924 Add missing python-ts-mode keyword (bug#67015)
0128495afde Fix string-pixel-width with global setting of display-lin...

# Conflicts:
# etc/NEWS

2 years agoMake python-ts-mode's syntax-highlighting more standardized
Dmitry Gutov [Thu, 23 Nov 2023 22:00:32 +0000 (00:00 +0200)]
Make python-ts-mode's syntax-highlighting more standardized

This was brought up in a Reddit discussion.

* lisp/progmodes/python.el (python--treesit-fontify-variable):
Use font-lock-variable-use-face (since it applies to references).
(python-ts-mode): Move 'property' from 3rd to 4th
treesit-font-lock-level.

2 years agoSupport dired-movement-style in dired-next-dirline and dired-prev-dirline
Juri Linkov [Thu, 23 Nov 2023 18:12:40 +0000 (20:12 +0200)]
Support dired-movement-style in dired-next-dirline and dired-prev-dirline

* lisp/dired.el (dired-movement-style): Mention dired-next-dirline
and dired-prev-dirline in the docstring (bug#67303).
(dired-next-line): Refactor most code to dired--move-to-next-line.
(dired--move-to-next-line): New function with code from dired-next-line.
(dired--trivial-next-dirline): Rename from dired-next-dirline.
(dired-next-dirline): New function body that uses dired-movement-style,
dired--move-to-next-line and dired--trivial-next-dirline.
(dired-prev-dirline): Mention dired-movement-style in the docstring.

2 years agoRemove spurious "nil" from Gnus mode line
Manuel Giraud [Thu, 23 Nov 2023 17:14:16 +0000 (09:14 -0800)]
Remove spurious "nil" from Gnus mode line

Bug#67322

* lisp/gnus/gnus.el (gnus-mode-line-buffer-identification): Handle a
nil return value from `gnus-emacs-version'.

2 years agoAdjust affected callers of derived-mode-p` to use the new convention
Stefan Monnier [Tue, 14 Nov 2023 00:09:17 +0000 (19:09 -0500)]
Adjust affected callers of derived-mode-p` to use the new convention

* lisp/align.el (align-rules-list): Prefer `derived-mode-p` over
`provided-mode-derived-p`.
(align--rule-should-run):
* lisp/window.el (display-buffer-reuse-mode-window):
* lisp/whitespace.el (whitespace-enable-predicate):
* lisp/transient.el (transient--do-suffix-p):
* lisp/so-long.el (so-long--set-auto-mode):
* lisp/simple.el (command-completion-with-modes-p):
* lisp/progmodes/tcl.el (tcl-current-word):
* lisp/progmodes/idlwave.el (idlwave-fix-keywords):
* lisp/progmodes/gdb-mi.el (gdb, gdb-locals-mode-map)
(gdb-registers-mode-map, gdb-function-buffer-p):
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-style-setter)
(c-ts-mode-set-style):
* lisp/progmodes/bug-reference.el (bug-reference--try-setup-gnus-article):
* lisp/help-fns.el (help-fns--list-local-commands):
* lisp/emulation/viper.el (viper-mode)
(viper-this-major-mode-requires-vi-state):
* lisp/emacs-lisp/easy-mmode.el (easy-mmode--globalized-predicate-p):
* lisp/dired.el (dired-hide-details-mode, dired-click-to-select-mode):
* lisp/calendar/todo-mode.el (todo-reset-nondiary-marker)
(todo-reset-done-string, todo-reset-comment-string):
* lisp/vc/vc.el (vc-deduce-backend): Use new calling convention for
`derived-mode-p` and `provided-mode-derived-p`.

2 years ago(derived-mode-p): Take MODES as a single argument
Stefan Monnier [Thu, 16 Nov 2023 22:21:18 +0000 (17:21 -0500)]
(derived-mode-p): Take MODES as a single argument

Looking at uses of `derived-mode-p` and `provide-mode-derived-p`,
I can't find a single use case where it wouldn't be preferable for
it to take a single argument instead of `&rest`: all the calls are
either passing a single argument anyway, or passing a fixed list of modes.
The use of `&rest` just makes the code less efficient and sometimes
more clunky (because of the need for `apply`).
So let's change that (while preserving backward compatibility, of course).

* doc/lispref/modes.texi (Derived Modes): Adjust accordingly.

* lisp/subr.el (provided-mode-derived-p, derived-mode-p): Take the
`modes` as a single argument.

2 years agoCC Mode: Handle noise clauses, template arglists in any order
Alan Mackenzie [Thu, 23 Nov 2023 16:31:52 +0000 (16:31 +0000)]
CC Mode: Handle noise clauses, template arglists in any order

This fixes the first part of bug#66911.

* lisp/progmodes/cc-engine.el (c-looking-at-decl-block): Skip
back over template arglists and noise clauses in any order, no
longer assuming the noise clauses are before the template
arglist in the buffer.  When scanning forward, take noise
clauses into account.  Refactor a collection of nested `if'
forms as a cond form.

2 years ago; Improve documentation of desktop.el in user manual
Eli Zaretskii [Thu, 23 Nov 2023 15:56:50 +0000 (17:56 +0200)]
; Improve documentation of desktop.el in user manual

* doc/emacs/misc.texi (Saving Emacs Sessions): Mention saving
minibuffer history via desktop.el.

2 years agoFix "Text is read-only" on backspacing initial Calc input
George Kuzler [Thu, 23 Nov 2023 00:45:55 +0000 (19:45 -0500)]
Fix "Text is read-only" on backspacing initial Calc input

Immediately after `calc-mode' opens the minibuffer for input
(because you typed a digit, "e", etc), pressing backspace
should clear the minibuffer and return you to the *Calculator*
buffer.  Instead, it leaves the minibuffer as-is and prints the
message "Text is read-only"; this is because the function used,
`erase-buffer', tries to erase the read-only minibuffer prompt.
Using `delete-minibuffer-contents' fixes this, since it doesn't
attempt to delete the prompt.
* lisp/calc/calc.el (calcDigit-backspace): Use
`delete-minibuffer-contents' instead of `erase-buffer'.  (Bug#67395)

Copyright-paperwork-exempt: yes

2 years agoAdd a doc string to simple.el (bug#67355)
Jeremy Bryant [Tue, 21 Nov 2023 23:27:44 +0000 (23:27 +0000)]
Add a doc string to simple.el (bug#67355)

* lisp/simple.el (kill-buffer--possibly-save): Add doc string.

2 years ago; Improve function documentation tips
Eli Zaretskii [Thu, 23 Nov 2023 15:26:09 +0000 (17:26 +0200)]
; Improve function documentation tips

* doc/lispref/tips.texi (Documentation Tips): Clarify the good
style of descriptions in doc strings.

2 years agoMention "visual line" in user manual
Eli Zaretskii [Thu, 23 Nov 2023 14:56:10 +0000 (16:56 +0200)]
Mention "visual line" in user manual

* doc/emacs/display.texi (Visual Line Mode):
* doc/emacs/basic.texi (Continuation Lines, Moving Point): Mention
"visual line".  (Bug#67382)

2 years ago; * doc/lispref/minibuf.texi (Programmed Completion): Improve indexing.
Eli Zaretskii [Thu, 23 Nov 2023 14:43:17 +0000 (16:43 +0200)]
; * doc/lispref/minibuf.texi (Programmed Completion): Improve indexing.

2 years agoAllow listing Emoji from a read-only buffer
Eli Zaretskii [Thu, 23 Nov 2023 14:07:31 +0000 (16:07 +0200)]
Allow listing Emoji from a read-only buffer

* lisp/international/emoji.el (emoji-list): Don't barf here if the
original buffer is read-inly...
(emoji-list-select): ...barf here instead.  (Bug#67400)
(emoji-list): Doc fix.

2 years ago; * src/module-env-30.h: Fix commentary
Philipp Stephani [Thu, 23 Nov 2023 12:34:47 +0000 (13:34 +0100)]
; * src/module-env-30.h: Fix commentary

2 years agoPrevent tab bar from vanishing on Android
Po Lu [Thu, 23 Nov 2023 07:05:31 +0000 (15:05 +0800)]
Prevent tab bar from vanishing on Android

* src/androidfns.c (android_change_tab_bar_height): Amend with
code absent when the function was first transcribed.

* src/haikufns.c (haiku_change_tab_bar_height):

* src/nsfns.m (ns_change_tab_bar_height):

* src/pgtkfns.c (pgtk_change_tab_bar_height):

* src/w32fns.c (w32_change_tab_bar_height):

* src/xfns.c (x_change_tab_bar_height): Revise commentary.

2 years ago; * doc/emacs/input.texi (On-Screen Keyboards): Fix typos.
Po Lu [Thu, 23 Nov 2023 00:20:51 +0000 (08:20 +0800)]
; * doc/emacs/input.texi (On-Screen Keyboards): Fix typos.

2 years ago(package-quickstart-refresh): Generate marginally more efficient code
Andrea Corallo [Wed, 22 Nov 2023 22:51:45 +0000 (17:51 -0500)]
(package-quickstart-refresh): Generate marginally more efficient code

* lisp/emacs-lisp/package.el (package-quickstart-refresh): Include
only one copy of the file names.

2 years ago* Update 'native-comp-never-optimize-functions' version
Andrea Corallo [Wed, 22 Nov 2023 15:37:16 +0000 (16:37 +0100)]
* Update 'native-comp-never-optimize-functions' version

* lisp/emacs-lisp/comp-common.el (native-comp-never-optimize-functions):
Update version.

2 years ago* configure.ac: Fix non posix (bash only) eq operator
Andrea Corallo [Wed, 22 Nov 2023 15:30:01 +0000 (16:30 +0100)]
* configure.ac: Fix non posix (bash only) eq operator

2 years agoUnify "."" and ".." handling in tramp-*-file-name-all-completions
Michael Albinus [Wed, 22 Nov 2023 12:50:06 +0000 (13:50 +0100)]
Unify ".""  and ".." handling in tramp-*-file-name-all-completions

* lisp/net/tramp-adb.el (tramp-adb-handle-file-name-all-completions):
* lisp/net/tramp-fuse.el (tramp-fuse-handle-file-name-all-completions):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-name-all-completions):
Remove special handling of "." an "..".

* lisp/net/tramp.el (tramp-skeleton-file-name-all-completions):
Handle ".""  and "..".

2 years agoFix CRLF handling in Tramp
Michael Albinus [Wed, 22 Nov 2023 12:48:57 +0000 (13:48 +0100)]
Fix CRLF handling in Tramp

* lisp/net/tramp-sh.el (tramp-send-command-and-read): Use 'space'
instead of 'blank' in rx expression, in order to handle also CR
and alike.  Reported by Dominique Quatravaux
<dominique@quatravaux.org>.

2 years agoFix CRLF handling in Tramp (don't merge)
Michael Albinus [Wed, 22 Nov 2023 12:29:19 +0000 (13:29 +0100)]
Fix CRLF handling in Tramp (don't merge)

* lisp/net/tramp-sh.el (tramp-send-command-and-read): Use 'space'
instead of 'blank' in rx expression, in order to handle also CR
and alike.  Reported by Dominique Quatravaux
<dominique@quatravaux.org>.

2 years ago; * lisp/touch-screen.el (touch-screen-handle-touch): Correct typo.
Po Lu [Wed, 22 Nov 2023 03:25:23 +0000 (11:25 +0800)]
; * lisp/touch-screen.el (touch-screen-handle-touch): Correct typo.

2 years agoUpdate touch-screen.el
Po Lu [Wed, 22 Nov 2023 03:10:13 +0000 (11:10 +0800)]
Update touch-screen.el

* lisp/touch-screen.el (touch-screen-handle-aux-point-update):
Wrap exceptionally wide form.
(touch-screen-handle-touch): Guarantee that only tools from the
same frame as the current tool will be considered ancillary
tools.  Further guarantee that normal gesture translation can
resume even if a touchscreen-end event is omitted or overlooked.

2 years agoInsert NEWS entry for native compilation changes
Po Lu [Wed, 22 Nov 2023 03:07:13 +0000 (11:07 +0800)]
Insert NEWS entry for native compilation changes

* etc/NEWS (Installation Changes in 30.1): Mention that native
compilation has been enabled by default.

2 years agoDisable native compilation in build machine Android binaries
Po Lu [Wed, 22 Nov 2023 03:00:04 +0000 (11:00 +0800)]
Disable native compilation in build machine Android binaries

* configure.ac (XCONFIGURE): Set with_native_compilation to no.

2 years agotypescript-ts-mode: Support indentation for conditionals without braces
Noah Peart [Tue, 21 Nov 2023 13:59:48 +0000 (15:59 +0200)]
typescript-ts-mode: Support indentation for conditionals without braces

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--indent-rules): Support indentation for
conditionals without braces (bug#67031).

* test/lisp/progmodes/typescript-ts-mode-resources/indent.erts
(Statement indentation without braces): New test.

2 years agoBackport: Add some basic tests for java-ts-mode and typescript-ts-mode
Theodor Thornhill [Mon, 16 Jan 2023 13:33:27 +0000 (14:33 +0100)]
Backport: Add some basic tests for java-ts-mode and typescript-ts-mode

* test/lisp/progmodes/java-ts-mode-resources/indent.erts: New file
with tests for indentation.
* test/lisp/progmodes/java-ts-mode-resources/movement.erts: New file
with tests for movement.
* test/lisp/progmodes/java-ts-mode-tests.el: New tests.
* test/lisp/progmodes/typescript-ts-mode-resources/indent.erts: New
file with tests for indentation.
* test/lisp/progmodes/typescript-ts-mode-tests.el: New tests.

(cherry picked from commit c8dd37b16c574beda900d4ee48ac7b4ab4a2ee56)

2 years agoAnnotate java-ts-mode-test-movement with expected result
Dmitry Gutov [Tue, 21 Nov 2023 14:08:09 +0000 (16:08 +0200)]
Annotate java-ts-mode-test-movement with expected result

Do not merge to master.

2 years agoBackport: Add more java indentation tests
Theodor Thornhill [Mon, 6 Feb 2023 08:36:08 +0000 (09:36 +0100)]
Backport: Add more java indentation tests

* test/lisp/progmodes/java-ts-mode-resources/indent.erts: Use default
indent offset, and tweak the indentation examples.

(cherry picked from commit dbe7803aa1e8249bd70f67f25f19aedabeb9cc22)

2 years agoBackport: Add test for java indentation (bug#61115)
Theodor Thornhill [Fri, 3 Feb 2023 08:09:49 +0000 (09:09 +0100)]
Backport: Add test for java indentation (bug#61115)

* test/lisp/progmodes/java-ts-mode-resources/indent.erts: Add new test
case.

(cherry picked from commit 229d0772e235f51812ed8020a31f9a8de366c7ba)

2 years agoFix 'with-sqlite-transaction' when BODY fails
Eli Zaretskii [Tue, 21 Nov 2023 13:36:22 +0000 (15:36 +0200)]
Fix 'with-sqlite-transaction' when BODY fails

* lisp/sqlite.el (with-sqlite-transaction): Don't commit changes
if BODY errors out.  Roll back the transaction if committing
fails.  (Bug#67142)

* etc/NEWS:
* doc/lispref/text.texi (Database): Document the error handling in
'with-sqlite-transaction'.

2 years ago; * doc/emacs/cmdargs.texi (Initial Options): Fix last change.
Eli Zaretskii [Tue, 21 Nov 2023 12:40:27 +0000 (14:40 +0200)]
; * doc/emacs/cmdargs.texi (Initial Options): Fix last change.

2 years ago; Mention that -x and --script ignore file-locals
Eli Zaretskii [Tue, 21 Nov 2023 12:23:38 +0000 (14:23 +0200)]
; Mention that -x and --script ignore file-locals

* doc/emacs/cmdargs.texi (Initial Options): Document that --script
and -x ignore file-local variables.  (Bug#67321)

2 years ago* Enable native compiler by default when libgccjit is available
Andrea Corallo [Tue, 21 Nov 2023 10:14:15 +0000 (11:14 +0100)]
* Enable native compiler by default when libgccjit is available

* configure.ac: Enable native compiler by default when libgccjit available.
(with_native_compilation): Change default to 'default'.
(libgccjit_not_found_err, libgccjit_dev_not_found_err)
(libgccjit_broken_err): Renamed.
(libgccjit_not_found, libgccjit_dev_not_found, libgccjit_broken):
New functions.

2 years agoSave more information into Android font names
Po Lu [Tue, 21 Nov 2023 06:18:04 +0000 (14:18 +0800)]
Save more information into Android font names

* src/sfntfont.c (sfntfont_open): Besides just the font file
name, also store the interpreter state, UPEM, charset and
instance number in FONT_FULLNAME_INDEX.

2 years ago; * doc/emacs/search.texi (Special Isearch): More accurate text.
Eli Zaretskii [Mon, 20 Nov 2023 19:38:55 +0000 (21:38 +0200)]
; * doc/emacs/search.texi (Special Isearch): More accurate text.

2 years agoAdd Gnus mode line logo in SVG format
Manuel Giraud [Tue, 14 Nov 2023 13:49:37 +0000 (14:49 +0100)]
Add Gnus mode line logo in SVG format

Bug#67174

* etc/images/gnus/gnus-pointer.svg: New Gnus mode line logo in SVG format.
* lisp/gnus/gnus.el (gnus-mode-line-buffer-identification): Use it.

2 years agoImprove invisibility handling in isearch-lazy-highlight (bug#40808)
Juri Linkov [Mon, 20 Nov 2023 17:57:57 +0000 (19:57 +0200)]
Improve invisibility handling in isearch-lazy-highlight (bug#40808)

* lisp/isearch.el (isearch-lazy-highlight-invisible): New variable.
(isearch-lazy-highlight-new-loop, isearch-lazy-highlight-search)
(isearch-lazy-highlight-match, isearch-lazy-highlight-buffer-update): Use it.

* lisp/replace.el (replace-highlight): Let-bind isearch-invisible
to search-invisible.

* test/lisp/isearch-tests.el (isearch--test-invisible): New test.

2 years ago; * etc/TODO: Fix punctuation.
Eli Zaretskii [Mon, 20 Nov 2023 12:45:30 +0000 (14:45 +0200)]
; * etc/TODO: Fix punctuation.

2 years ago* etc/TODO (Native compiler improvements): Add 'Diagnostic' section.
Andrea Corallo [Mon, 20 Nov 2023 09:37:04 +0000 (10:37 +0100)]
* etc/TODO (Native compiler improvements): Add 'Diagnostic' section.

2 years ago* etc/TODO (Native compiler improvements): Move old entry here.
Andrea Corallo [Mon, 20 Nov 2023 09:19:38 +0000 (10:19 +0100)]
* etc/TODO (Native compiler improvements): Move old entry here.

2 years ago* etc/TODO (Native compiler improvements): Add section.
Andrea Corallo [Mon, 20 Nov 2023 09:09:31 +0000 (10:09 +0100)]
* etc/TODO (Native compiler improvements): Add section.

2 years ago* Add 'eval' to 'native-comp-never-optimize-functions' (bug#67141)
Andrea Corallo [Mon, 20 Nov 2023 08:45:33 +0000 (09:45 +0100)]
* Add 'eval' to 'native-comp-never-optimize-functions' (bug#67141)

* lisp/emacs-lisp/comp-common.el (native-comp-never-optimize-functions):
Add 'eval'.

2 years agoForward completion text properties in 'completion-table-with-quoting'
Jim Porter [Sat, 11 Nov 2023 21:26:44 +0000 (13:26 -0800)]
Forward completion text properties in 'completion-table-with-quoting'

This fixes an issue with 'pcomplete-here-using-help', which passes
annotation strings along as text properties.  Previously, those got
clobbered when the completions got requoted (bug#67112).

* lisp/minibuffer.el (completion--twq-all): Apply text properties from
the first character of the unquoted completion to the quoted
completion.

2 years ago; * doc/emacs/emacs.texi: Add a missing menu to @detailmenu.
Eli Zaretskii [Sun, 19 Nov 2023 17:31:46 +0000 (19:31 +0200)]
; * doc/emacs/emacs.texi: Add a missing menu to @detailmenu.

2 years agoFix wording in ELisp Intro manual
Richard Stallman [Sun, 19 Nov 2023 10:14:36 +0000 (12:14 +0200)]
Fix wording in ELisp Intro manual

* doc/lispintro/emacs-lisp-intro.texi (Lisp macro): Improve
wording in description of 'unless'.  (Bug#67185)

2 years ago; Fix make-obsolete warnings in treesit.el
Eli Zaretskii [Sun, 19 Nov 2023 09:37:45 +0000 (11:37 +0200)]
; Fix make-obsolete warnings in treesit.el

* lisp/treesit.el (treesit-text-type-regexp)
(treesit-sentence-type-regexp, treesit--things-around)
(treesit-sexp-type-regexp): Fix obsolescence warnings.

2 years ago; * etc/NEWS: Fix last change.
Eli Zaretskii [Sun, 19 Nov 2023 09:08:53 +0000 (11:08 +0200)]
; * etc/NEWS: Fix last change.

2 years agoRecognize shebang lines that pass '-S/--split-string' to 'env'
Kévin Le Gouguec [Sun, 12 Nov 2023 09:55:24 +0000 (10:55 +0100)]
Recognize shebang lines that pass '-S/--split-string' to 'env'

* etc/NEWS: announce the change.

* lisp/files.el (auto-mode-interpreter-regexp): Add optional '-S'
switch to the ignored group capturing the env invocation.
Allow multiple spaces between #!, interpreter and first argument:
empirically, Linux's 'execve' accepts that.  (Bug#66902)

* test/lisp/files-tests.el (files-tests--check-shebang): New helper to
generate a temporary file with a given interpreter line, and assert
that the mode picked by 'set-auto-mode' is derived from an expected
mode.  Write the 'should' form so that failure reports include useful
context; for example:

    (ert-test-failed
     ((should
       (equal (list shebang actual-mode) (list shebang expected-mode)))
      :form
      (equal ("#!/usr/bin/env -S make -f" fundamental-mode)
     ("#!/usr/bin/env -S make -f" makefile-mode))
      :value nil :explanation
      (list-elt 1 (different-atoms fundamental-mode makefile-mode))))

* test/lisp/files-tests.el (files-tests-auto-mode-interpreter): New
test; exercise some aspects of 'interpreter-mode-alist'.

2 years ago; * doc/emacs/emacs.texi: Remove redundant menu.
Po Lu [Sun, 19 Nov 2023 04:46:21 +0000 (12:46 +0800)]
; * doc/emacs/emacs.texi: Remove redundant menu.

2 years agoProperly avoid displaying the OSK for calls to read-key-sequence
Po Lu [Sun, 19 Nov 2023 03:38:02 +0000 (11:38 +0800)]
Properly avoid displaying the OSK for calls to read-key-sequence

* lisp/touch-screen.el (touch-screen-handle-point-up): If prompt
is set, throw the input event rather than execute its command.

2 years ago; Correct typo
Po Lu [Sun, 19 Nov 2023 03:02:44 +0000 (11:02 +0800)]
; Correct typo

* doc/emacs/input.texi (Touchscreens): Use pxref where xref was
inserted by mistake.

2 years agoReorganize documentation relating to touch screens
Po Lu [Sun, 19 Nov 2023 03:00:25 +0000 (11:00 +0800)]
Reorganize documentation relating to touch screens

Chiefly, elevate it from an appendix to a node in the User Input
chapter.  I have been approached time and again with questions
from people who have not searched the appendices for such
documentation.

* doc/emacs/emacs.texi: Move Other Input below Commands in the
menu.

* doc/emacs/input.texi (Other Input Devices): Rename to Other
Input.  All callers changed.
(Touchscreens, On-Screen Keyboards): Revise and reword
documentation.  Homogenize nomenclature for on screen keyboards,
preferring "virtual keyboards" after it has been mentioned once
by the other name.

2 years ago(update_search_regs): Install better fix for bug#67124
Stefan Monnier [Sat, 18 Nov 2023 21:34:38 +0000 (16:34 -0500)]
(update_search_regs): Install better fix for bug#67124

The recent fix for the bug in `replace-match-maybe-edit`
was basically a refinement of a previously installed workaround,
whereas the bug was really in `update_search_regs`.

* src/search.c (update_search_regs): Improve handling of `start` positions.
* lisp/replace.el (replace-match-maybe-edit): Remove workaround.
* test/src/search-tests.el (search-test--replace-match-update-data): New test.

2 years agoFavor ISUPPORT params for MODE processing in ERC
F. Jason Park [Wed, 15 Nov 2023 05:10:39 +0000 (21:10 -0800)]
Favor ISUPPORT params for MODE processing in ERC

* etc/ERC-NEWS: Mention shift toward CHANMODES ISUPPORT parameter for
dictating MODE parsing behavior.
* lisp/erc/erc-backend.el (erc--init-channel-modes, erc--update-modes,
erc-set-modes, erc-update-modes): Forward declarations, the last two
being removals.
(erc-server-MODE, erc-server-221): Use `erc--update-modes' instead of
`erc-update-modes'.
(erc-server-324): Use `erc--init-channel-modes' instead of
`erc-set-modes'.
* lisp/erc/erc-common.el (erc--channel-mode-types): New struct for
stashing processed \"CHANMODES\" data for the current server.
* lisp/erc/erc.el (erc-channel-modes): Fix doc string.
(erc-set-initial-user-mode): Display a local notice when requesting
redundant user MODE operations.
(erc-set-modes, erc-parse-modes, erc-update-modes): Deprecate for
reasons explained in associated ERC-NEWS entry.
(erc--update-membership-prefix): New function, a helper for specifying
arguments to the rather unruly `erc-update-current-channel-member'.
(erc--channel-modes): New variable to record channel-mode state in a
hash table.
(erc--channel-mode-types): New variable and getter to stash
and retrieve server-local instance of the struct of the same name.
(erc--process-channel-modes): New function to parse channel-mode
changes, dispatch handlers for unary modes, and update the local
variables `erc-channel-modes' and `erc--channel-modes'.
(erc--user-modes): New local variable for remembering user modes per
server.  New function of the same name, a "getter" for the variable.
(erc--parse-user-modes): New function to parse user modes only.
(erc--update-user-modes): New function to update and sort
`erc--user-modes'.
(erc--update-channel-modes): New function to replace much of
`erc-update-modes', currently a thin wrapper around
`erc--process-channel-modes' to ensure it updates status prefixes.
(erc--update-modes): New function to call appropriate mode-updating
function for the current buffer.
(erc--init-channel-modes): New function to update channel mode letters
without status prefixes.
(erc--handle-channel-mode): New generic function, a placeholder for an
eventual API to handle specific "unary" mode letters, meaning those
that specify a single parameter for setting or unsetting.
(erc-update-channel-limit): Update doc string and answer question
posed by ancient comment.
(erc-message-english-user-mode-redundant-add,
erc-message-english-user-mode-redundant-drop): New English catalog
messages.
* test/lisp/erc/erc-scenarios-base-chan-modes.el: New file.
* test/lisp/erc/erc-tests.el (erc-parse-modes,
erc--update-channel-modes, erc--update-user-modes, erc--user-modes,
erc--parse-user-modes): New tests.
* test/lisp/erc/resources/base/modes/chan-changed.eld: New test data
file.  (Bug#67220)

2 years agoUse caching variant of erc-parse-prefix internally
F. Jason Park [Tue, 14 Nov 2023 02:24:59 +0000 (18:24 -0800)]
Use caching variant of erc-parse-prefix internally

* lisp/erc/erc-common.el (erc--parsed-prefix): New struct to help with
tasks that depends on the advertised "PREFIX" parameter.
* lisp/erc/erc.el (erc-parse-prefix): Rework slightly for readability.
(erc--parsed-prefix): New variable and function of the same name for
caching the reversed result of `erc-parse-prefix' locally per server.
(erc-channel-receive-names): Use value stored in `erc--parsed-prefix'.
* test/lisp/erc/erc-tests.el (erc-with-server-buffer): Only activate
spy around actual test case forms.
(erc--parse-prefix): New test.  (Bug#67220)

2 years agoSimplify ISUPPORT-derived data wrangling in ERC
F. Jason Park [Tue, 14 Nov 2023 02:24:59 +0000 (18:24 -0800)]
Simplify ISUPPORT-derived data wrangling in ERC

* lisp/erc/erc-backend.el (erc--get-isupport-entry): Check server
buffer for `erc-server-parameters' when (re)initializing value.  This
function was previously unreliable from a target buffer on cache
misses.
(erc--with-isupport-data): New macro for accessing and caching data
derived from an ISUPPORT parameter.  Late-arriving params break the
cache.
(erc-server-005): Rewrite pattern as `rx' form, factoring out bol/eol.
* lisp/erc/erc-common.el (erc--isupport-data): New struct to be
subclassed for storing cached ISUPPORT-derived data.
* test/lisp/erc/erc-scenarios-display-message.el: Remove stray
`require'.  (Bug#67220)

2 years agoAdd test for erc-cmd-SQUERY
F. Jason Park [Fri, 17 Nov 2023 21:26:00 +0000 (13:26 -0800)]
Add test for erc-cmd-SQUERY

* lisp/erc/erc-backend.el (erc-message): Revise doc string.
* test/lisp/erc/erc-scenarios-base-misc-regressions.el (erc-cmd-MOTD):
Move test to another file specifically for slash commands.
* test/lisp/erc/erc-scenarios-misc-commands.el: New file.
* test/lisp/erc/resources/base/commands/motd.eld: Move file elsewhere.
* test/lisp/erc/resources/commands/motd.eld: "New" file, moved here
reusing the same Git blob from now deleted subdir base/commands.
* test/lisp/erc/resources/commands/squery.eld: New file.  (Bug#67209)

2 years agoFix command-line parsing for erc-cmd-SQUERY
Osmo Karppinen [Fri, 17 Nov 2023 10:31:50 +0000 (12:31 +0200)]
Fix command-line parsing for erc-cmd-SQUERY

* lisp/erc/erc.el (erc-cmd-SQUERY): Set symbol property
`do-not-parse-args' to t so additional command-line arguments aren't
parsed but rather included as part of the function's lone (raw) LINE
parameter.  (Bug#67209)

Copyright-paperwork-exempt: yes

2 years agoAdd missing python-ts-mode keyword (bug#67015)
Yuan Fu [Sat, 18 Nov 2023 19:01:08 +0000 (11:01 -0800)]
Add missing python-ts-mode keyword (bug#67015)

* lisp/progmodes/python.el (python--treesit-keywords): Add "not in".

2 years agoFix string-pixel-width with global setting of display-line-numbers
Dmitry Gutov [Sat, 18 Nov 2023 16:35:18 +0000 (18:35 +0200)]
Fix string-pixel-width with global setting of display-line-numbers

* lisp/emacs-lisp/subr-x.el (string-pixel-width):
Instead of checking for display-line-numbers-mode, set the
display-line-numbers variable to nil (bug#67248).

2 years agoMinor Tramp optimization
Michael Albinus [Sat, 18 Nov 2023 13:39:16 +0000 (14:39 +0100)]
Minor Tramp optimization

* lisp/net/tramp.el (tramp-skeleton-file-truename)
(tramp-skeleton-write-region, tramp-handle-file-truename):
* lisp/net/tramp-integration.el (tramp-eshell-directory-change)
(tramp-recentf-exclude-predicate):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-file):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file):
Use `tramp-tramp-file-p' instead of `file-remote-p'.

2 years agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 18 Nov 2023 11:07:48 +0000 (06:07 -0500)]
Merge from origin/emacs-29

d9e43f2197f Document changes in 'edmacro-parse-keys'
3327f36ad95 Add 2 SQLite extensions to allow-list.
8d2012024de * test/lisp/net/tramp-tests.el (tramp--test-timeout-handl...

2 years ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 18 Nov 2023 11:07:48 +0000 (06:07 -0500)]
; Merge from origin/emacs-29

The following commit was skipped:

7b0e07c41ae Make Tramp aware of completion-regexp-list (don't merge)

2 years agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 18 Nov 2023 11:07:47 +0000 (06:07 -0500)]
Merge from origin/emacs-29

232a57a3e32 ; * doc/lispref/debugging.texi (Debugging): Add cross-ref...
c65ddf26a33 ; doc/lispref/debugging.texi: Add reference to Profiler d...
6f884d3aed9 Add 5 docstrings to abbrev.el (bug#67153)
b4d990bd637 ; Clarify wording about arguments in doc strings
c20ae7a30fb ; Improve cross-references in description of 'pcase'
42181b65df1 ; * src/editfns.c (Fline_beginning_position): Doc fix.
5f3309f6b0f ; Improve indexing in ELisp manual
4e406bb4208 Fix CBZ file detection in doc-view-mode

2 years ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 18 Nov 2023 11:07:47 +0000 (06:07 -0500)]
; Merge from origin/emacs-29

The following commit was skipped:

c1251ae1f93 * lisp/progmodes/eglot.el (eglot-server-programs): Fix pr...

2 years agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 18 Nov 2023 11:07:47 +0000 (06:07 -0500)]
Merge from origin/emacs-29

5a1808da5f3 ; * doc/misc/eglot.texi (Eglot Commands): Fix typos (bug#...

2 years ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 18 Nov 2023 11:07:47 +0000 (06:07 -0500)]
; Merge from origin/emacs-29

The following commit was skipped:

260ba357bbe Eglot: Send standard :language-id for typescript-language...

2 years agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 18 Nov 2023 11:07:47 +0000 (06:07 -0500)]
Merge from origin/emacs-29

32a32853ce9 Typofix in the doc/lispref/modes.texi
f98637b51b5 ; Fix 'add-face-text-property' shortdoc
3fff22eb20c Fix spell-checking email message with citations

2 years ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 18 Nov 2023 11:07:47 +0000 (06:07 -0500)]
; Merge from origin/emacs-29

The following commit was skipped:

5bebd292c63 Pass only the local parts of Eshell's $PATH to 'tramp-rem...

2 years agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 18 Nov 2023 11:07:46 +0000 (06:07 -0500)]
Merge from origin/emacs-29

5612fd21a05 Add two doc strings to cl-extra.el

2 years ago; * etc/NEWS: Fix last change (bug#67225).
Eli Zaretskii [Sat, 18 Nov 2023 10:11:56 +0000 (12:11 +0200)]
; * etc/NEWS: Fix last change (bug#67225).

2 years agoAdd key translations 'C-x 8 a e' and 'C-x 8 A E'.
Rudi Schlatte [Thu, 16 Nov 2023 09:44:44 +0000 (10:44 +0100)]
Add key translations 'C-x 8 a e' and 'C-x 8 A E'.

* lisp/international/iso-transl.el (iso-transl-char-map): Add
new entries for ae and AE.  (Bug#67225)

2 years ago; Add commentary for exposing a mode hook to Custom
Eli Zaretskii [Sat, 18 Nov 2023 10:02:25 +0000 (12:02 +0200)]
; Add commentary for exposing a mode hook to Custom

* lisp/progmodes/elixir-ts-mode.el (elixir-ts-mode-hook): Add
commentary about the reasons for exposing the hook to Custom, per
the discussion in bug#67207.

2 years agoAdd elixir-ts-mode-hook to elixir-ts-mode
Wilhelm H Kirschbaum [Wed, 15 Nov 2023 18:13:02 +0000 (20:13 +0200)]
Add elixir-ts-mode-hook to elixir-ts-mode

* lisp/progmodes/elixir-ts-mode.el (elixir-ts-mode-hook):
Make hook available to customize.  (Bug#67207)

2 years agoDocument changes in 'edmacro-parse-keys'
Eli Zaretskii [Sat, 18 Nov 2023 09:52:48 +0000 (11:52 +0200)]
Document changes in 'edmacro-parse-keys'

* lisp/edmacro.el (edmacro-parse-keys): Add a comment for forcing
output to be a vector.
(read-kbd-macro): Adjust the doc string to changes in
'edmacro-parse-keys'.  (Bug#67182)

2 years agoDocument Battery Optimization challenges on Android
Po Lu [Sat, 18 Nov 2023 09:41:51 +0000 (17:41 +0800)]
Document Battery Optimization challenges on Android

* etc/PROBLEMS (Runtime problems specific to Android): Mention
battery optimization, the way it impacts background execution,
and how it might be disabled.

2 years ago; * etc/NEWS: Add entry about new input methods. (Bug#66470)
Eli Zaretskii [Sat, 18 Nov 2023 09:35:15 +0000 (11:35 +0200)]
; * etc/NEWS: Add entry about new input methods.  (Bug#66470)

2 years agoAdd input methods for Urdu, Pashto and Sindhi (bug#66470)
Rahguzar [Sun, 29 Oct 2023 16:14:02 +0000 (17:14 +0100)]
Add input methods for Urdu, Pashto and Sindhi (bug#66470)

* lisp/leim/quail/pakistan.el ("urdu-keyboard")
("urdu-phonetic-keyboard", "urdu-custom", "sindhi-keyboard")
("pashto-keyboard"): New input methods.
(pakistan--define-quail-rules, pakistan--make-setter)
(pakistan--regenerate-translations, pakistan--set-prefixes)
(pakistan--define-numeral-translations)
(pakistan--set-numeral-translations):
Internal helper functions.
(pakistan-urdu-input): New customization group.
(pakistan-urdu-prefixes, pakistan-urdu-translations)
(pakistan-urdu-diacritics-and-other-symbols)
(pakistan-urdu-poetic-symbols, pakistan-urdu-religious-symbols)
(pakistan-extra-balochi-brahui-translations)
(pakistan-extra-pashto-translations)
(pakistan-extra-sindhi-translations)
(pakistan-extra-saraiki-hindko-translations)
(pakistan-urdu-use-roman-digits): New custom variables.
(pakistan): New package.

2 years agoAdd 2 SQLite extensions to allow-list.
Eli Zaretskii [Sat, 18 Nov 2023 09:11:04 +0000 (11:11 +0200)]
Add 2 SQLite extensions to allow-list.

* src/sqlite.c (Fsqlite_load_extension): Add 2 Free Software
extensions to the allow-list.  For the details, see
https://lists.gnu.org/archive/html/emacs-devel/2023-11/msg00234.html.

2 years agoDo interactive tagging for dired commands
Visuwesh [Sun, 29 Oct 2023 14:51:57 +0000 (20:21 +0530)]
Do interactive tagging for dired commands

* lisp/dired-aux.el (dired-diff, dired-backup-diff)
(dired-compare-directories, dired-do-chmod, dired-do-chgrp)
(dired-do-chown, dired-do-touch, dired-do-print, dired-clean-directory)
(dired-do-async-shell-command, dired-do-shell-command, dired-kill-line)
(dired-do-kill-lines, dired-do-compress-to, dired-do-compress)
(dired-do-byte-compile, dired-do-load, dired-do-redisplay)
(dired-reset-subdir-switches, dired-create-directory)
(dired-create-empty-file, dired-do-copy, dired-do-symlink)
(dired-do-relsymlink, dired-do-hardlink, dired-do-rename)
(dired-do-rename-regexp, dired-do-copy-regexp, dired-do-hardlink-regexp)
(dired-do-symlink-regexp, dired-do-relsymlink-regexp, dired-upcase)
(dired-downcase, dired-maybe-insert-subdir, dired-insert-subdir)
(dired-kill-tree, dired-prev-subdir, dired-mark-subdir-files)
(dired-kill-subdir, dired-tree-up, dired-tree-down, dired-hide-subdir)
(dired-hide-all, dired-isearch-filenames, dired-isearch-filenames-regexp)
(dired-do-isearch, dired-do-isearch-regexp, dired-do-search)
(dired-do-query-replace-regexp, dired-do-find-regexp)
(dired-do-find-regexp-and-replace, dired-show-file-type)
(dired-vc-next-action):
* lisp/dired-x.el (dired-mark-extension, dired-mark-suffix)
(dired-flag-extension, dired-clean-patch, dired-clean-tex)
(dired-very-clean-tex, dired-mark-omitted, dired-omit-expunge)
(dired-mark-unmarked-files, dired-do-find-marked-files, dired-vm)
(dired-rmail, dired-do-run-mail, dired-mark-sexp,
dired-x-bind-find-file):
* lisp/dired.el (dired-mouse-drag, dired-undo, dired-toggle-read-only)
(dired-next-line, dired-previous-line, dired-next-dirline)
(dired-prev-dirline, dired-up-directory, dired-get-file-for-visit)
(dired-find-file, dired-find-alternate-file, dired-mouse-find-file)
(dired-mouse-find-file-other-window, dired-mouse-find-file-other-frame)
(dired-view-file, dired-find-file-other-window, dired-display-file)
(dired-copy-filename-as-kill, dired-next-subdir)
(dired-build-subdir-alist, dired-goto-file, dired-do-flagged-delete)
(dired-do-delete, dired-next-marked-file, dired-prev-marked-file)
(dired-mark, dired-unmark, dired-flag-file-deletion)
(dired-unmark-backward, dired-toggle-marks, dired-mark-files-regexp)
(dired-number-of-marked-files, dired-mark-files-containing-regexp)
(dired-flag-files-regexp, dired-mark-symlinks, dired-mark-directories)
(dired-mark-executables, dired-flag-auto-save-files)
(dired-flag-garbage-files, dired-flag-backup-files, dired-change-marks)
(dired-unmark-all-marks, dired-unmark-all-files)
(dired-sort-toggle-or-edit, dired-mark-for-click)
(dired-enable-click-to-select-mode): Tag commands as applicable only
for dired-mode.

2 years agoAvoid loading cl-lib as result of invoking 'load-library'
Eli Zaretskii [Sat, 18 Nov 2023 08:13:37 +0000 (10:13 +0200)]
Avoid loading cl-lib as result of invoking 'load-library'

* lisp/emacs-lisp/find-func.el (find-function--any-subform-p):
Don't use 'cl-destructuring-bind'.
(find-library--from-load-history): Don't use 'cl-loop'.
* lisp/thingatpt.el (thing-at-point): Don't use 'cl-loop'.  This
avoids loading cl-lib whenever thingatpt.el is loaded, for
example, as result of "M-x load-library".

2 years ago; Improve documentation of recently added functions
Eli Zaretskii [Sat, 18 Nov 2023 07:01:30 +0000 (09:01 +0200)]
; Improve documentation of recently added functions

* src/androidfns.c (Fandroid_external_storage_available_p)
(Fandroid_request_storage_access):
* lisp/term/android-win.el (android-after-splash-screen): Improve
and clarify wording of doc strings.

2 years agoOffer to grant storage permissions if absent
Po Lu [Sat, 18 Nov 2023 06:15:55 +0000 (14:15 +0800)]
Offer to grant storage permissions if absent

* java/org/gnu/emacs/EmacsService.java (externalStorageAvailable)
(requestStorageAccess23, requestStorageAccess30)
(requestStorageAccess): New functions.

* lisp/startup.el (fancy-startup-tail, normal-splash-screen):
Call android-win functions for inserting the new storage
permission notice.

* lisp/term/android-win.el
(android-display-storage-permission-popup)
(android-after-splash-screen): New functions.

* src/android.c (android_init_emacs_service): Link to new Java
functions.
(android_external_storage_available_p)
(android_request_storage_access): New functions.

* src/android.h: Update prototypes.

* src/androidfns.c (Fandroid_external_storage_available_p)
(Fandroid_request_storage_access): New functions.
(syms_of_androidfns): Register new subrs.

2 years ago* lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates): Add `null`
Stefan Monnier [Fri, 17 Nov 2023 23:12:03 +0000 (18:12 -0500)]
* lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates): Add `null`

2 years agoReturn t from completion-emacs22-try-completion only for completions
Spencer Baugh [Thu, 16 Nov 2023 16:34:08 +0000 (11:34 -0500)]
Return t from completion-emacs22-try-completion only for completions

The emacs22 completion style ignores the text after point when
computing completions.  However, it still needs to take into account
the entire string it's given, to avoid returning incorrect values.

Previously, completion-emacs22-try-completion would return t if the
text before point was an exact completion.  But this is effectively
saying that the entire input string was an exact completion, which may
not be correct.  This would cause completing-read with REQUIRE-MATCH=t
to return a non-completion.

Now, completion-emacs22-try-completion only returns t if the entire
input string is an exact completion.

* lisp/minibuffer.el (completion-emacs22-try-completion): Return t
only if the entire input string is an exact completion.  (Bug#67210)

2 years agoMake Tramp aware of completion-regexp-list
Michael Albinus [Fri, 17 Nov 2023 17:28:30 +0000 (18:28 +0100)]
Make Tramp aware of completion-regexp-list

* lisp/net/tramp.el (tramp-skeleton-file-name-all-completions):
New defmacro.
(tramp-completion-handle-file-name-all-completions):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-name-all-completions):
* lisp/net/tramp-crypt.el (tramp-crypt-handle-file-name-all-completions):
* lisp/net/tramp-fuse.el (tramp-fuse-handle-file-name-all-completions):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-name-all-completions):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-name-all-completions):
* lisp/net/tramp-smb.el (tramp-smb-handle-file-name-all-completions):
* lisp/net/tramp-sudoedit.el
(tramp-sudoedit-handle-file-name-all-completions): Use it.

2 years ago* test/lisp/net/tramp-tests.el (tramp--test-timeout-handler): Be more verbose.
Michael Albinus [Fri, 17 Nov 2023 17:17:28 +0000 (18:17 +0100)]
* test/lisp/net/tramp-tests.el (tramp--test-timeout-handler): Be more verbose.

2 years agoMake Tramp aware of completion-regexp-list (don't merge)
Michael Albinus [Fri, 17 Nov 2023 17:16:58 +0000 (18:16 +0100)]
Make Tramp aware of completion-regexp-list (don't merge)

* lisp/net/tramp.el (tramp-skeleton-file-name-all-completions):
New defmacro.
(tramp-completion-handle-file-name-all-completions):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-name-all-completions):
* lisp/net/tramp-crypt.el (tramp-crypt-handle-file-name-all-completions):
* lisp/net/tramp-fuse.el (tramp-fuse-handle-file-name-all-completions):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-name-all-completions):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-name-all-completions):
* lisp/net/tramp-smb.el (tramp-smb-handle-file-name-all-completions):
* lisp/net/tramp-sudoedit.el
(tramp-sudoedit-handle-file-name-all-completions): Use it.