comparison src/lisp.h @ 2268:61855263cb07

[xemacs-hg @ 2004-09-14 14:32:29 by james] Identify functions that don't return, including some DEFUNs.
author james
date Tue, 14 Sep 2004 14:33:07 +0000
parents 9361a78f86a0
children ecf1ebac70d8
comparison
equal deleted inserted replaced
2267:5753220a0f80 2268:61855263cb07
2765 #define EXFUN_8 Lisp_Object,Lisp_Object,Lisp_Object,Lisp_Object,Lisp_Object, \ 2765 #define EXFUN_8 Lisp_Object,Lisp_Object,Lisp_Object,Lisp_Object,Lisp_Object, \
2766 Lisp_Object,Lisp_Object,Lisp_Object 2766 Lisp_Object,Lisp_Object,Lisp_Object
2767 #define EXFUN_MANY int, Lisp_Object* 2767 #define EXFUN_MANY int, Lisp_Object*
2768 #define EXFUN_UNEVALLED Lisp_Object 2768 #define EXFUN_UNEVALLED Lisp_Object
2769 #define EXFUN(sym, max_args) Lisp_Object sym (EXFUN_##max_args) 2769 #define EXFUN(sym, max_args) Lisp_Object sym (EXFUN_##max_args)
2770 #define EXFUN_NORETURN(sym, max_args) \
2771 DECLARE_DOESNT_RETURN_TYPE (Lisp_Object, sym (EXFUN_##max_args))
2770 2772
2771 #define SUBR_MAX_ARGS 8 2773 #define SUBR_MAX_ARGS 8
2772 #define MANY -2 2774 #define MANY -2
2773 #define UNEVALLED -1 2775 #define UNEVALLED -1
2774 2776
2792 0, /* doc string */ \ 2794 0, /* doc string */ \
2793 lname, \ 2795 lname, \
2794 (lisp_fn_t) Fname \ 2796 (lisp_fn_t) Fname \
2795 }; \ 2797 }; \
2796 Lisp_Object Fname (DEFUN_##max_args arglist) 2798 Lisp_Object Fname (DEFUN_##max_args arglist)
2799
2800 #define DEFUN_NORETURN(lname, Fname, min_args, max_args, prompt, arglist) \
2801 DECLARE_DOESNT_RETURN_TYPE (Lisp_Object, Fname (EXFUN_##max_args)); \
2802 static struct Lisp_Subr S##Fname = \
2803 { \
2804 { /* struct lrecord_header */ \
2805 lrecord_type_subr, /* lrecord_type_index */ \
2806 1, /* mark bit */ \
2807 1, /* c_readonly bit */ \
2808 1, /* lisp_readonly bit */ \
2809 0 /* unused */ \
2810 }, \
2811 min_args, \
2812 max_args, \
2813 prompt, \
2814 0, /* doc string */ \
2815 lname, \
2816 (lisp_fn_t) Fname \
2817 }; \
2818 DOESNT_RETURN_TYPE (Lisp_Object) Fname (DEFUN_##max_args arglist)
2797 2819
2798 /* Heavy ANSI C preprocessor hackery to get DEFUN to declare a 2820 /* Heavy ANSI C preprocessor hackery to get DEFUN to declare a
2799 prototype that matches max_args, and add the obligatory 2821 prototype that matches max_args, and add the obligatory
2800 `Lisp_Object' type declaration to the formal C arguments. */ 2822 `Lisp_Object' type declaration to the formal C arguments. */
2801 2823
3718 3740
3719 /* Defined in emacsfns.c */ 3741 /* Defined in emacsfns.c */
3720 Lisp_Object save_current_buffer_restore (Lisp_Object); 3742 Lisp_Object save_current_buffer_restore (Lisp_Object);
3721 3743
3722 /* Defined in emacs.c */ 3744 /* Defined in emacs.c */
3723 EXFUN (Fkill_emacs, 1); 3745 EXFUN_NORETURN (Fkill_emacs, 1);
3724 EXFUN (Frunning_temacs_p, 0); 3746 EXFUN (Frunning_temacs_p, 0);
3725 EXFUN (Fforce_debugging_signal, 1); 3747 EXFUN (Fforce_debugging_signal, 1);
3726 3748
3727 SIGTYPE fatal_error_signal (int); 3749 SIGTYPE fatal_error_signal (int);
3728 Lisp_Object make_arg_list (int, Extbyte **); 3750 Lisp_Object make_arg_list (int, Extbyte **);
3758 MODULE_API EXFUN (Ffuncall, MANY); 3780 MODULE_API EXFUN (Ffuncall, MANY);
3759 EXFUN (Ffunctionp, 1); 3781 EXFUN (Ffunctionp, 1);
3760 EXFUN (Finteractive_p, 0); 3782 EXFUN (Finteractive_p, 0);
3761 EXFUN (Fprogn, UNEVALLED); 3783 EXFUN (Fprogn, UNEVALLED);
3762 MODULE_API EXFUN (Fsignal, 2); 3784 MODULE_API EXFUN (Fsignal, 2);
3763 MODULE_API EXFUN (Fthrow, 2); 3785 MODULE_API EXFUN_NORETURN (Fthrow, 2);
3764 MODULE_API EXFUN (Fcall_with_condition_handler, MANY); 3786 MODULE_API EXFUN (Fcall_with_condition_handler, MANY);
3765 EXFUN (Ffunction_max_args, 1); 3787 EXFUN (Ffunction_max_args, 1);
3766 EXFUN (Ffunction_min_args, 1); 3788 EXFUN (Ffunction_min_args, 1);
3767 3789
3768 MODULE_API DECLARE_DOESNT_RETURN (signal_error_1 (Lisp_Object, Lisp_Object)); 3790 MODULE_API DECLARE_DOESNT_RETURN (signal_error_1 (Lisp_Object, Lisp_Object));