Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
8044140b
Unverified
Commit
8044140b
authored
Dec 26, 2023
by
Yuan Fu
Browse files
Revert
e8df6c31
parent
5213e92f
Pipeline
#27644
failed with stages
in 12 minutes and 36 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
src/treesit.c
src/treesit.c
+7
-4
No files found.
src/treesit.c
View file @
8044140b
...
...
@@ -600,8 +600,6 @@ treesit_load_language (Lisp_Object language_symbol,
/* First push just the filenames to the candidate list, which will
make dynlib_open look under standard system load paths. */
treesit_load_language_push_for_each_suffix
(
lib_base_name
,
&
path_candidates
);
/* This is used for reporting errors (i.e., just filenames). */
Lisp_Object
base_candidates
=
path_candidates
;
/* Then push ~/.emacs.d/tree-sitter paths. */
Lisp_Object
lib_name
=
Fexpand_file_name
(
concat2
(
build_string
(
"tree-sitter/"
),
lib_base_name
),
...
...
@@ -624,6 +622,7 @@ treesit_load_language (Lisp_Object language_symbol,
fail. */
dynlib_handle_ptr
handle
;
const
char
*
error
;
Lisp_Object
error_list
=
Qnil
;
tail
=
path_candidates
;
error
=
NULL
;
...
...
@@ -637,13 +636,17 @@ treesit_load_language (Lisp_Object language_symbol,
error
=
dynlib_error
();
if
(
error
==
NULL
)
break
;
else
error_list
=
Fcons
(
build_string
(
error
),
error_list
);
}
if
(
error
!=
NULL
)
{
/* Yes, the error message list gets a bit verbose, but those
messages will be helpful for certain errors like libc version
mismatch. */
*
signal_symbol
=
Qtreesit_load_language_error
;
*
signal_data
=
list3
(
Qnot_found
,
base_candidates
,
build_string
(
"No such file or directory"
));
*
signal_data
=
Fcons
(
Qnot_found
,
Fnreverse
(
error_list
));
return
NULL
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment