Yuan Fu [Mon, 21 Nov 2022 21:46:52 +0000 (13:46 -0800)]
; * lisp/progmodes/js.el (js-ts-mode): Add autoload cookie.
Yuan Fu [Mon, 21 Nov 2022 21:34:38 +0000 (13:34 -0800)]
; * test/src/treesit-tests.el (treesit-misc): Remove test.
This test is for treesit--setting-for-mode, which is removed when we
switched from using treesit-settings to using separate major modes.
Yuan Fu [Mon, 21 Nov 2022 21:33:03 +0000 (13:33 -0800)]
; Update tree-sitter starter guide
* admin/notes/tree-sitter/starter-guide: Reflect recent changes.
* admin/notes/tree-sitter/html-manual/Using-Parser.html:
* admin/notes/tree-sitter/html-manual/Tree_002dsitter-C-API.html:
* admin/notes/tree-sitter/html-manual/Parsing-Program-Source.html:
* admin/notes/tree-sitter/html-manual/Parser_002dbased-Indentation.html:
* admin/notes/tree-sitter/html-manual/Parser_002dbased-Font-Lock.html:
* admin/notes/tree-sitter/html-manual/Multiple-Languages.html:
* admin/notes/tree-sitter/html-manual/Language-Definitions.html: Update.
Yuan Fu [Mon, 21 Nov 2022 21:17:16 +0000 (13:17 -0800)]
; Fix typo in c-ts-mode--font-lock-settings
* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): Fix
typo.
Yuan Fu [Mon, 21 Nov 2022 20:54:35 +0000 (12:54 -0800)]
Merge remote-tracking branch 'savannah/master' into feature/tree-sitter
Yuan Fu [Mon, 21 Nov 2022 20:07:20 +0000 (12:07 -0800)]
; Minor fix in c-ts-mode fontification
* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): use
override. Include the outer call_expression.
(c-ts-mode--fontify-defun): Use the override given to it rather than
hard-code. Add missing space.
Yuan Fu [Mon, 21 Nov 2022 19:26:46 +0000 (11:26 -0800)]
Allow major modes to tweak tree-sitter fontification
treesit--font-lock-query-expand-range allows a major mode to fix
fontification problems temporarily before the parser can be fixed.
* lisp/treesit.el (treesit--font-lock-query-expand-range): New variable.
(treesit-font-lock-fontify-region): Use the new variable.
* lisp/textmodes/css-mode.el (css-ts-mode): Use the new variable.
Yuan Fu [Mon, 21 Nov 2022 18:52:55 +0000 (10:52 -0800)]
Further tweak tree-sitter fontification heuristics
So it turns out the slowness observed in bug#59415 is not due to the
size, but the strangely tall tree. Adjust the heuristic to DTRT:
don't enable the heuristic by default or when buffer is large, enable
when query is abnormally slow. We could do some clever thing that
calibrates a base reading for the query time instead of using a
hard-coded value, but it doesn't seem necessary.
* lisp/treesit.el (treesit--font-lock-fast-mode): New variable.
(treesit-font-lock-fontify-region): Don't activate heuristic by
default (reasons in comments). Measure the query time and activate
the fast mode if query time is long.
Yuan Fu [Mon, 21 Nov 2022 16:57:53 +0000 (08:57 -0800)]
; * src/treesit.c (treesit_load_language): Move call to eassume.
If handle is ever going to be NULL, it will be when error != NULL, so
we should only eassume handle != NULL after the check for error.
Eli Zaretskii [Mon, 21 Nov 2022 17:08:25 +0000 (19:08 +0200)]
; Silence byte-compiler warnings
* lisp/textmodes/css-mode.el:
* lisp/progmodes/python.el:
* lisp/progmodes/json-ts-mode.el:
* lisp/progmodes/js.el:
* lisp/progmodes/java-ts-mode.el:
* lisp/progmodes/c-ts-mode.el: Add declarations of tree-sitter
functions.
Mattias Engdegård [Mon, 21 Nov 2022 15:52:05 +0000 (16:52 +0100)]
; * test/src/treesit-tests.el (treesit-misc): Don't fail without ts
Eli Zaretskii [Mon, 21 Nov 2022 15:24:42 +0000 (17:24 +0200)]
; * lisp/treesit.el (treesit-parser-add-notifier): Add declaration.
Mattias Engdegård [Mon, 21 Nov 2022 14:41:28 +0000 (15:41 +0100)]
; Repair build without tree-sitter
Stefan Kangas [Mon, 21 Nov 2022 14:18:54 +0000 (15:18 +0100)]
; Doc fixes: remove references to missing symbols
* lisp/allout.el (allout-process-exposed): Don't refer to missing
value 'flat-indented'.
* lisp/help.el (resize-temp-buffer-window): Don't refer to missing
function 'preserve-window-size'.
* lisp/pcomplete.el (pcomplete-stub): Don't refer to missing
function 'pcomplete-filename'.
Stefan Kangas [Mon, 21 Nov 2022 14:16:08 +0000 (15:16 +0100)]
; Fix typos (misspelled symbols)
Michael Albinus [Mon, 21 Nov 2022 13:49:54 +0000 (14:49 +0100)]
Activate direct asynchronous processes for Tramp container methods
* doc/misc/tramp.texi (Remote processes): Mention also
tramp-container.el.
* lisp/emacs-lisp/ert-x.el (ert-remote-temporary-file-directory):
Add `tramp-direct-async' to "mock" method.
* lisp/net/tramp-container.el
(tramp-methods) <docker, podman, kubernetes>: Add `tramp-direct-async'.
* lisp/net/tramp.el (tramp-methods): Adapt docstring.
(tramp-handle-make-process): Handle `tramp-direct-async'.
* test/lisp/net/tramp-tests.el (tramp-methods) <mock>:
Add `tramp-direct-async'.
Gregory Heytings [Mon, 21 Nov 2022 12:44:13 +0000 (12:44 +0000)]
Make sed invocation in Makefile POSIX-compliant
* Makefile.in: Add a semicolon before the closing brace, which is
required by POSIX. Fixes bug#59444.
Stefan Kangas [Mon, 21 Nov 2022 10:30:58 +0000 (11:30 +0100)]
* lisp/forms.el (forms-mode): Prefer setq-local.
Stefan Kangas [Mon, 21 Nov 2022 10:20:01 +0000 (11:20 +0100)]
Make instructions for updating ancient filesets obsolete
* lisp/filesets.el (filesets-update-pre010505): Make update
information for filesets older than 2001 obsolete. Note that this
dates back to before filesets.el was even added to Emacs.
Yuan Fu [Mon, 21 Nov 2022 09:27:55 +0000 (01:27 -0800)]
Use constant face for labels in c-ts-mode
* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): Use
constant face for labels.
Yuan Fu [Mon, 21 Nov 2022 04:52:16 +0000 (20:52 -0800)]
; * lisp/textmodes/css-mode.el (css-ts-mode): Fix typo.
Yuan Fu [Mon, 21 Nov 2022 04:43:15 +0000 (20:43 -0800)]
Add separate keymaps for js/python/css-ts-mode
* lisp/progmodes/js.el (js-ts-mode-map)
* lisp/progmodes/python.el (python-ts-mode-map)
* lisp/textmodes/css-mode.el (css-ts-mode-map): New keymap.
Yuan Fu [Mon, 21 Nov 2022 04:31:42 +0000 (20:31 -0800)]
Tweak python-ts-mode fontification
* lisp/progmodes/python.el (python--treesit-fontify-string): Make the
matching condition for docstrings more specific.
Yuan Fu [Mon, 21 Nov 2022 04:29:53 +0000 (20:29 -0800)]
Fix tree-sitter fontification heuristic
Previously applied heuristic 2 sometimes invalidates heuristic 1, add
a guard so it doesn't.
The new function is just for clearity of the code and has nothing to
do with the change itself.
* lisp/treesit.el (treesit--node-length): New function
(treesit-font-lock-fontify-region): Use the new function. Only do
heuristic 2 when the node is large.
Stefan Kangas [Mon, 21 Nov 2022 08:28:05 +0000 (09:28 +0100)]
* lisp/woman.el (woman-mode-map): Prefer defvar-keymap.
Juri Linkov [Mon, 21 Nov 2022 07:56:06 +0000 (09:56 +0200)]
* lisp/outline.el (outline-search-function): New variable (bug#53981).
(outline-font-lock-keywords, outline-font-lock-face)
(outline-minor-mode-highlight-buffer, outline-next-preface)
(outline-next-heading, outline-previous-heading)
(outline-back-to-heading, outline-on-heading-p, outline-demote)
(outline-map-region, outline-next-visible-heading)
(outline-hide-sublevels, outline-up-heading): Use outline-search-function
when it's non-nil as an alternative to searching outline-regexp.
(outline-search-level, outline-search-text-property): New functions.
* lisp/apropos.el (apropos-mode): Set outline-search-function
instead of unreliable outline-regexp.
(apropos-print): Add text property outline-level.
* lisp/emacs-lisp/shortdoc.el (shortdoc-display-group):
Add text property outline-level on text separate from final newlines.
(shortdoc-display-group): Add a narrow newline to not show
text properties of the final line when the outline is hidden.
(shortdoc--display-function): Add text property outline-level.
(shortdoc-mode): Set buffer-local outline-search-function and outline-level.
Po Lu [Mon, 21 Nov 2022 05:24:15 +0000 (13:24 +0800)]
* src/treesit.c (treesit_load_language): Fix uninitialized uses.
Po Lu [Mon, 21 Nov 2022 05:17:48 +0000 (13:17 +0800)]
Avoid usage of intern_c_string in treesit.c
* src/treesit.c (Ftreesit_pattern_expand): Use DEFSYM'd symbols
when the naming makes sense.
(syms_of_treesit): Add new defsyms QCanchor, QCequal, QCmatch.
Po Lu [Mon, 21 Nov 2022 05:14:43 +0000 (13:14 +0800)]
Stylistic fixes to treesit.c
* src/treesit.c (treesit_make_ranges):
(Ftreesit_parser_set_included_ranges): Fix coding style.
Po Lu [Mon, 21 Nov 2022 05:12:16 +0000 (13:12 +0800)]
Fix MS-DOS build
* msdos/sed1v2.inp: Edit out tree-sitter stuff.
Yuan Fu [Mon, 21 Nov 2022 01:15:42 +0000 (17:15 -0800)]
Add another heuristic to speed up tree-sitter fontification
* lisp/treesit.el (treesit-font-lock-fontify-region): Use
treesit--children-covering-range to reduce the node size.
Yuan Fu [Mon, 21 Nov 2022 00:56:33 +0000 (16:56 -0800)]
Limit recursion level for tree-sitter imenu functions
Generating imenu index doesn't require going down to the bottom of the
tree (defun's are usually top-level). Add limit so we don't go too
far down on very large buffers.
* lisp/progmodes/c-ts-mode.el (c-ts-mode--imenu)
* lisp/progmodes/java-ts-mode.el (java-ts-mode--imenu)
* lisp/progmodes/js.el (js--treesit-imenu)
* lisp/progmodes/json-ts-mode.el (json-ts-mode--imenu)
* lisp/progmodes/python.el (python-imenu-treesit-create-index)
* lisp/textmodes/css-mode.el (css--treesit-imenu): Add limit to
treesit-induce-sparse-tree.
Yuan Fu [Mon, 21 Nov 2022 00:37:19 +0000 (16:37 -0800)]
Improve tree-sitter fontification on large buffers
* lisp/treesit.el (treesit--children-covering-range)
(treesit--children-covering-range-recurse): New functions. They are
not currently used but could be useful in the future, so I left them
in place.
(treesit-font-lock-fontify-region):
* lisp/treesit.el (treesit-font-lock-fontify-region): Use the result
of treesit-node-on instead of the root node.
Stephen Leake [Sun, 20 Nov 2022 21:45:13 +0000 (13:45 -0800)]
Delete eglot spinner; not useful
* lisp/progmodes/eglot.el (eglot-lsp-server): Delete slot spinner.
(eglot--mode-line-format): Don't include spinner in mode-line.
(eglot--signal-textDocument/didChange): Don't set spinner.
Juanma Barranquero [Sun, 20 Nov 2022 20:40:08 +0000 (21:40 +0100)]
Avoid native compiler setting user-init-file to warnings.el (bug#59358)
* src/lread.c (maybe_swap_for_eln): Use a delayed warning
instead of `display-warning' to avoid a recursive call to
Fload while loading the init file that sets `user-init-file'
to a bogus value.
Juri Linkov [Sun, 20 Nov 2022 18:10:45 +0000 (20:10 +0200)]
Rename 'elisp-eval-buffer' to 'elisp-eval-region-or-buffer' (bug#59350)
* lisp/progmodes/elisp-mode.el (elisp-eval-region-or-buffer):
Rename recently added command 'elisp-eval-buffer' to support active region.
(emacs-lisp-mode-map, lisp-interaction-mode-map): Rebind 'C-c C-e'
from elisp-eval-buffer to elisp-eval-region-or-buffer.
Juri Linkov [Sun, 20 Nov 2022 18:02:20 +0000 (20:02 +0200)]
Disable display-line-numbers-mode in string-pixel-width (bug#59311)
* lisp/emacs-lisp/subr-x.el (string-pixel-width):
Turn off display-line-numbers-mode when it's enabled.
Michael Albinus [Sun, 20 Nov 2022 16:58:49 +0000 (17:58 +0100)]
* doc/misc/Makefile.in (INFO_COMMON): Sort alphabetically.
Michael Albinus [Sun, 20 Nov 2022 16:58:34 +0000 (17:58 +0100)]
Rework tramp-archive autoloads
* lisp/net/tramp-archive.el (tramp-archive-autoload-file-name-regexp):
Use `tramp-compat-rx'. Protect `tramp-archive-suffixes' and
`tramp-archive-compression-suffixes'.
(tramp-archive-file-name-handler): Don't autoload.
(tramp-register-archive-autoload-file-name-handler): Rename from
`tramp-register-archive-file-name-handler'. Adapt callees.
Po Lu [Sun, 20 Nov 2022 13:01:10 +0000 (21:01 +0800)]
Coalesce duplicate scroll valuator handling code
Also, write more commentary.
* src/xterm.c (xi_populate_scroll_valuator): New function.
Describe the meaning of each field in xi_scroll_valuator_t.
(xi_populate_device_from_info, xi_handle_new_classes): Factor
out duplicate code to that function.
Stefan Kangas [Sun, 20 Nov 2022 11:59:39 +0000 (12:59 +0100)]
; Fix typos
Stefan Kangas [Sun, 20 Nov 2022 11:25:54 +0000 (12:25 +0100)]
; Add .no-advice-on-failure to .gitignore
This is for the new "disable advice on failure" feature added by
Gregory Heytings <gregory@heytings.org>.
* .gitignore: Add .no-advice-on-failure.
Eli Zaretskii [Sun, 20 Nov 2022 11:51:22 +0000 (13:51 +0200)]
; * lisp/proced.el (proced-auto-update-timer): Fix last change.
Laurence Warne [Tue, 15 Nov 2022 18:48:40 +0000 (18:48 +0000)]
Cancel proced auto update timer if no proced buffers are open
* lisp/proced.el (proced-auto-update-timer): Cancel timer if no proced
buffers are open.
Eli Zaretskii [Sun, 20 Nov 2022 11:10:08 +0000 (13:10 +0200)]
Advise against using too-high GC thresholds
* doc/lispref/internals.texi (Garbage Collection):
* src/alloc.c (syms_of_alloc) <gc-cons-threshold>
<gc-cons-percentage>: Advise against enlarging the GC thresholds
more than needed and for prolonged periods of time.
Gabriel do Nascimento Ribeiro [Thu, 17 Nov 2022 00:59:17 +0000 (21:59 -0300)]
Handle error in bookmark-relocate when filename is nil
* lisp/bookmark.el (bookmark-relocate): Handle error when
filename is nil. (Bug#59326)
Eli Zaretskii [Sun, 20 Nov 2022 10:10:38 +0000 (12:10 +0200)]
; Avoid "Local Variables" popups in Emacs tree
* lisp/vc/vc.el (vc-prepare-patches-separately): Add an autoloaded
form for the 'safe-local-variable' property. (Bug#59384)
Juanma Barranquero [Sun, 20 Nov 2022 09:25:59 +0000 (10:25 +0100)]
; Fix typos
* doc/lispref/display.texi (Size of Displayed Text):
* lisp/net/trampver.el (tramp-inside-emacs): Fix typos in docstrings.
Eli Zaretskii [Sun, 20 Nov 2022 08:30:38 +0000 (10:30 +0200)]
; Improve recently-modified documentation
* lisp/progmodes/python.el (python-base-mode)
(python--treesit-fontify-string):
* lisp/textmodes/css-mode.el (css-base-mode):
* lisp/treesit.el (treesit-ready-p, treesit-comment-end)
(treesit-simple-indent-presets): Fix typos and wording in doc strings.
* doc/lispref/parsing.texi (Tree-sitter major modes):
* doc/lispref/modes.texi (Parser-based Indentation): Fix wording
and add cross-references.
Yuan Fu [Sun, 20 Nov 2022 02:58:12 +0000 (18:58 -0800)]
Fix uses of treesit-ready-p
* lisp/progmodes/c-ts-mode.el (c-ts-mode)
(c++-ts-mode)
* lisp/progmodes/java-ts-mode.el (java-ts-mode)
* lisp/progmodes/js.el (js-ts-mode)
* lisp/progmodes/json-ts-mode.el (json-ts-mode)
* lisp/progmodes/python.el (python-ts-mode)
* lisp/progmodes/sh-script.el (sh-mode)
* lisp/progmodes/ts-mode.el (ts-mode): Remove the MODE argument.
Yuan Fu [Sun, 20 Nov 2022 02:53:53 +0000 (18:53 -0800)]
Remove treesit-settings
Remove it since we are using separate major modes for tree-sitter and
native variant now.
* doc/lispref/parsing.texi (Tree-sitter major modes): Update manual.
* lisp/treesit.el (treesit-settings): Remove option.
(treesit--setting-for-mode): Remove function.
(treesit-ready-p): Don't check for user preference in treesit-settings.
Yuan Fu [Sun, 20 Nov 2022 02:45:45 +0000 (18:45 -0800)]
Remove tree-sitter setup from js-json-mode
* lisp/progmodes/js.el (js-json--treesit-font-lock-settings)
(js--json-treesit-indent-rules): Remove variables.
(js-json-mode): Remove tree-sitter setup.
Yuan Fu [Sun, 20 Nov 2022 01:59:14 +0000 (17:59 -0800)]
Fix tree-sitter comment indentation for C-like languages
The goal is to indent like this:
/* comment
comment --> This line aligns with the beginning of the first line
*/ --> This line aligns with the opening comment token
* lisp/treesit.el (treesit-comment-start)
(treesit-comment-end): New variables.
(treesit-simple-indent-presets): New preset comment-end,
comment-start, comment-start-skip
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles)
(c-ts-mode)
* lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules)
(java-ts-mode)
* lisp/progmodes/js.el (js--treesit-indent-rules)
(js-ts-mode)
* lisp/progmodes/ts-mode.el (ts-mode--indent-rules)
(ts-mode): Add identical indent rules to each mode, and set identical
treesit-comment-start/end's.
* doc/lispref/modes.texi (Parser-based Indentation)
* doc/lispref/parsing.texi (Tree-sitter major modes): Update manual.
Yuan Fu [Sun, 20 Nov 2022 00:56:42 +0000 (16:56 -0800)]
Separate native and tree-sitter variant of js-mode
* lisp/progmodes/js.el (js-base-mode): New mode.
(js-mode): Return to before tree-sitter setup is added, change to
inherit from js-base-mode.
(js-ts-mode): New mode. Now it doesn't use any cc-mode feature,
meaning it looses comment filling.
Yuan Fu [Sun, 20 Nov 2022 00:10:46 +0000 (16:10 -0800)]
Merge function/class-name features in python-mode
To keep consistency with other tree-sitter major modes.
* lisp/progmodes/python.el (python--treesit-settings)
(python-ts-mode): Merge function-name and class-name features into
definition.
Yuan Fu [Sun, 20 Nov 2022 00:09:08 +0000 (16:09 -0800)]
Split python-mode into native and tree-sitter variant
* lisp/progmodes/python.el (python-base-mode): New virtual mode that
contains most of the setup.
(python-mode): Change to inherit from python-base-mode.
(python-ts-mode): New mode that sets up tree-sitter.
Yuan Fu [Sat, 19 Nov 2022 23:27:07 +0000 (15:27 -0800)]
Expand css-ts-mode and merge it into css-mode
* lisp/progmodes/css-ts-mode.el: Deleted.
* lisp/textmodes/css-mode.el (css--treesit-indent-rules)
(css--treesit-settings): New variables.
(css--treesit-imenu-1)
(css--treesit-imenu): New functions.
* lisp/textmodes/css-mode.el (css-base-mode): New mode inherited by
both css-mode and css-ts-mode.
(css-ts-mode): New mode.
(css-mode): Inherit from css-base-mode, and move some setup to
css-base-mode.
Yuan Fu [Sat, 19 Nov 2022 23:25:06 +0000 (15:25 -0800)]
Change tree-sitter indent preset 'match' to count on all nodes
I changed other presets to count all nodes a while ago, but forgot to
change 'match' too.
* lisp/treesit.el (treesit-simple-indent-presets): Change to count on
both named and anonymous nodes.
Eli Zaretskii [Sat, 19 Nov 2022 19:34:07 +0000 (21:34 +0200)]
Fix encoding and display of messages sent by server to emacsclient
* lisp/server.el (server-start): Use 'locale-coding-system' to
encode messages sent back to the client.
* lib-src/emacsclient.c (main): Print '-error' messages via
'message', not directly via 'fprintf'. This shows the error on
MS-Windows when the client is invoked as 'emacsclientw', since
stderr goes to the bit bucket in that case.
Thomas Fitzsimmons [Sat, 19 Nov 2022 16:39:21 +0000 (11:39 -0500)]
EUDC: Add BBDB test
* test/lisp/net/eudc-tests.el (eudcb-ldap): Call skip-unless with
slapd check.
(eudcb-bbdb): New test.
Gregory Heytings [Sat, 19 Nov 2022 15:46:46 +0000 (15:46 +0000)]
Fix global face scaling bug due to rounding.
* lisp/face-remap.el (global-text-scale-adjust): Try again if the face
height should have changed but did not actually change. Update the
docstring to clarify the difference with 'text-scale-adjust'.
(global-text-scale-adjust--increment-factor): New internal variable.
Fixes bug#59122.
(text-scale-adjust): Update the docstring to clarify the difference
with 'global-text-scale-adjust'.
Brent Westbrook [Sat, 19 Nov 2022 14:23:57 +0000 (09:23 -0500)]
EUDC: Fix a void-variable error
* lisp/net/eudcb-mailabbrev.el (eudc-mailabbrev-query-internal):
Check if symbol is bound before taking its value. (Bug#59369)
Gregory Heytings [Sat, 19 Nov 2022 14:00:17 +0000 (14:00 +0000)]
; * Makefile.in: Add option to disable advice on failure.
Philip Kaludercic [Sat, 19 Nov 2022 11:19:37 +0000 (12:19 +0100)]
* lisp/emacs-lisp/package.el (package-maintainers): Improve error handling
Eli Zaretskii [Sat, 19 Nov 2022 12:43:51 +0000 (14:43 +0200)]
; Avoid byte-compiler warning in startup.el
* lisp/startup.el (startup--load-user-init-file): Avoid
byte-compiler warnings about 'comp-eln-to-el-h'. (Bug#59334)
Stefan Kangas [Sat, 19 Nov 2022 11:51:31 +0000 (12:51 +0100)]
; Fix typos in bs.el
* lisp/bs.el: Fix typos.
(bs-define-sort-function, bs-cycle-next, bs-cycle-previous): Fix
variable name typo.
Mattias Engdegård [Sat, 19 Nov 2022 11:29:46 +0000 (12:29 +0100)]
* Makefile.in: Escape literal asterisks in regexps
Discovered by Po Lu.
Po Lu [Sat, 19 Nov 2022 10:46:07 +0000 (18:46 +0800)]
Fix error trapping in x_set_mouse_color
* src/xfns.c (x_set_mouse_color): Use
x_uncatch_errors_after_check right after x_had_errors_p. Then,
trap errors around FreeCursor requests, since some of the IDs
may not name valid cursors.
Eli Zaretskii [Sat, 19 Nov 2022 09:52:06 +0000 (11:52 +0200)]
; Improve doc strings of Ethiopic support functions and variables
* lisp/language/ethio-util.el (ethio-primary-language)
(ethio-secondary-language, ethio-use-colon-for-colon)
(ethio-use-three-dot-question, ethio-quote-vowel-always)
(ethio-W-sixth-always, ethio-sera-to-fidel-buffer)
(ethio-sera-to-fidel-region, ethio-sera-to-fidel-marker)
(ethio-fidel-to-sera-buffer, ethio-fidel-to-sera-region)
(ethio-fidel-to-sera-marker, ethio-get-consonant)
(ethio-fidel-to-tex-buffer, ethio-tex-to-fidel-buffer)
(ethio-fidel-to-java-buffer, ethio-java-to-fidel-buffer)
(ethio-find-file, ethio-write-file, ethio-gemination)
("ethiopic-sera"): Doc fixes.
Yuan Fu [Sat, 19 Nov 2022 09:33:36 +0000 (01:33 -0800)]
Use keyword-face for declaration commands in tree-sitter sh-mode
* lisp/progmodes/sh-script.el: Change builtin to keyword.
Eli Zaretskii [Sat, 19 Nov 2022 09:25:25 +0000 (11:25 +0200)]
; Explain why some files are encoded in utf-8-emacs
* lisp/international/titdic-cnv.el:
* lisp/language/ethio-util.el:
* lisp/language/ethiopic.el:
* lisp/language/ind-util.el:
* lisp/language/tibetan.el:
* lisp/language/tibet-util.el:
* lisp/leim/quail/ethiopic.el:
* lisp/leim/quail/tibetan.el: Add commentary explaining why these
files are encoded in utf-8-emacs. (Bug#59341)
Yuan Fu [Sat, 19 Nov 2022 08:41:19 +0000 (00:41 -0800)]
; * lisp/treesit.el (treesit--font-lock-notifier): Add messaging.
Yuan Fu [Sat, 19 Nov 2022 08:25:57 +0000 (00:25 -0800)]
Fix python-mode tree-sitter fontification
Forgot to update python-mode's code when I added the tree-sitter
notifier facility. Now it doesn't need any special treatment anymore.
Leaving it as is causes some incorrect fontification.
* lisp/progmodes/python.el (python--treesit-fontify-string): Accept
the string node rather than the quote node.
(python--treesit-settings): Capture string node.
Po Lu [Sat, 19 Nov 2022 07:24:25 +0000 (15:24 +0800)]
Fixes to fast mouse position reporting
* src/xterm.c (x_fast_mouse_position): New function. Factor out
most of the fast mouse position code here. Correctly port some
Haiku code to take into account multiple displays. Report
scroll bar coordinates correctly.
(XTmouse_position): Call it.
Thomas Fitzsimmons [Sat, 19 Nov 2022 07:05:36 +0000 (02:05 -0500)]
EUDC: Add LDAP tests
* test/lisp/net/eudc-resources/slapd.conf: New file.
* test/lisp/net/eudc-resources/dc=gnu,dc=org.ldif: Likewise.
* test/lisp/net/eudc-resources/dc=gnu,dc=org: New files.
* test/lisp/net/eudc-tests.el (eudcb-ldap): New test.
Po Lu [Sat, 19 Nov 2022 05:59:53 +0000 (13:59 +0800)]
Fix automatic DPI adjustment and add workarounds for some systems
* lisp/faces.el (x-create-frame-with-faces): New field
`delayed-font'. Set the `font-parameter' property to `font' in
the given parameter list after face-set-after-frame-default is
called.
* src/fontset.c (Fset_fontset_font): Avoid changing
`font-parameter' with the call to Fmodify_frame_parameters.
* src/frame.c (gui_set_frame_parameters_1): New function.
Factor out gui_set_frame_parameters here, and add an argument
DEFAULT_PARAMETER. If the `font' parameter is set, and
`default_parameter' is not, then set the `font-parameter' frame
parameter to the `font' parameter as well, to keep track of
which user-specified `font' frame parameter set the default
face's font on the frame.
(gui_set_frame_parameters): Call gui_set_frame_parameters_1 with
new arg set to false.
(gui_set_font): Remove broken implementation of
`font-parameter'.
(gui_default_parameter): If the default value was used, then
call gui_set_frame_parameters_1 with the new argument set to
false. This is because no font was specified as a frame
parameter by the user, so Freconsider_frame_fonts is free to do
anything it wants.
(Freconsider_frame_fonts): If `font-parameter' is set, then use
it.
(syms_of_frame): New defsym Qfont_parameter.
* src/frame.h: Update prototypes.
* src/haikuterm.c (haiku_default_font_parameter):
* src/pgtkfns.c (pgtk_default_font_parameter):
* src/w32fns.c (w32_default_font_parameter): Stop setting
`font-parameter' here. This code resulted in decades of
automatic font rescaling not working correctly.
* src/xfaces.c (set_font_frame_param): Clear the
`font-parameter' frame parameter.
(Finternal_merge_in_global_face):
* src/xfns.c (x_default_font_parameter): Avoid changing
`font-parameter' in response to changes to face attributes.
* src/xsettings.c (apply_xft_settings): Add workaround for
Cairo. (bug#59371, bug#59347, bug#59283, bug#59271, bug#59285,
bug#59306.)
Po Lu [Sat, 19 Nov 2022 03:19:41 +0000 (11:19 +0800)]
Fix bug#59371
* src/frame.c (Freconsider_frame_fonts): If a font parameter was
set, create a params alist with it. Then, pass it to both
default_font_parameter and face-set-after-frame-default.
(bug#59371)
Po Lu [Sat, 19 Nov 2022 03:13:15 +0000 (11:13 +0800)]
Fix earlier changes to keyboard.c
* src/keyboard.c (coords_in_menu_bar_window): New function.
(make_lispy_event): Do not process menu bar events on window
system frames if there is no menu bar window or the click lies
outside.
Po Lu [Sat, 19 Nov 2022 00:42:56 +0000 (08:42 +0800)]
Fix build with ext menu bar
* src/keyboard.c (make_lispy_event): Don't access
menu_bar_window when !HAVE_EXT_MENU_BAR.
Manuel Giraud [Fri, 18 Nov 2022 08:24:55 +0000 (09:24 +0100)]
Fix click position to menu bar entry with no-toolkit
* src/keyboard.c (make_lispy_event): Use x_y_to_hpos_vpos to
compute correct menu bar position should the menu face change.
* src/xdisp.c (x_y_to_hpos_vpos): Not static anymore.
* src/dispextern.h: Export x_y_to_hpos_vpos.
Mattias Engdegård [Fri, 18 Nov 2022 18:50:33 +0000 (19:50 +0100)]
; gnus-icalendar-tests: revert erroneous 'typo fix'
Thomas Fitzsimmons [Thu, 17 Nov 2022 14:22:08 +0000 (09:22 -0500)]
EUDC: Revert eudc-server-hotlist default change
* etc/NEWS: Remove eudc-server-hotlist default change.
* lisp/net/eudc-vars.el (eudc-server-hotlist): Set to nil.
(Bug#59314)
Stefan Monnier [Fri, 18 Nov 2022 16:11:46 +0000 (11:11 -0500)]
itree: Make sure a deleted overlay has NULL pointer fields
* src/buffer.c (delete_all_overlays): Use POST_ORDER to set the node's
pointers to NULL, as god intended.
* src/itree.c (itree_insert_node): Uncomment the assertion accordingly.
Stefan Monnier [Fri, 18 Nov 2022 15:45:29 +0000 (10:45 -0500)]
* lisp/emacs-lisp/bytecomp.el (byte-compile-dynamic-variable-bind): Typo
Robert Pluim [Fri, 18 Nov 2022 15:05:05 +0000 (16:05 +0100)]
Improve 'defvar-keymap' docstring
* etc/NEWS: Improve ':repeat' entry for 'defvar-keymap'.
* lisp/keymap.el (defvar-keymap): Improve description of ':repeat'
keyword.
Robert Pluim [Fri, 18 Nov 2022 15:02:32 +0000 (16:02 +0100)]
Silence rmailsum byte compiler warnings
* lisp/mail/rmailsum.el (rmail-summary-by-thread): Prefix unused
lambda args with '_'.
Robert Pluim [Thu, 17 Nov 2022 15:45:36 +0000 (16:45 +0100)]
Use boolean values directly in rmailsum
* lisp/mail/rmailsum.el (rmail-summary-invert):
(rmail-summary-direct-descendants):
(rmail-summary--walk-thread-message-recursively):
(rmail-summary-by-thread):
(rmail-summary-by-labels):
(rmail-summary-by-recipients):
(rmail-summary-by-regexp):
(rmail-summary-by-topic):
(rmail-summary-by-senders): Use the boolean values in
'rmail-summary-currently-displayed-msgs' and similar directly instead
of comparing them to t and nil.
Stefan Kangas [Fri, 18 Nov 2022 14:48:22 +0000 (15:48 +0100)]
; Fix typos
Juanma Barranquero [Fri, 18 Nov 2022 12:57:00 +0000 (13:57 +0100)]
Avoid `user-init-file' being set to an eln file (bug#59334)
* lisp/startup.el (startup--load-user-init-file): If possible,
point `user-init-file' to the source file if the init file was
native-compiled.
Stefan Kangas [Fri, 18 Nov 2022 12:06:55 +0000 (13:06 +0100)]
; Fix typos (prefer US spelling)
Mattias Engdegård [Fri, 18 Nov 2022 11:09:46 +0000 (12:09 +0100)]
Fix simple-tests when run noninteractively
* test/lisp/simple-tests.el
(simple-execute-extended-command--describe-binding-msg):
Bind text-quoting-style explicitly to ensure consistent behaviour
whether or not the test is run interactively.
Stefan Kangas [Fri, 18 Nov 2022 10:59:07 +0000 (11:59 +0100)]
Avoid raw control characters in grm-wy-boot.el
* lisp/cedet/semantic/grm-wy-boot.el
(semantic-grammar-wy--parse-table): Don't use raw control characters.
Juri Linkov [Fri, 18 Nov 2022 07:19:23 +0000 (09:19 +0200)]
* lisp/repeat.el (describe-repeat-maps): More outlines and page separators.
Po Lu [Fri, 18 Nov 2022 01:08:59 +0000 (09:08 +0800)]
Add knob to make `mouse-position' faster on X
* etc/PROBLEMS (Improving performance with slow X connections):
Add new advice.
* src/xterm.c (XTmouse_position): Add alternative
implementations for slow connections.
(syms_of_xterm): Add new variable to enable them.
* src/xterm.h (struct x_display_info): Update commentary.
Stefan Monnier [Thu, 17 Nov 2022 23:48:38 +0000 (18:48 -0500)]
Merge remote-tracking branch 'origin/scratch/noverlay'
Stefan Monnier [Thu, 17 Nov 2022 23:09:37 +0000 (18:09 -0500)]
itree.c: Get rid of the old iterator code
Only use the new iterator which relies on a fixed size (and small)
state in the iterator.
This makes non-local exits safe within ITREE_FOREACH loops.
* src/itree.c (make_nav, nav_nodeptr, nav_flag, itree_stack_clear)
(itree_stack_push_flagged): Delete functions.
(nodeptr_and_flag): Delete type.
(struct itree_stack): Make the array hold plain pointers instead.
(itree_stack_push): Inline the former code of `itree_stack_push_flagged`.
(itree_stack_pop): Change return type.
(itree_contains): Don't call `ITREE_FOREACH_ABORT` any more.
(itree_insert_gap): Simplify access to the stack of nodes.
(itree_delete_gap, itree_insert_gap): Adjust code to new return type of
`itree_stack_pop`.
(itree_iterator_finish): Delete function.
(itree_iterator_start): Don't setup the `stack` field any more.
(itree_iterator_next): Delete function.
(itree_iter_next): Rename to `itree_iterator_next` and make it non-static.
(itree_iterator_narrow): Don't check the `running` flag any more.
* src/itree.h (itree_iterator_finish): Remove declaration.
(struct itree_iterator): Remove the `stack` and `running` fields.
(ITREE_FOREACH_ABORT): Delete macro.
(ITREE_FOREACH): Don't call `itree_iterator_finish` any more.
* src/xdisp.c (strings_with_newlines):
* src/buffer.c (overlays_in, next_overlay_change, overlay_touches_p):
Don't call `ITREE_FOREACH_ABORT` any more.
Stefan Monnier [Thu, 17 Nov 2022 22:00:22 +0000 (17:00 -0500)]
itree.c: Make the iterator reentrant (bug#59183)
Get rid of the global iterator object and instead allocate
a separate iterator for every loop. This still uses the "duplicate
iterator" code, including the old iterator which needs a stack,
make ITREE_FOREACH a bit more expensive than we'd like.
* src/itree.h (init_itree, forget_itree, itree_iterator_busy_p):
Delete declarations.
(itree_iterator_start): Add iterator arg and remove `line` and `file` args.
(struct itree_iterator): Move from `itree.c`. Remove `line` and
`file` fields.
(ITREE_FOREACH): Stack allocate an iterator object and pass it to
`itree_iterator_start`.
* src/itree.c (struct itree_iterator): Move to itree.h.
(iter): Delete global variable.
(itree_iterator_create, init_itree, forget_itree, itree_iterator_busy_p):
Delete functions.
(itree_contains): Adjust assertion.
(itree_iterator_finish): Deallocate the iterator's stack.
(itree_iterator_start): Take the (uninitialized) iterator as argument.
Allocate a fresh new stack. Remove `file` and `line` arguments.
Don't check `running` any more since the iterator is not expected to be
initialized at all.
* src/eval.c (signal_or_quit):
* src/alloc.c (garbage_collect): Don't check `itree_iterator_busy_p`
any more.
* src/emacs.c (main): No need to `init_itree` any more.
(Fdump_emacs): No need to `forget_itree` any more.
Philip Kaludercic [Thu, 17 Nov 2022 16:39:46 +0000 (17:39 +0100)]
* lisp/emacs-lisp/package-vc.el: Autoload package-vc-update{,-all}
Philip Kaludercic [Wed, 16 Nov 2022 09:59:53 +0000 (10:59 +0100)]
; Clarify what a package specification is
* lisp/emacs-lisp/package-vc.el (package-vc-selected-packages): Expand
docstring.
Philip Kaludercic [Wed, 16 Nov 2022 09:46:43 +0000 (10:46 +0100)]
Ensure 'package-vc-prepare-patch' runs in the right directory
* lisp/emacs-lisp/package-vc.el (package-vc-prepare-patch): Bind
'default-directory'.p