1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00
Commit Graph

175235 Commits

Author SHA1 Message Date
Michael Albinus
29c610a832 ; Tramp cosmetic change
* lisp/net/tramp.el (tramp-file-name-handler):
Adapt `tramp-verbose' when completing host names.
2024-09-25 11:36:28 +02:00
Andrea Corallo
4b76af4928 ; * Clean-up compilation warning in cc-vars.el
* lisp/progmodes/cc-vars.el (c-offsets-alist): Move definition to
clean-up byte-compiler warning.
2024-09-25 10:23:03 +02:00
Juri Linkov
0f424b16c3 * lisp/hi-lock.el (hi-lock-revert-buffer-rehighlight): Fix lighter.
Add '(car pattern)' as the LIGHTER argument of 'highlight-regexp'.
This fixes the case when in a file buffer with fundamental-mode:
`C-s M-s ' the M-s h r RET`, revert the buffer with 'C-x x g',
get the prompt for unhighlight with 'M-s h u'.  This showed
a raw regexp instead of the human-readable lighter (bug#57534).
2024-09-25 09:57:16 +03:00
Roland Winkler
bd25a98b4e bibtex-mode: fix patch bibtex validation for non-file buffers 2024-09-24 23:14:27 -05:00
Alan Mackenzie
c2d6f191d4 CC Mode: Separate indentation of enums from that of brace lists
This will allow enums to be indented as in the GNU coding
standards without affecting brace lists.

* lisp/progmodes/cc-align.el
(c-lineup-arglist-intro-after-paren)
(c-lineup-arglist-close-under-paren)
(c-lineup-whitesmith-in-block)
(c-lineup-after-whitesmith-blocks): Amend doc strings to
indicate they can be used for enum-* syntactic symbols too.

* lisp/progmodes/cc-engine.el (c-looking-at-decl-block)
(c-backward-typed-enum-colon, c-backward-over-enum-header):
Rename c-after-brace-list-key to c-after-enum-list-key and
c-brace-list-key to c-enum-list-key.
(c-at-enum-brace): New function.
(c-inside-bracelist-p): Don't check for enums any more.
(c-add-stmt-syntax): New cond arm for enums.
(c-guess-continued-construct CASE B.6) New code for enum-open.
(c-guess-basic-syntax CASE 5A.3, CASE 7B, CASE 9, CASE 9B)
(CASE 9C, CASE 9D): Use the new function c-at-enum-brace, and
use enum-* syntactic symbols rather than brace-list-* ones
where appropriate.
(c-used-syntactic-symbols): New dynamic variable.
(c-evaluate-offset): Add handling for a different syntactic
symbol as the cdr of a c-offsets-alist element.

* lisp/progmodes/cc-fonts.el (c-get-fontification-context):
Add a call to c-at-enum-brace since c-inside-bracelist-p no
longer handles enums.
(c-font-lock-enum-body, c-font-lock-enum-tail): Condense calls
to c-backward-over-enum-header to c-at-enum-brace.
(c-basic-matchers-after): Replace a c-brace-list-decl-kwds with
c-enum-list-kwds.

* lisp/progmodes/cc-langs.el (c-enum-list-kwds)
(c-enum-list-key): New names for c-brace-list-decl-kwds and
c-brace-list-key.
(c-after-enum-list-kwds, c-after-enum-list-key): New names for
c-after-brace-list-decl-kwds and c-after-brace-list-key.
(c-enum-list-key, c-after-enum-list-key): Add code to
use a value of an old name, should a derived mode still use
that.
(c-defun-type-name-decl-kwds, c-typedef-decl-kwds)
(c-typeless-decl-kwds, c-prefix-spec-kwds)
(c-brace-id-list-kwds, c-enum-clause-introduction-re): Use
c-enum-list-kwds rather than c-brace-list-decl-kwds.

* lisp/progmodes/cc-styles.el (c-read-offset): Add "a
syntactic symbol" into an error message text.

* lisp/progmodes/cc-vars.el (c-valid-offset): Allow for a
syntactic symbol as the parameter.
(c-offsets-alist): Add new syntactic symbols enum-open,
enum-close, enum-intro, and enum-entry.

* doc/misc/cc-mode.texi (Syntactic Symbols): Add a note that
anchor points are briefly documented in cc-vars.el.  Correct
the suffix "-block-intro" to "-intro".  Remove "an enum or"
from the descriptions of the brace-list-* syntactic symbols.
Add in new descriptions for the enum-* syntactic symbols.
(Brace List Symbols): Remove references to enums.  Add a note
that enums are no longer brace-lists.
(Enum Symbols): A new subsection documenting the new enum-*
syntactic symbols.
(c-offsets-alist): Document the new possibility, syntactic
symbol, for the cdr of an alist entry.
(Brace/Paren Line-Up, List Line-Up): Note that the new enum
syntactic symbols can be handled by these lineup functions.
2024-09-24 20:45:29 +00:00
Stefan Monnier
e8f5df5175 Declare nested backquotes unsupported in Pcase patterns (bug#72328)
The current behavior is inconsistent with that of the normal backquote
macro, so to avoid surprises, warn about the use of nested backquotes.

* lisp/emacs-lisp/pcase.el (pcase--expand-\`): Warn about nested backquotes.

* lisp/emacs-lisp/testcover.el (testcover-analyze-coverage)
(testcover-analyze-coverage-wrapped-form): Avoid nested backquotes
2024-09-24 14:01:26 -04:00
Sean Whitton
ce601de1ca diff-apply-buffer: Improve failure message
* lisp/vc/diff-mode.el (diff-apply-buffer): Say "hunk", not
"hunks", when there was only one failed hunk.
2024-09-24 16:17:17 +01:00
Robert Pluim
4729065ee7 Document 'buttonize-region' in manual
It was added in emacs-29, but never added to the lisp reference
manual.

* doc/lispref/display.texi (Making Buttons): Document
'buttonize-region'.
2024-09-24 17:03:49 +02:00
Robert Pluim
f189457e5a ; * lisp/yank-media.el (yank-media-handler): Fix docstring typo. 2024-09-24 17:02:21 +02:00
Tassilo Horn
2b53e11a08 Use black-on-white by default for doc-view-svg-face.
* lisp/doc-view.el (doc-view-svg-face): Define black on white as
default value instead of using the current theme's values.
* etc/NEWS: Adjust entry for doc-view-svg-face.
2024-09-24 13:20:45 +02:00
Dmitry Gutov
32d0c8f6af etags-regen-file-extensions: Enable for more extensions
* lisp/progmodes/etags-regen.el (etags-regen-file-extensions):
Add more extensions, but remove "a".  From the ones recognized by
etags, also omit "t", "ml", "l", "def" and "inc", see
https://lists.gnu.org/archive/html/emacs-devel/2024-09/msg00735.html.
(etags-regen--all-files): Use 'string-match-p' for performance.
Bind 'case-fold-search' to t to match extensions in any case.
2024-09-23 21:35:19 +03:00
Eli Zaretskii
e7260d4eb3 ; Fix shr-tests when Emacs was built without libxml2
* test/lisp/net/shr-tests.el (shr-test/zoom-image): Skip if
libxml2 is not available.  (Bug#73440)
2024-09-23 18:30:00 +03:00
Michael Albinus
40e0257b10 Extend tramp-otp-password-prompt-regexp
* lisp/net/tramp.el (tramp-otp-password-prompt-regexp): Add TACC
HPC prompt.
2024-09-23 16:52:01 +02:00
Eli Zaretskii
8f265b49e3 ; Fix last change
* doc/lispref/lists.texi (Building Lists):
* src/fns.c (Fappend): Fix last change (bug#73427).  Suggested by
Mattias Engdegård <mattias.engdegard@gmail.com>.
2024-09-23 17:13:31 +03:00
Eli Zaretskii
c8ed48b990 ; Improve documentation of 'append'
* doc/lispref/lists.texi (Building Lists):
* src/fns.c (Fappend): Improve documentation of 'append'.  (Bug#73427)
2024-09-23 14:41:34 +03:00
Michael Albinus
dda7abb177 * doc/misc/tramp.texi (Frequently Asked Questions): Improve indices. 2024-09-23 09:53:17 +02:00
Eli Zaretskii
3fb966dc63 ; Fix dnd-tests on MS-Windows
* test/lisp/dnd-tests.el (dnd-tests-get-local-file-uri): Fix test
on MS-Windows.
2024-09-22 12:57:08 +03:00
Cecilio Pardo
e8f0baf354 Fix multi-file drag-and-drop on MS-Windows
Pass all dropped files to 'dnd-handle-multiple-urls' in
one call instead on doing multiple calls (Bug#73258).
* lisp/term/w32-win.el (w32-dropped-file-to-url): New function to
convert file name to a url for dnd.
(w32-handle-dropped-file): Changed to use 'w32-dropped-file-to-url'.
(w32-drag-n-drop): Changed to pass all files to
'dnd-handle-multiple-urls'/
2024-09-22 12:45:42 +03:00
Joseph Turner
0f4c09d267
; Add test for deleting multiple pairs at once
* test/lisp/electric-tests.el (electric-pair-backspace-2):
New test.  (Bug#72437)
2024-09-22 10:10:35 +02:00
Eshel Yaron
a7192fd7b7
Teach Electric Pair mode about prefix arguments
* lisp/elec-pair.el (electric-pair--insert): New arg TIMES.
(electric-pair-inhibit-if-helps-balance)
(electric-pair-post-self-insert-function)
(electric-pair-open-newline-between-pairs-psif)
(electric-pair-skip-if-helps-balance): Respect prefix arg.
(electric-pair-delete-pair): Delete ARG chars, not just 1.
* test/lisp/electric-tests.el (autowrapping-multi-1)
(autowrapping-multi-2): New tests.
* doc/emacs/programs.texi (Matching): Mention prefix arg
support in Electric Pair mode documentation.
* etc/NEWS: Announce it.  (Bug#72437)
2024-09-22 10:10:35 +02:00
Stephen Berman
c1f2501f55 Update and improve UI of sql-read-product (bug#73412)
* lisp/progmodes/sql.el (sql-read-product): In invocation of
completing-read use format-prompt and make deprecated argument
INITIAL-INPUT nil.
(sql-set-product, sql-product-interactive): In invocation of
sql-read-product adjust prompt to use of format-prompt.
2024-09-21 22:23:11 +02:00
Mattias Engdegård
f5bf007df1 ; * lisp/midnight.el (midnight-mode): forward-declare midnight-delay 2024-09-21 19:34:16 +02:00
Alan Mackenzie
086cb1b590 CC Mode: fix minor errors in the fontification of enums.
1: Fix the typing of a space on the { line in an enum
specification which is the first item in a buffer.  This
defontified the enum's identifiers.
2: Fix the typing of a space on the line of the enum's last
identifier.  This defontified that identifier for
jit-lock-context-time.

* lisp/progmodes/cc-engine.el (c-forward-declarator): Cease
rejecting the identifier if there are no further tokens before
LIMIT.

* lisp/progmodes/cc-mode.el (c-fl-decl-start): Accept a
backward search as succeeding if it hits point-min.
2024-09-21 16:46:32 +00:00
Philip Kaludercic
4f5fc519f0
Insert correct commit data into VC package descriptions
* lisp/emacs-lisp/package-vc.el (package-vc-commit): Rename
argument from PKG to PKG-DESC.
(package-vc--generate-description-file): Update the "extras"
section of the package description with the revision string at
generation time.
2024-09-21 17:44:26 +02:00
Manuel Giraud
4745bafa6a Don't activate midnight-mode when loading 'midnight'
* lisp/midnight.el (midnight-mode): Call 'midnight-delay-set' again
when the mode is activated.
(midnight-delay-set): Only start the timer if the mode is turned
on.  (Bug#73291)
* etc/NEWS: Document the change in behaviour.
2024-09-21 15:01:44 +02:00
Stefan Kangas
dac1a48240 Delete redundant declarations of 'electric' variables
* lisp/progmodes/js.el (electric-layout-rules):
* lisp/progmodes/octave.el (electric-layout-rules):
* lisp/progmodes/python.el (electric-indent-inhibit):
* lisp/textmodes/rst.el (electric-indent-inhibit): Delete redundant
declarations; 'electric' is preloaded since Emacs 24.4.
2024-09-21 14:48:02 +02:00
Stefan Kangas
3cad879c9d Add Python keywords "aiter" and "anext"
* lisp/progmodes/python.el (python-font-lock-keywords-level-2)
(python--treesit-builtins): Add "aiter" and "anext" keywords,
introduced in Python 3.10.
2024-09-21 14:29:40 +02:00
Stefan Kangas
7aa5876cdf Add all exceptions up to Python 3.13 as keywords
* lisp/progmodes/python.el
(python-font-lock-keywords-maximum-decoration)
(python--treesit-exceptions): Add all built-in exceptions in Python 3.13
as keywords.  Missing from the list was "BaseExceptionGroup",
"EncodingWarning", "ModuleNotFoundError", and "PythonFinalizationError".
2024-09-21 14:20:29 +02:00
Stefan Kangas
29a7607117 Add subword-mode toggle to python-mode menu
* lisp/progmodes/python.el (python-mode-map): Add subword-mode
toggle to menu.
2024-09-21 14:08:09 +02:00
Stefan Kangas
dfecd6037d Support electric-layout-mode in python-base-mode
* lisp/progmodes/python.el (python-base-mode): Add support for
'electric-layout-mode'.
2024-09-21 14:08:09 +02:00
Eli Zaretskii
7a404e6d51 Fix merging of NEWS from emacs-30. 2024-09-21 07:44:32 -04:00
Eli Zaretskii
ff2cc0fc23 Merge from origin/emacs-30
ecfebb5abb ; Always set 'emoji--insert-buffer'
35e356f958 Fix font-lock of last character before EOB under 'whitesp...
01ebe6de89 Fix 'whitespace-mode' with 'missing-newline-at-eof'
2024-09-21 07:32:38 -04:00
Eli Zaretskii
abc051c431 ; Merge from origin/emacs-30
The following commit was skipped:

eced135120 Fix 'replace-regexp' in WDired
2024-09-21 07:32:38 -04:00
Eli Zaretskii
7a8f2a0bec Merge from origin/emacs-30
b7f6cde419 Disable xwidgets with recent webkitgtk versions (Bug#66068)
a6dafbc2bc ; * lisp/editorconfig.el (editorconfig-indentation-alist)...
0834106a62 Fix treesit--merge-ranges (bug#73324)
76c6b4d279 Fix midnight-mode documentation
f778252220 ; Fix my email address
db22efca8d editorconfig.el: Fix too naive sync from upstream
0f12d6dd23 ; * etc/NEWS: Announce 'doc-view-mpdf--use-svg'.
29d50e245f * lisp/progmodes/eglot.el (eglot--signal-textDocument/did...

# Conflicts:
#	etc/NEWS
#	lisp/treesit.el
2024-09-21 07:32:31 -04:00
Eli Zaretskii
1cf6ff4362 ; Merge from origin/emacs-30
The following commit was skipped:

7ef805d6a4 Disable fontset-related workaround on non-Android systems
2024-09-21 07:30:19 -04:00
Eli Zaretskii
83b0e604ce Merge from origin/emacs-30
4b9a8fd607 etags-regen-file-extensions: Add .pm
956f14ae5e * src/treesit.c (treesit_debug_print_parser_list): Fix co...
300d05ecb4 Type-check argument to network-lookup-address-info
0f0f21b7f2 ; Improve doc strings of options related to numbered backups
f0daa2f215 Conservative heuristic for tree-sitter parser ranges (bug...
035024b4e5 ; Fix treesit.c printing
8771310a10 ; * admin/notes/unicode: Need to run textsec-tests (bug#7...
4c6f45fa8e Re-enable GC mark trace buffer by default
c607701589 ; * src/haiku_support.cc: Correct last change.
ae22ad7f62 ; Add even more tests for previous commit
460b9d705a Fix treesit_sync_visible_region's range fixup code (bug#7...
81347c1aaf ; * etc/PROBLEMS: Fix last change (bug#73207).
a82b7f3e82 Document unavailability of frame geometry on Wayland
2024-09-21 07:30:19 -04:00
Stefan Kangas
98177d4b3d Document reporting security issues in user manual
* doc/emacs/trouble.texi (Bugs): Document how to report important
security issues.
2024-09-21 13:29:36 +02:00
Stefan Kangas
b986e2018a * BUGS: Minor copy edit. 2024-09-21 13:29:36 +02:00
Scott Bell
ecfebb5abb ; Always set 'emoji--insert-buffer'
* lisp/international/emoji.el (emoji-list): Always set insert buffer.
(Bug#73390)

Copyright-paperwork-exempt: yes
2024-09-21 14:01:41 +03:00
Stefan Monnier
35e356f958 Fix font-lock of last character before EOB under 'whitespace-mode'
* lisp/whitespace.el (whitespace-color-on): Don't use OVERRIDE in
font-lock-keywords; instead, use 'prepend' in the call to
'font-lock-add-keywords'.  (Bug#73332)
2024-09-21 13:46:54 +03:00
Eli Zaretskii
01ebe6de89 Fix 'whitespace-mode' with 'missing-newline-at-eof'
* lisp/whitespace.el (whitespace-post-command-hook): Refontify
when point moves if 'missing-newline-at-eof' is in
'whitespace-active-style'.  (Bug#73332)
2024-09-21 13:41:21 +03:00
Eli Zaretskii
4c5ab949fb ; * lisp/emacs-lisp/lisp.el (delete-pair-push-mark): Add :version. 2024-09-21 13:23:50 +03:00
Paul Nelson
a48672c6bb Add option for delete-pair to mark end of region
* lisp/emacs-lisp/lisp.el (delete-pair-push-mark): New user option.
(delete-pair): Use it.  (Bug#73284)

* etc/NEWS: Announce the new user option.
2024-09-21 13:20:59 +03:00
Eli Zaretskii
39d2cc36b2 ; * etc/NEWS: Fix last change. 2024-09-21 12:42:43 +03:00
Vincenzo Pupillo
b0523dffab Add user option to enable Doxygen syntax highlighting (bug#72814)
Both 'c-ts-mode' and 'java-ts-mode' have a new user option,
'c-ts-mode-enable-doxygen' and 'java-ts-mode-enable-doxygen'
(defaults to nil) which allow to enable syntax highlighting
of comment blocks based on the Doxygen grammar.

* lisp/progmodes/c-ts-mode.el: Add the 'c-ts-mode-enable-doxygen'
user option variable to disable doxygen grammar.
Notifies the user if doxygen grammar is not available.
* lisp/progmodes/c-ts-mode.el (c-ts-mode, c++-ts-mode): Use the
new 'c-ts-mode-enable-doxygen' option.
* lisp/progmodes/java-ts-mode.el: Add the
'java-ts-mode-enable-doxygen' user option variable to disable
doxygen grammar.  Notifies the user if doxygen grammar is not
available.
* lisp/progmodes/java-ts-mode.el (java-ts-mode): Use the new
'java-ts-mode-enable-doxygen' option.

* etc/NEWS: Document the change.
2024-09-21 12:39:34 +03:00
Eli Zaretskii
a513f2a4dd Fix 'regexp-replace' in WDired
* src/search.c (Freplace_match): Remove the test that
search_regs.num_regs != num_regs.  It is deemed unnecessary now,
and could produce false positives.  (Bug#73018)
2024-09-21 12:30:49 +03:00
Eli Zaretskii
eced135120 Fix 'replace-regexp' in WDired
* src/search.c (Freplace_match): Revert the search.c part of the
change from Apr 7, 2024, which aims to fix bug#65451, but causes
bug#73018.  Do not merge to master.

* test/src/editfns-tests.el
(editfns-tests--before/after-change-functions): Expect this test
to fail.
2024-09-21 12:26:24 +03:00
Peter Oliver
b7f6cde419 Disable xwidgets with recent webkitgtk versions (Bug#66068)
* configure.ac: Accept only webkit2gtk-4.* versions less than 2.41.92.
2024-09-21 11:58:42 +03:00
Michael Albinus
39ac8ddafd * test/infra/gitlab-ci.yml (.tree-sitter-template): Add treesit.el. 2024-09-21 10:22:41 +02:00
Michael Albinus
2f80e62e6e Use (sit-for 0) in Tramp
* lisp/net/tramp.el (tramp-wait-for-regexp): Use (sit-for 0) in
order to avoid performace regression.
2024-09-21 10:22:13 +02:00