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
bb86ed20e1 Display a message after installing source packages
* lisp/emacs-lisp/package-vc.el (package-vc-unpack-1): Print message
and return t.
2022-10-30 14:57:11 +01:00
Philip Kaludercic
ec3f102b8c Prefer "Package-Version" over "Version" if available
* lisp/emacs-lisp/package-vc.el (package-vc-release-rev): Search for
both in sequence.
2022-10-30 14:43:10 +01:00
Stefan Monnier
3fa4cca3d2 * lisp/url/url-util.el (url-insert-entities-in-string): Simplify 2022-10-30 09:40:06 -04:00
Stefan Monnier
311c95fd67 dom-print: Fix missing entities quoting
Also use `?\s` for the space character.

* lisp/dom.el (dom-print): Properly quote special characters to avoid
generating invalid HTML/XML.
(dom-tag, dom-attributes, dom-children, dom-node)
(dom-add-child-before): Simplify.
(dom-set-attribute): Add at beginning rather than at end (slightly
more efficient and less destructive).
2022-10-30 09:40:06 -04:00
Stefan Kangas
2fa8f1b77a elide-head: Make trailing "/" in URL optional
* lisp/elide-head.el (elide-head-headers-to-hide): Make trailing
"/" in the gnu.org URL optional for the GPL.
* test/lisp/elide-head-tests.el
(elide-head--test-headers-to-hide/gpl3-5): New test.
2022-10-30 14:32:24 +01:00
Damien Cassou
b1fa7974bb Make previous-buffer and next-buffer repeatable
* lisp/bindings.el (buffer-navigation-repeat-map): Add new map.
* lisp/bindings.el (previous-buffer, next-buffer): Mark as
repeatable.  (Bug#58800)
2022-10-30 14:14:13 +01:00
Philip Kaludercic
8b49d553b6 ; Avoid a type error on malformed "elpa-packages.eld" input
* lisp/emacs-lisp/package-vc.el: Use 'eq' instead of '='
2022-10-30 14:07:56 +01:00
Philip Kaludercic
30f1e7c1e9 Extract last source package release from local VCS data
* lisp/emacs-lisp/package-vc.el (package-vc-archive-spec-alist):
Unmention :release-rev
(package-vc-desc->spec): Fall back on other archives if a
specification is missing.
(package-vc-main-file): Add new function, copying the behaviour of
elpa-admin.el.
(package-vc-generate-description-file): Use 'package-vc-main-file'.
(package-vc-unpack): Handle special value ':last-release'.
(package-vc-release-rev): Add new function using 'last-change'.
(package-vc-install): Pass ':last-release' as REV instead of a
release.
* lisp/vc/vc-git.el (vc-git-last-change): Add Git 'last-change'
implementation.
* lisp/vc/vc.el (vc-default-last-change): Add default 'last-change'
implementation.

This attempts to replicate the behaviour of elpa-admin.el's
"elpaa--get-last-release-commit".
2022-10-30 14:04:52 +01:00
Eli Zaretskii
cb8918d7cc ; Fix unclean code in w32fns.c
* src/w32fns.c (setup_w32_kbdhook): Fix a typo and check errors
from the call to StringFromGUID2.  Reported by Juanma Barranquero
<lekktu@gmail.com>.
2022-10-30 14:45:18 +02:00
Damien Cassou
0922e755d2 Make winner key sequences repeatable in repeat-mode
* lisp/winner.el (winner-repeat-map): New variable.
(winner-undo, winner-redo): Put 'repeat-map' property with
'winner-repeat-map'.  (Bug#58799)
2022-10-30 13:19:05 +01:00
Stefan Kangas
16686bdb86 Prefer defvar-keymap in etags.el
* lisp/progmodes/etags.el (select-tags-table-mode-map): Prefer
defvar-keymap.
2022-10-30 13:16:03 +01:00
Eli Zaretskii
d4dffae72c ; Change parent language-environment of Kharoshthi
* lisp/language/misc-lang.el ("Kharoshthi"): Change its parent to
"Indian".  (Bug#58376)
* lisp/international/mule-cmds.el (set-language-info-alist): Fix
indentation.
2022-10-30 13:16:30 +02:00
Visuwesh
fa249fd824 Fix set-language-info-alist when multiple PARENTS are given
* lisp/international/mule-cmds.el (set-language-info-setup-keymap):
Function factored out from...
(set-language-info-alist): ...here.  Do not mess up the keymaps when
multiple parents are given in PARENTS.  (Bug#58376)
2022-10-30 13:09:14 +02:00
Eli Zaretskii
3ceaa91829 ; * src/sqlite.c (Fsqlite_select): Doc fix. (Bug#58885) 2022-10-30 10:31:00 +02:00
Juri Linkov
b489ca5070 * lisp/tab-bar.el: Minibuffer follows selected tabs (bug#58728)
(tab-bar-select-tab): Set set-window-configuration
arg DONT-SET-MINIWINDOW to t.  Reselect the previously active minibuffer
and unselect unnecessarily selected minibuffer.
(tab-bar-history-back, tab-bar-history-forward): Set set-window-configuration
arg DONT-SET-MINIWINDOW to t.
2022-10-30 09:33:38 +02:00
Po Lu
ae0ec1eede Plug big leaks upon display IO error
Frame GCs are still leaked, but there is nothing that can be
done in that case because the display connection is dead.

* src/xterm.c (x_delete_terminal): Always free xkb desc and
modmap.
2022-10-30 13:13:28 +08:00
Yuan Fu
8c385f0512
Separate python tree-sitter fontification into features
Level 1: comment string function-name class-name
Level 2: keyword builtin constant type
Level 3: assignment decorator escape-sequence string-interpolation

* lisp/progmodes/python.el (python--treesit-settings): Separate.
(python-mode): Set features.
2022-10-29 19:59:50 -07:00
Yuan Fu
f6483526cd
Fix byte-compile warning in treesit.el
Originally treesit-simple-indent-presets was

'((parent-is . (lambda (type)
                 `(lambda (n p b)
                    (equal (treesit-node-type p)
                           ,type)))))

Then I changed it to

`((parent-is . ,(byte-compile
                 (lambda (type)
                   (lambda (n p b)
                     (equal (treesit-node-type p)
                            type))))))

but that generates "function already compiled" warning when
byte-compiling treesit.el.  The latest form shouldn't have any problem
anymore.

* lisp/treesit.el (treesit-simple-indent-presets): Change byte-compile
to plain evaluation.
2022-10-29 14:50:52 -07:00
Yuan Fu
f6e3de3f63
Not return noindent in treesit-indent
* lisp/treesit.el (treesit-indent): Don't return noindent.
(treesit-defun-type-regexp): Return (nil . nil) rather than nil.
2022-10-29 14:49:31 -07:00
Yuan Fu
da87895df2
Add treesit-node-top-level
Merge treesit-node-top-level-p and treesit--find-top-level-match into
treesit-node-top-level.

* doc/lispref/parsing.texi (Retrieving Node): Add manual entry for it.
* lisp/progmodes/js.el (js--treesit-imenu-1): Replace
treesit-node-top-level-p with treesit-node-top-level.
* lisp/treesit.el (treesit-node-top-level-p)
(treesit--find-top-level-match): Remove functions.
(treesit-node-top-level): New function.
* lisp/treesit.el (treesit-beginning-of-defun)
(treesit-end-of-defun): Replace treesit--find-top-level-match with
treesit-node-top-level.
2022-10-29 14:47:05 -07:00
Yuan Fu
baacad1771
Reflect recent change in tree-sitter manual sections
* doc/lispref/modes.texi (Parser-based Font Lock):
treesit-font-lock-enable is replaced by treesit-major-mode-setup.
* doc/lispref/modes.texi (Parser-based Indentation): Mention
treesit-major-mode-setup,
* doc/lispref/parsing.texi (Tree-sitter major modes): Remove
treesit-mode and global-treesit-mode, explain setup guideline.
2022-10-29 14:47:01 -07:00
Basil L. Contovounesios
1d62c96423 ; Silence warning in last hierarchy.el change. 2022-10-30 00:44:44 +03:00
Yuan Fu
3a784d1321
Fix parent-bol preset for tree-sitter indent
* lisp/treesit.el (treesit-simple-indent-presets): Return point rather
than column.
2022-10-29 13:05:52 -07:00
Yuan Fu
a915d836fc
Keep cursor position in treesit-indent
* lisp/treesit.el (treesit-indent): Create a marker and jump back to
that marker after indentation.
2022-10-29 11:59:45 -07:00
John Wiegley
6b25a41bc6 Merge pull request from andreyorst/face-spec-set-third-argument
GitHub-reference: https://github.com/jwiegley/use-package/issues/1009
2022-10-29 14:57:19 -04:00
Eli Zaretskii
44f1b1edcf ; * lisp/dired.el (dired--make-directory-clickable): Fix typo. 2022-10-29 19:52:48 +03:00
Yuan Fu
8607f018fd
Remove hack in js-mode's tree-sitter indentation rules
* lisp/progmodes/js.el (js--treesit-backward-up-list): Remove
function.
(js--treesit-indent-rules): Replace with new rule.
2022-10-29 09:50:46 -07:00
Yuan Fu
ce5ae0117e
Refine handling of node at point in treesit-indent
* doc/lispref/modes.texi (Parser-based Indentation): Document the
semantic clearly.
* lisp/treesit.el (treesit-simple-indent-presets): Replace with
current-indentation.
(treesit--indent-1): Now NODE always starts at BOL, and parent is
always the smallest node above NODE that spans BOL.
(treesit-indent): Don't use save-excurtion, no one else does.
2022-10-29 09:43:50 -07:00
Yuan Fu
bde8e87cb7
Fix treesit-indent-region
* lisp/treesit.el (treesit-simple-indent-presets): Remove extra comma.
(treesit--indent-1): Return (ANCHOR . OFFSET) instead of column.
(treesit-indent): Accept (ANCHOR . OFFSET) from treesit--indent-1.
(treesit--indent-region-batch-size): Reduce to 400.
(treesit-indent-region): Put a marker on each line's ANCHOR and
compute the indentation with ANCHOR + OFFSET.  Precomputing column
gives wrong indentation when the ANHOR line doesn't have correct
indent yet.
2022-10-29 09:09:09 -07:00
Eli Zaretskii
df7ca69920 Set 'native-comp-debug' to zero on MS-Windows
* lisp/emacs-lisp/comp.el (native-comp-debug): Don't emit debug
symbols on MS-Windows.  The default was originally made 1 because
without that, C backtraces on Windows would not show
natively-compiled functions correctly, or would even stop short of
reaching the topmost call frame.  But that turned out to be due to
a bug in GDB, which was meanwhile fixed in GDB 12.  So we can now
reset the value back to zero, and gain smaller *.eln files on
MS-Windows.
2022-10-29 18:59:04 +03:00
Stefan Kangas
81d7827f34 Prefer defvar-keymap in ps-mode.el
* lisp/progmodes/ps-mode.el (ps-mode-map, ps-run-mode-map): Prefer
defvar-keymap.
2022-10-29 17:08:51 +02:00
Stefan Kangas
5686df3d21 ; Remove redundant declares of w3m-minor-mode-map
* lisp/gnus/gnus-art.el (w3m-minor-mode-map):
* lisp/net/newst-backend.el (w3m-minor-mode-map): Don't declare.
2022-10-29 17:06:16 +02:00
Eli Zaretskii
647c36cbfa ; * etc/NEWS: Add entry about more performant overlays. 2022-10-29 16:34:08 +03:00
Alan Mackenzie
31e7b9c073 Fix the subr-arity returned by native compiled functions with lots of args
This fixes bug #58739.  Make subr-arity return, e.g., (12 . 12) rather than
(12 . many) for a function with a fixed number of arguments more than 8.

* lisp/emacs-lisp/comp.el (comp-prepare-args-for-top-level): Only return a cdr
of 'many when there are &rest arguments.

* src/eval.c (eval_sub): Also check for a fixed number of args over 8 when
using the nargs + *args calling convention.
(funcall_subr): Also check numargs <= 8 before using the fixed args calling
convention.  Include the case numargs > 8 in the aMany calling convention.

* src/lisp.h (DEFUN): Amend the comment about MANY.
2022-10-29 13:21:39 +00:00
Eli Zaretskii
174dd06464 Make Dired header clickable on non-Posix systems as well
* lisp/dired.el (dired--make-directory-clickable): Support
MS-Windows and MS-DOS absolute directory names with drive letters
and UNCs.  (Bug#21973)
2022-10-29 16:16:06 +03:00
Eli Zaretskii
e9bdf3d4bd Display the Dired buffer as unmodified initially
* lisp/dired.el (dired-readin): Make sure a newly-created Dired
buffer is shown as unmodified.  (Bug#58863)
2022-10-29 16:02:35 +03:00
Eli Zaretskii
15fc5225b1 ; * lisp/whitespace.el (whitespace-trailing): Fix a typo. 2022-10-29 15:40:31 +03:00
Andrey Listopadov
76a5ce5d86 Allow passing the SPEC-TYPE argument via :custom-face
GitHub-reference: https://github.com/jwiegley/use-package/issues/1008
Copyright-paperwork-exempt: yes
2022-10-29 13:26:31 +03:00
Po Lu
f826f56a41 Fix another GCC warning
* src/nsterm.m (ns_draw_glyphless_glyph_string_foreground): Fix
another compiler warning.
2022-10-29 18:22:28 +08:00
Po Lu
6f3d8ec4f5 Fix crash destroying NS frame tool bar
* src/nsterm.m (ns_draw_glyphless_glyph_string_foreground): Work
around silly GCC bug causing splurious warnings.
([EmacsWindow dealloc]): Detach tool bar before dealloc'ing
window.  (bug#58857)
2022-10-29 18:22:28 +08:00
Alan Mackenzie
dfde4fc82b c-get-fontification-context: Refine the last non-default arm of the cond
This fixes bug #58772.

* lisp/progmodes/cc-fonts.el (c-get-fontification-context): Make the function
return (decl . nil) when MATCH-POS is in the second paren list of something
like DEFUN (..) (..).  Tidy up untidy code with save-excursion's for greater
accuracy.  Set a c-type text property value c-decl-arg-start to speed up
future calls.  Reindent the entire function.
2022-10-29 10:04:37 +00:00
Matt Armstrong
9f3c896f7c ; * doc/emacs/text.texi (Quotation Marks): Typo fix. (Bug#58822) 2022-10-29 10:34:11 +03:00
Stefan Kangas
ce52746444 Prefer defvar-keymap in help.el
* lisp/help.el (help-key): New function.
(help-map): Prefer defvar-keymap.
2022-10-29 08:21:59 +02:00
Yuan Fu
4552b01d8c
Remove test of treesit-language-at
Because now it just calls a user-supplied function rather than doing
any work by itself.

* test/src/treesit-tests.el (treesit-parser-supplemental): Remove the
test.
2022-10-28 20:17:43 -07:00
Stefan Kangas
3b0296c8b0 Prefer defvar-keymap in page-ext.el
* lisp/textmodes/page-ext.el (pages--ctl-x-ctl-p-map)
(pages-directory-mode-map): Prefer defvar-keymap.
2022-10-29 04:02:20 +02:00
Stefan Kangas
aa23bf987a ; Minor cleanups in make-mode.el
* lisp/progmodes/make-mode.el
(makefile-query-one-target-method-function)
(makefile-insert-macro, makefile-insert-target)
(makefile-insert-target-ref, makefile-backslash-region)
(makefile-browser-next-line, makefile-browser-previous-line)
(makefile-remember-target): Minor cleanups.
2022-10-29 03:42:46 +02:00
Yuan Fu
f46eb3d3ca
Byte-compile treesit-simple-indent-presets
* lisp/treesit.el (treesit-simple-indent-presets): Byte-compile these
functions.
2022-10-28 17:56:05 -07:00
Po Lu
6fca31fdb8 Fix last change
* src/itree.c (struct itree_iterator):
(itree_iterator_next): Fix some fields and const confusion.
2022-10-29 08:55:40 +08:00
Yuan Fu
0c7a7df98e
Add treesit-indent-region
Now indenting a large buffer is reasonably fast.

* lisp/treesit.el (treesit-indent): Move meat to treesit--indent-1.
(treesit--indent-1)
(treesit-indent-region): New functions.
(treesit-major-mode-setup): Setup indent-region-function.
2022-10-28 17:54:43 -07:00
Po Lu
fbf2bfba07 Fix function declarations in itree headers
* src/itree.h: Make all declarations `extern'.
2022-10-29 08:48:58 +08:00