[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master abfb76732c 2/9: Remove internal_condition_case_[345]
From: |
Paul Eggert |
Subject: |
master abfb76732c 2/9: Remove internal_condition_case_[345] |
Date: |
Sat, 19 Mar 2022 15:49:03 -0400 (EDT) |
branch: master
commit abfb76732c7fd321e5662f9885c301833b3281a7
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>
Remove internal_condition_case_[345]
* src/comp.c (directory_files_matching) [WINDOWSNT]: New function.
(eln_load_path_final_clean_up) [WINDOWSNT]: Use it.
This removes the need for internal_condition_case_5.
* src/eval.c (internal_condition_case_3)
(internal_condition_case_4, internal_condition_case_5): Remove.
The first two were never used; the last only in now-removed code.
---
src/comp.c | 12 ++++++---
src/eval.c | 84 --------------------------------------------------------------
src/lisp.h | 3 ---
3 files changed, 9 insertions(+), 90 deletions(-)
diff --git a/src/comp.c b/src/comp.c
index 499eee7e70..ef9dcf1527 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -5032,6 +5032,12 @@ return_nil (Lisp_Object arg)
{
return Qnil;
}
+
+static Lisp_Object
+directory_files_matching (Lisp_Object name, Lisp_Object match)
+{
+ return Fdirectory_files (name, Qt, match, Qnil, Qnil);
+}
#endif
/* Windows does not let us delete a .eln file that is currently loaded
@@ -5049,11 +5055,11 @@ eln_load_path_final_clean_up (void)
FOR_EACH_TAIL (dir_tail)
{
Lisp_Object files_in_dir =
- internal_condition_case_5 (Fdirectory_files,
+ internal_condition_case_2 (directory_files_matching,
Fexpand_file_name (Vcomp_native_version_dir,
XCAR (dir_tail)),
- Qt, build_string ("\\.eln\\.old\\'"), Qnil,
- Qnil, Qt, return_nil);
+ build_string ("\\.eln\\.old\\'"),
+ Qt, return_nil);
FOR_EACH_TAIL (files_in_dir)
internal_delete_file (XCAR (files_in_dir));
}
diff --git a/src/eval.c b/src/eval.c
index c46b74ac40..39c328ea1f 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1501,90 +1501,6 @@ internal_condition_case_2 (Lisp_Object (*bfun)
(Lisp_Object, Lisp_Object),
}
}
-/* Like internal_condition_case_1 but call BFUN with ARG1, ARG2, ARG3 as
- its arguments. */
-
-Lisp_Object
-internal_condition_case_3 (Lisp_Object (*bfun) (Lisp_Object, Lisp_Object,
- Lisp_Object),
- Lisp_Object arg1, Lisp_Object arg2, Lisp_Object
arg3,
- Lisp_Object handlers,
- Lisp_Object (*hfun) (Lisp_Object))
-{
- struct handler *c = push_handler (handlers, CONDITION_CASE);
- if (sys_setjmp (c->jmp))
- {
- Lisp_Object val = handlerlist->val;
- clobbered_eassert (handlerlist == c);
- handlerlist = handlerlist->next;
- return hfun (val);
- }
- else
- {
- Lisp_Object val = bfun (arg1, arg2, arg3);
- eassert (handlerlist == c);
- handlerlist = c->next;
- return val;
- }
-}
-
-/* Like internal_condition_case_1 but call BFUN with ARG1, ARG2, ARG3, ARG4 as
- its arguments. */
-
-Lisp_Object
-internal_condition_case_4 (Lisp_Object (*bfun) (Lisp_Object, Lisp_Object,
- Lisp_Object, Lisp_Object),
- Lisp_Object arg1, Lisp_Object arg2,
- Lisp_Object arg3, Lisp_Object arg4,
- Lisp_Object handlers,
- Lisp_Object (*hfun) (Lisp_Object))
-{
- struct handler *c = push_handler (handlers, CONDITION_CASE);
- if (sys_setjmp (c->jmp))
- {
- Lisp_Object val = handlerlist->val;
- clobbered_eassert (handlerlist == c);
- handlerlist = handlerlist->next;
- return hfun (val);
- }
- else
- {
- Lisp_Object val = bfun (arg1, arg2, arg3, arg4);
- eassert (handlerlist == c);
- handlerlist = c->next;
- return val;
- }
-}
-
-/* Like internal_condition_case_1 but call BFUN with ARG1, ARG2, ARG3,
- ARG4, ARG5 as its arguments. */
-
-Lisp_Object
-internal_condition_case_5 (Lisp_Object (*bfun) (Lisp_Object, Lisp_Object,
- Lisp_Object, Lisp_Object,
- Lisp_Object),
- Lisp_Object arg1, Lisp_Object arg2,
- Lisp_Object arg3, Lisp_Object arg4,
- Lisp_Object arg5, Lisp_Object handlers,
- Lisp_Object (*hfun) (Lisp_Object))
-{
- struct handler *c = push_handler (handlers, CONDITION_CASE);
- if (sys_setjmp (c->jmp))
- {
- Lisp_Object val = handlerlist->val;
- clobbered_eassert (handlerlist == c);
- handlerlist = handlerlist->next;
- return hfun (val);
- }
- else
- {
- Lisp_Object val = bfun (arg1, arg2, arg3, arg4, arg5);
- eassert (handlerlist == c);
- handlerlist = c->next;
- return val;
- }
-}
-
/* Like internal_condition_case but call BFUN with NARGS as first,
and ARGS as second argument. */
diff --git a/src/lisp.h b/src/lisp.h
index b558d311a8..c5045d72ee 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -4466,9 +4466,6 @@ extern Lisp_Object internal_lisp_condition_case
(Lisp_Object, Lisp_Object, Lisp_
extern Lisp_Object internal_condition_case (Lisp_Object (*) (void),
Lisp_Object, Lisp_Object (*) (Lisp_Object));
extern Lisp_Object internal_condition_case_1 (Lisp_Object (*) (Lisp_Object),
Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object));
extern Lisp_Object internal_condition_case_2 (Lisp_Object (*) (Lisp_Object,
Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object (*)
(Lisp_Object));
-extern Lisp_Object internal_condition_case_3 (Lisp_Object (*) (Lisp_Object,
Lisp_Object, Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object,
Lisp_Object (*) (Lisp_Object));
-extern Lisp_Object internal_condition_case_4 (Lisp_Object (*) (Lisp_Object,
Lisp_Object, Lisp_Object, Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object,
Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object));
-extern Lisp_Object internal_condition_case_5 (Lisp_Object (*) (Lisp_Object,
Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object), Lisp_Object, Lisp_Object,
Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object (*)
(Lisp_Object));
extern Lisp_Object internal_condition_case_n
(Lisp_Object (*) (ptrdiff_t, Lisp_Object *), ptrdiff_t, Lisp_Object *,
Lisp_Object, Lisp_Object (*) (Lisp_Object, ptrdiff_t, Lisp_Object *));
- master updated (71b8f1fc63 -> ccf4a4fa48), Paul Eggert, 2022/03/19
- master c3c5e50ba4 4/9: Use filenvercmp instead of doing it by hand, Paul Eggert, 2022/03/19
- master abfb76732c 2/9: Remove internal_condition_case_[345],
Paul Eggert <=
- master a5cbd98376 3/9: Omit unnecessary code when !HAVE_NATIVE_COMP, Paul Eggert, 2022/03/19
- master 035e8e4d45 1/9: Remove sanitize_window_sizes, Paul Eggert, 2022/03/19
- master 0fed561042 5/9: Remove unused fns/data and make fns static, Paul Eggert, 2022/03/19
- master 495d8519ca 7/9: Simplify alloc.c static function decls, Paul Eggert, 2022/03/19
- master c11b4758b7 8/9: valid_sp inline fix, Paul Eggert, 2022/03/19
- master c386f7e825 6/9: Make native helper functions static, Paul Eggert, 2022/03/19
- master ccf4a4fa48 9/9: Port to gcc -D EMACS_EXTERN_INLINE, Paul Eggert, 2022/03/19