1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-19 01:10:57 -08:00
Commit graph

169792 commits

Author SHA1 Message Date
Alan Mackenzie
2fca889cfb 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.
2023-11-24 12:22:08 +00:00
Alan Mackenzie
36d9b8ce84 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.
2023-11-24 10:03:33 +00:00
Po Lu
0858d10aeb 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.
2023-11-24 10:39:49 +08:00
Po Lu
354a2958f9 ; Complete merge of emoji.el
* lisp/international/emoji.el (emoji-list): Import changes
from emacs-29.
2023-11-24 08:45:18 +08:00
Po Lu
1737ffd3a8 Merge from savannah/emacs-29
1978b603bc Make python-ts-mode's syntax-highlighting more standardized
99658346d1 ; Improve documentation of desktop.el in user manual
f7dc020212 Fix "Text is read-only" on backspacing initial Calc input
662d54775d Add a doc string to simple.el (bug#67355)
5a5e36d2aa ; Improve function documentation tips
86016d8ecd Mention "visual line" in user manual
4bb65ed77a ; * doc/lispref/minibuf.texi (Programmed Completion): Imp...
dfb3dcb404 Allow listing Emoji from a read-only buffer

# Conflicts:
#	lisp/calc/calc.el
#	lisp/international/emoji.el
2023-11-24 08:44:34 +08:00
Po Lu
cd26304353 ; Merge from savannah/emacs-29
The following commits were skipped:

8256bf4cdf Fix CRLF handling in Tramp (don't merge)
81b63ec032 Annotate java-ts-mode-test-movement with expected result
054202d48c Backport: Add more java indentation tests
d2776d8254 Backport: Add test for java indentation (bug#61115)
2023-11-24 08:38:06 +08:00
Po Lu
ad26461b48 Merge from savannah/emacs-29
9af03e0e18 typescript-ts-mode: Support indentation for conditionals ...
2023-11-24 08:38:06 +08:00
Po Lu
37b18d88bb ; Merge from savannah/emacs-29
The following commit was skipped:

61cdf42a48 Backport: Add some basic tests for java-ts-mode and types...
2023-11-24 08:38:05 +08:00
Po Lu
9db8c349f0 Merge from savannah/emacs-29
d72a4ed65c Fix 'with-sqlite-transaction' when BODY fails
a7b3c92373 ; * doc/emacs/cmdargs.texi (Initial Options): Fix last ch...
fd76a80864 ; Mention that -x and --script ignore file-locals
e0469ddb9d ; * doc/emacs/search.texi (Special Isearch): More accurat...
e521669fb3 Fix wording in ELisp Intro manual
da946ca692 Add missing python-ts-mode keyword (bug#67015)
0128495afd Fix string-pixel-width with global setting of display-lin...

# Conflicts:
#	etc/NEWS
2023-11-24 08:38:03 +08:00
Dmitry Gutov
1978b603bc 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.
2023-11-24 00:00:32 +02:00
Juri Linkov
29d42d9158 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.
2023-11-23 20:12:40 +02:00
Manuel Giraud
51222153df 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'.
2023-11-23 09:15:34 -08:00
Stefan Monnier
7705bdfa5b 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`.
2023-11-23 11:59:49 -05:00
Stefan Monnier
e6556db420 (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.
2023-11-23 11:59:38 -05:00
Alan Mackenzie
9bda21ad0d 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.
2023-11-23 16:31:52 +00:00
Eli Zaretskii
99658346d1 ; Improve documentation of desktop.el in user manual
* doc/emacs/misc.texi (Saving Emacs Sessions): Mention saving
minibuffer history via desktop.el.
2023-11-23 17:56:50 +02:00
George Kuzler
f7dc020212 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
2023-11-23 17:39:51 +02:00
Jeremy Bryant
662d54775d Add a doc string to simple.el (bug#67355)
* lisp/simple.el (kill-buffer--possibly-save): Add doc string.
2023-11-23 17:28:43 +02:00
Eli Zaretskii
5a5e36d2aa ; Improve function documentation tips
* doc/lispref/tips.texi (Documentation Tips): Clarify the good
style of descriptions in doc strings.
2023-11-23 17:26:09 +02:00
Eli Zaretskii
86016d8ecd 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)
2023-11-23 16:56:10 +02:00
Eli Zaretskii
4bb65ed77a ; * doc/lispref/minibuf.texi (Programmed Completion): Improve indexing. 2023-11-23 16:43:17 +02:00
Eli Zaretskii
dfb3dcb404 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.
2023-11-23 16:07:31 +02:00
Philipp Stephani
102a848d99 ; * src/module-env-30.h: Fix commentary 2023-11-23 13:34:47 +01:00
Po Lu
4775530357 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.
2023-11-23 15:05:31 +08:00
Po Lu
e1c0c5def3 ; * doc/emacs/input.texi (On-Screen Keyboards): Fix typos. 2023-11-23 08:20:51 +08:00
Andrea Corallo
7f359d2488 (package-quickstart-refresh): Generate marginally more efficient code
* lisp/emacs-lisp/package.el (package-quickstart-refresh): Include
only one copy of the file names.
2023-11-22 17:51:45 -05:00
Andrea Corallo
366c316a2f * Update 'native-comp-never-optimize-functions' version
* lisp/emacs-lisp/comp-common.el (native-comp-never-optimize-functions):
Update version.
2023-11-22 16:37:16 +01:00
Andrea Corallo
cfd47e516f * configure.ac: Fix non posix (bash only) eq operator 2023-11-22 16:34:13 +01:00
Michael Albinus
025cd2a9c2 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 "..".
2023-11-22 13:50:06 +01:00
Michael Albinus
04aa76bb92 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>.
2023-11-22 13:48:57 +01:00
Michael Albinus
8256bf4cdf 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>.
2023-11-22 13:29:19 +01:00
Po Lu
f50e54c01e ; * lisp/touch-screen.el (touch-screen-handle-touch): Correct typo. 2023-11-22 11:25:23 +08:00
Po Lu
148250f074 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.
2023-11-22 11:10:13 +08:00
Po Lu
47e86445de Insert NEWS entry for native compilation changes
* etc/NEWS (Installation Changes in 30.1): Mention that native
compilation has been enabled by default.
2023-11-22 11:07:13 +08:00
Po Lu
41b67c0318 Disable native compilation in build machine Android binaries
* configure.ac (XCONFIGURE): Set with_native_compilation to no.
2023-11-22 11:00:04 +08:00
Noah Peart
9af03e0e18 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.
2023-11-21 16:26:54 +02:00
Theodor Thornhill
61cdf42a48 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 c8dd37b16c)
2023-11-21 16:26:54 +02:00
Dmitry Gutov
81b63ec032 Annotate java-ts-mode-test-movement with expected result
Do not merge to master.
2023-11-21 16:26:54 +02:00
Theodor Thornhill
054202d48c 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 dbe7803aa1)
2023-11-21 16:26:54 +02:00
Theodor Thornhill
d2776d8254 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 229d0772e2)
2023-11-21 16:26:54 +02:00
Eli Zaretskii
d72a4ed65c 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'.
2023-11-21 15:36:22 +02:00
Eli Zaretskii
a7b3c92373 ; * doc/emacs/cmdargs.texi (Initial Options): Fix last change. 2023-11-21 14:40:27 +02:00
Eli Zaretskii
fd76a80864 ; 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)
2023-11-21 14:23:38 +02:00
Andrea Corallo
3328c32725 * 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.
2023-11-21 11:35:33 +01:00
Po Lu
3027695ea8 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.
2023-11-21 14:18:04 +08:00
Eli Zaretskii
e0469ddb9d ; * doc/emacs/search.texi (Special Isearch): More accurate text. 2023-11-20 21:38:55 +02:00
Manuel Giraud
65600b97bd 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.
2023-11-20 10:00:08 -08:00
Juri Linkov
9d292262f5 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.
2023-11-20 19:57:57 +02:00
Eli Zaretskii
5024ee1ad1 ; * etc/TODO: Fix punctuation. 2023-11-20 14:45:30 +02:00
Andrea Corallo
498daa8886 * etc/TODO (Native compiler improvements): Add 'Diagnostic' section. 2023-11-20 10:38:54 +01:00