1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-28 07:50:48 -08:00
Commit graph

165763 commits

Author SHA1 Message Date
Philip Kaludercic
b5dfd1dfe1 Track file name in 'package--downloads-in-progress'
* lisp/emacs-lisp/package.el (package--download-one-archive): Move
'cl-pushnew' call from 'package--download-one-archive' and cons file
name onto the archive.
(package--download-one-archive): Cons the file name onto the archive.
(package--download-and-read-archives): Remove 'cl-pushnew' call.
2022-11-02 11:56:42 +01:00
Po Lu
a5d4c29a7f Improve commentary in some parts of xterm.c
* src/xterm.c (x_probe_xfixes_extension): Rename to
`x_fixes_pointer_blanking_supported', as fixes is now used for
selection tracking as well.  All callers changed.
(x_focus_changed): Document where this code is used.
2022-11-02 18:27:48 +08:00
Philip Kaludercic
b21f80bbb9 ; Replace 'let*' with 'let' where possible
* lisp/emacs-lisp/package-vc.el (package-vc--select-packages): Do it.
(package-vc--read-archive-data): Do it.
2022-11-02 10:15:28 +01:00
Paul Eggert
840b9eadd6 Remove unused local in simple_search
* src/search.c (simple_search): Remove unused local.
2022-11-01 23:04:00 -07:00
Stefan Monnier
8a5678906f src/buffer.c: Fix interaction between overlays & indirect buffers (bug#58928)
* src/buffer.c (adjust_overlays_for_insert)
(adjust_overlays_for_delete): Repeat for all buffers sharing the same text.

* src/itree.c (itree_insert_gap, itree_delete_gap): Allow an empty tree.

* test/src/buffer-tests.el (buffer-tests--overlays-indirect-bug58928):
New test.
2022-11-01 21:39:12 -04:00
Dmitry Gutov
835295381b project-switch-project: Avoid altering default-directory in cb
* lisp/progmodes/project.el (project-switch-project):
Avoid altering default-directory in the current buffer, even
temporarily (bug#58784).
2022-11-02 01:30:08 +02:00
Dmitry Gutov
0f5bf1dbb9 vc-svn-ignore-completion-table: Ignore empty lines
* lisp/vc/vc-svn.el (vc-svn-ignore-completion-table):
Make sure to ignore empty lines (bug#58889).
2022-11-02 00:46:21 +02:00
Yuan Fu
50e33639fe
Fix string fontification for tree-sitter python-mode
Now when user inserts a ending quote, the whole string is ganranteed
to be refontified and redisplayed.

* lisp/progmodes/python.el (python--treesit-fontify-string): Change
docstring, now it's called on the leading quote.
(python--treesit-fontify-string-end): New function.
(python--treesit-settings): Capture both leading and ending quote in a
string.
2022-11-01 13:26:16 -07:00
Yuan Fu
ccd2509ed3
Don't print buffer when printing tree-sitter node and parser
Additionally, print node's position in buffer.

* doc/lispref/parsing.texi (Retrieving Node): Reflect this change in
manual.
* src/print.c (print_vectorlike): Remove printing of buffer, add
printing of node position.
2022-11-01 12:54:56 -07:00
Yuan Fu
6d5b34d9de
; Tree-sitter font-lock debugging: print node type not language
* lisp/treesit.el (treesit-font-lock-fontify-region): Print node type.
2022-11-01 12:54:55 -07:00
Yuan Fu
f6e92035a7
Allow user to add/remove tree-sitter font-lock features
* lisp/treesit.el (treesit-font-lock-recompute-features): Add
ADD-LIST, REMOVE-LIST argument.
2022-11-01 12:54:55 -07:00
Yuan Fu
a3651d3237
Query on the root node in tree-sitter font-lock
Rather than querying on the smallest node that spans START to END, we
query on the root node between START to END.

* lisp/progmodes/python.el (python--treesit-fontify-string): Accept
the string rather than the quote node.
(python--treesit-settings): Capture the string rather than the quote
node.
* lisp/treesit.el (treesit-font-lock-fontify-region): Query the root
node rather than the smallest node.
2022-11-01 12:54:51 -07:00
Gregory Heytings
208f0578d1 Add a script to ease bisecting.
* admin/git-bisect-start: New script.

* admin/notes/repo (Bisecting): Mention the script.

* admin/emake: Add a Copyright blurb.
2022-11-01 19:21:38 +01:00
Michael Albinus
22e8a77583 * lisp/net/dbus.el (dbus-debug): Declare. (Bug#58865) 2022-11-01 16:35:40 +01:00
Philip Kaludercic
bbe5a1ca83 Ensure 'package-vc-update' runs 'package-vc-unpack-1' only once
* lisp/emacs-lisp/package-vc.el (package-vc-update): Use
'vc-sourced-packages-list' and other hacks.
2022-11-01 16:35:23 +01:00
Po Lu
e39537ea1e * src/xterm.c (x_term_init): Fix last change. 2022-11-01 19:20:15 +08:00
Po Lu
eb68c3d5a2 Fix leak on Lucid build
* src/xterm.c (x_term_init): Rectify wrong fix for bug#18403.
2022-11-01 19:20:15 +08:00
Stefan Kangas
123baf3772 Merge from origin/emacs-28
1862df834c ; * src/search.c (Fmatch_data): Doc fix.
15fc5225b1 ; * lisp/whitespace.el (whitespace-trailing): Fix a typo.
9f3c896f7c ; * doc/emacs/text.texi (Quotation Marks): Typo fix.  (Bug...

# Conflicts:
#	src/search.c
2022-11-01 10:30:09 +01:00
Gerd Möllmann
e7c105fd73 ; Mention git bisect's --first-parent in admin/notes/repo 2022-11-01 10:25:28 +01:00
Gerd Möllmann
d305eaf4ce Preven a buffer-overflow (bug#58850)
* src/print.c (print_vectorlike): Don't use sprintf.
2022-11-01 10:14:07 +01:00
Stefan Kangas
5bf5e526d5 Update publicsuffix.txt from upstream
* etc/publicsuffix.txt: Update from
https://publicsuffix.org/list/public_suffix_list.dat
dated 2022-10-29 17:48:52 UTC.
2022-11-01 06:00:54 +01:00
Po Lu
ecdbf82cb9 Fix leaks of XImage structures in image.c
* src/image.c (image_clear_image, lookup_image): Fix coding
style.
(x_destroy_x_image): Remove unnecessary assertion.  Call
XDestroyImage, since otherwise only the image data is freed.
(image_from_emacs_colors): Rename variables to make more sense.
2022-11-01 12:54:03 +08:00
Stefan Kangas
a7ded19ffc ; Auto-commit of loaddefs files. 2022-11-01 05:07:50 +01:00
Stephen Leake
4cc32937c0 Fix eglot-shutdown-all: Match current eglot-shutdown signature 2022-10-31 17:30:02 -07:00
Yuan Fu
4ef50ccd3f
; Explain the BEG and END argument in treesit-query-capture better
* doc/lispref/parsing.texi (Pattern Matching): Update manual.
* src/treesit.c (Ftreesit_query_capture): Update docstring.
2022-10-31 15:35:52 -07:00
Yuan Fu
b49250ada9
Use treesit-fontify-with-override in tree-sitter functions
* lisp/progmodes/js.el (js--fontify-template-string)
* lisp/progmodes/python.el (python--treesit-fontify-string): Use
treesit-fontify-with-override.
2022-10-31 15:08:17 -07:00
Yuan Fu
eeeae5e9ee
Add an argument OVERRIDE to tree-sitter font-lock functions
* doc/lispref/modes.texi (Parser-based Font Lock): Reflect this change
in manual.
* lisp/progmodes/js.el (js--fontify-template-string): Add _OVERRIDE
argument.
* lisp/progmodes/python.el (python--treesit-fontify-string): Add
_OVERRIDE argument.
* lisp/treesit.el (treesit-font-lock-rules): Update docstring.
(treesit-fontify-with-override): New function.
(treesit-font-lock-fontify-region): Extract out into
treesit-fontify-with-override.
2022-10-31 15:03:49 -07:00
Yuan Fu
9fab83ed7a
; * lisp/treesit.el (tresit--font-lock-verbose): Fix typo. 2022-10-31 14:26:03 -07:00
Michael Albinus
b7a76f288c Fix tramp-handle-file-newer-than-file-p
* lisp/net/tramp.el (tramp-handle-file-newer-than-file-p): Don't use
fractions of seconds.  (Bug#58842)
2022-10-31 16:48:15 +01:00
Stefan Kangas
3b555dc91d Prefer defvar-keymap in cus-edit.el
* lisp/cus-edit.el (custom-mode-map, custom-mode-link-map): Prefer
defvar-keymap.
2022-10-31 16:42:26 +01:00
Stefan Kangas
b250f89e63 * lisp/emacs-lisp/multisession.el: Add Commentary. (Bug#58845) 2022-10-31 15:28:36 +01:00
Stefan Kangas
20d9b40235 * lisp/vcursor.el (vcursor-map): Prefer defvar-keymap. 2022-10-31 15:20:01 +01:00
Philip Kaludercic
17b017d55c ; Avoid loading package-vc in 'package-load-descriptor'
* lisp/emacs-lisp/package.el (package-load-descriptor): Remove the
:commit check.

The property is mostly unused anyway, and this unnecessarily slows
down initialisation if a package is installed from source.
2022-10-31 10:51:40 +01:00
Philip Kaludercic
462a66e79e ; Actually check if NAME-OR-URL is a string
* lisp/emacs-lisp/package-vc.el (package-vc-install): Use stringp as
predicate instead of binding it as a variable.
2022-10-31 10:02:03 +01:00
Philip Kaludercic
c2088c0849 Allow specifying and pinning source packages to be installed
* lisp/emacs-lisp/package-vc.el (package-vc--select-packages): Add
custom setter for 'package-vc-selected-packages'.
(package-vc-selected-packages): Add user option.
2022-10-31 10:02:03 +01:00
Yuan Fu
18947103fa
Use tree-sitter for font-lock's syntactic function (optionally)
Before this change, we rebind font-lock-fontify-region-function and
call font-lock's function in tree-sitter's function, and the order of
fontification is tree-sitter, font-lock syntax, font-lock regexp.

Now we make font-lock's syntax function customizable and replace it
with tree-sitter's function, and the order of fontification is
tree-sitter, font-lock regexp.

* doc/lispref/modes.texi (Parser-based Font Lock): Reflect the change
in manual.
* lisp/font-lock.el (font-lock-fontify-syntactically-function): New
varaible.
(font-lock-default-fontify-region): Call
font-lock-fontify-syntactically-function rather.
(font-lock-fontify-syntactically-region): Rename to
font-lock-default-fontify-syntactically
(font-lock-default-fontify-syntactically): Rename to this.

* lisp/treesit.el (treesit-font-lock-fontify-region): Don't call
font-lock functions.
(treesit-font-lock-enable): Remove this function.  It is not used even
before this change.
(treesit-major-mode-setup): Instead of binding
font-lock-fontify-region-function, now bind to
font-lock-fontify-syntactically-function.  And we can let font-lock do
it's thing.
2022-10-31 00:23:31 -07:00
Yuan Fu
79ee266f13
Improve python tree-sitter's string fontification
* lisp/progmodes/python.el (python--treesit-fontify-string): Handle
not only f-strings, but also docstrings, and NODE is now the last
quote rather than the whole string.
(python--treesit-settings): Use python--treesit-fontify-string for
every occasion.
2022-10-31 00:09:36 -07:00
Yuan Fu
377ee8158b
Add tresit--font-lock-verbose
* lisp/treesit.el (tresit--font-lock-verbose): New variable.
(treesit-font-lock-fontify-region): Take tresit--font-lock-verbose
into account.  Return jit-lock-bounds.
2022-10-30 20:56:21 -07:00
Yuan Fu
52c8fdde16
Set jit-lock-contextually in treesit-major-mode-setup
* lisp/treesit.el (treesit-major-mode-setup): Set jit-lock-contextually.
2022-10-30 20:53:44 -07:00
Dmitry Gutov
a691e811e2 Fix semantic-symref-perform-search when dir contains a space
* lisp/cedet/semantic/symref/grep.el (semantic-symref-grep--local-dir):
New variable.
(semantic-symref-perform-search): Use it.  And use "." when
expanding the template to substitute for the current dir.
(semantic-symref-parse-tool-output-one-line): Use it (bug#55016)
2022-10-31 02:51:49 +02:00
Dmitry Gutov
1712dec0c0 Speed up vc-default-checkin-patch a little
* lisp/vc/vc.el (vc-default-checkin-patch): Drop some
'revert-buffer' calls to speed up the process a little (bug#52349).
2022-10-31 02:51:49 +02:00
Stefan Kangas
e5da2c3d61 Prefer defvar-keymap in simula.el
* lisp/progmodes/simula.el (simula-mode-map): Prefer
defvar-keymap.
2022-10-30 21:33:35 +01:00
Stefan Kangas
e6881f2e15 ; Delete duplicate definition from simula.el
* lisp/progmodes/simula.el (simula-mode-menu): Delete duplicate
menu definition.
2022-10-30 21:33:35 +01:00
Philip Kaludercic
8e7bb5bb87 ; Update TODO section 2022-10-30 21:12:48 +01:00
Eli Zaretskii
1862df834c ; * src/search.c (Fmatch_data): Doc fix. 2022-10-30 19:57:14 +02:00
Philip Kaludercic
2a4f37fe52 Merge remote-tracking branch 'origin/master' into feature/package+vc 2022-10-30 18:45:37 +01:00
Juri Linkov
73953b23aa * lisp/tab-line.el: Allow user-defined cache-key function (bug#57848)
(tab-line-cache-key-default): New function.
(tab-line-cache-key-function): New variable.
(tab-line-format): Funcall tab-line-cache-key-function.
2022-10-30 19:38:41 +02:00
Juri Linkov
44c2915552 * lisp/tab-line.el: Escape %-constructs in tab names (bug#57848)
(tab-line-tab-name-format-default): Replace % with %% in tab name
to escape %-constructs from processing by mode-line-format.
2022-10-30 19:36:06 +02:00
Gregory Heytings
aef803d6c3 Merge master into feature/improved-locked-narrowing. 2022-10-30 17:00:35 +01:00
Philip Kaludercic
d33998ed3b Have 'last-change' accept a line number instead of a range
* lisp/emacs-lisp/package-vc.el (package-vc-release-rev): Use new
signature.
* lisp/vc/vc-git.el (vc-git-last-change): Update signature
* lisp/vc/vc.el (vc-default-last-change): Update signature and use
'annotate-command'.
2022-10-30 16:52:08 +01:00