aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2015-10-24 13:27:52 +0300
committerEli Zaretskii2015-10-24 13:27:52 +0300
commitaca9354c01af0625997d60b089289140695e5e91 (patch)
tree04afefb32afcf948c45d9b09f7a4cbcea0639254 /src
parentc2c12a1426b5dde9e2436e7dd0d24d71b2f67125 (diff)
downloademacs-aca9354c01af0625997d60b089289140695e5e91.tar.gz
emacs-aca9354c01af0625997d60b089289140695e5e91.zip
Avoid missing inline functions from lisp.h in TAGS
* src/lisp.h (LISP_MACRO_DEFUN): Mention in the commentary the need to end each invocation with a semi-colon. Add a semi-colon at the end of each invocation of LISP_MACRO_DEFUN and LISP_MACRO_DEFUN_VOID. This is to avoid missing in TAGS inline functions defined immediately after each invocation, and also avoid tagging every invocation of these macros.
Diffstat (limited to 'src')
-rw-r--r--src/lisp.h66
1 files changed, 37 insertions, 29 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 12e00f1f25b..e2b7b67103d 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -318,7 +318,15 @@ error !;
318 Bug#11935. 318 Bug#11935.
319 319
320 Commentary for these macros can be found near their corresponding 320 Commentary for these macros can be found near their corresponding
321 functions, below. */ 321 functions, below.
322
323 Note: Each use of LISP_MACRO_DEFUN should have a semi-colon ; at
324 its end, although the expansion of that macro doesn't require that.
325 That's because any inline function defined immediately after the
326 use of that macro will otherwise be missed by 'etags' (because
327 'etags' works on un-preprocessed source, and treats the invocation
328 of LISP_MACRO_DEFUN as some kind of data type), and will not end up
329 in TAGS. */
322 330
323#if CHECK_LISP_OBJECT_TYPE 331#if CHECK_LISP_OBJECT_TYPE
324# define lisp_h_XLI(o) ((o).i) 332# define lisp_h_XLI(o) ((o).i)
@@ -751,8 +759,8 @@ struct Lisp_Symbol
751 759
752/* Convert a Lisp_Object to the corresponding EMACS_INT and vice versa. 760/* Convert a Lisp_Object to the corresponding EMACS_INT and vice versa.
753 At the machine level, these operations are no-ops. */ 761 At the machine level, these operations are no-ops. */
754LISP_MACRO_DEFUN (XLI, EMACS_INT, (Lisp_Object o), (o)) 762LISP_MACRO_DEFUN (XLI, EMACS_INT, (Lisp_Object o), (o));
755LISP_MACRO_DEFUN (XIL, Lisp_Object, (EMACS_INT i), (i)) 763LISP_MACRO_DEFUN (XIL, Lisp_Object, (EMACS_INT i), (i));
756 764
757/* In the size word of a vector, this bit means the vector has been marked. */ 765/* In the size word of a vector, this bit means the vector has been marked. */
758 766
@@ -828,12 +836,12 @@ DEFINE_GDB_SYMBOL_END (VALMASK)
828 836
829#if USE_LSB_TAG 837#if USE_LSB_TAG
830 838
831LISP_MACRO_DEFUN (make_number, Lisp_Object, (EMACS_INT n), (n)) 839LISP_MACRO_DEFUN (make_number, Lisp_Object, (EMACS_INT n), (n));
832LISP_MACRO_DEFUN (XINT, EMACS_INT, (Lisp_Object a), (a)) 840LISP_MACRO_DEFUN (XINT, EMACS_INT, (Lisp_Object a), (a));
833LISP_MACRO_DEFUN (XFASTINT, EMACS_INT, (Lisp_Object a), (a)) 841LISP_MACRO_DEFUN (XFASTINT, EMACS_INT, (Lisp_Object a), (a));
834LISP_MACRO_DEFUN (XSYMBOL, struct Lisp_Symbol *, (Lisp_Object a), (a)) 842LISP_MACRO_DEFUN (XSYMBOL, struct Lisp_Symbol *, (Lisp_Object a), (a));
835LISP_MACRO_DEFUN (XTYPE, enum Lisp_Type, (Lisp_Object a), (a)) 843LISP_MACRO_DEFUN (XTYPE, enum Lisp_Type, (Lisp_Object a), (a));
836LISP_MACRO_DEFUN (XUNTAG, void *, (Lisp_Object a, int type), (a, type)) 844LISP_MACRO_DEFUN (XUNTAG, void *, (Lisp_Object a, int type), (a, type));
837 845
838#else /* ! USE_LSB_TAG */ 846#else /* ! USE_LSB_TAG */
839 847
@@ -924,7 +932,7 @@ XUINT (Lisp_Object a)
924/* Return A's (Lisp-integer sized) hash. Happens to be like XUINT 932/* Return A's (Lisp-integer sized) hash. Happens to be like XUINT
925 right now, but XUINT should only be applied to objects we know are 933 right now, but XUINT should only be applied to objects we know are
926 integers. */ 934 integers. */
927LISP_MACRO_DEFUN (XHASH, EMACS_INT, (Lisp_Object a), (a)) 935LISP_MACRO_DEFUN (XHASH, EMACS_INT, (Lisp_Object a), (a));
928 936
929/* Like make_number (N), but may be faster. N must be in nonnegative range. */ 937/* Like make_number (N), but may be faster. N must be in nonnegative range. */
930INLINE Lisp_Object 938INLINE Lisp_Object
@@ -936,7 +944,7 @@ make_natnum (EMACS_INT n)
936} 944}
937 945
938/* Return true if X and Y are the same object. */ 946/* Return true if X and Y are the same object. */
939LISP_MACRO_DEFUN (EQ, bool, (Lisp_Object x, Lisp_Object y), (x, y)) 947LISP_MACRO_DEFUN (EQ, bool, (Lisp_Object x, Lisp_Object y), (x, y));
940 948
941/* Value is true if I doesn't fit into a Lisp fixnum. It is 949/* Value is true if I doesn't fit into a Lisp fixnum. It is
942 written this way so that it also works if I is of unsigned 950 written this way so that it also works if I is of unsigned
@@ -954,7 +962,7 @@ clip_to_bounds (ptrdiff_t lower, EMACS_INT num, ptrdiff_t upper)
954 962
955/* Extract a value or address from a Lisp_Object. */ 963/* Extract a value or address from a Lisp_Object. */
956 964
957LISP_MACRO_DEFUN (XCONS, struct Lisp_Cons *, (Lisp_Object a), (a)) 965LISP_MACRO_DEFUN (XCONS, struct Lisp_Cons *, (Lisp_Object a), (a));
958 966
959INLINE struct Lisp_Vector * 967INLINE struct Lisp_Vector *
960XVECTOR (Lisp_Object a) 968XVECTOR (Lisp_Object a)
@@ -1129,7 +1137,7 @@ make_pointer_integer (void *p)
1129 1137
1130LISP_MACRO_DEFUN_VOID (CHECK_TYPE, 1138LISP_MACRO_DEFUN_VOID (CHECK_TYPE,
1131 (int ok, Lisp_Object predicate, Lisp_Object x), 1139 (int ok, Lisp_Object predicate, Lisp_Object x),
1132 (ok, predicate, x)) 1140 (ok, predicate, x));
1133 1141
1134/* See the macros in intervals.h. */ 1142/* See the macros in intervals.h. */
1135 1143
@@ -1169,8 +1177,8 @@ xcdr_addr (Lisp_Object c)
1169} 1177}
1170 1178
1171/* Use these from normal code. */ 1179/* Use these from normal code. */
1172LISP_MACRO_DEFUN (XCAR, Lisp_Object, (Lisp_Object c), (c)) 1180LISP_MACRO_DEFUN (XCAR, Lisp_Object, (Lisp_Object c), (c));
1173LISP_MACRO_DEFUN (XCDR, Lisp_Object, (Lisp_Object c), (c)) 1181LISP_MACRO_DEFUN (XCDR, Lisp_Object, (Lisp_Object c), (c));
1174 1182
1175/* Use these to set the fields of a cons cell. 1183/* Use these to set the fields of a cons cell.
1176 1184
@@ -1707,7 +1715,7 @@ verify (offsetof (struct Lisp_Sub_Char_Table, contents)
1707 1715
1708/* Value is name of symbol. */ 1716/* Value is name of symbol. */
1709 1717
1710LISP_MACRO_DEFUN (SYMBOL_VAL, Lisp_Object, (struct Lisp_Symbol *sym), (sym)) 1718LISP_MACRO_DEFUN (SYMBOL_VAL, Lisp_Object, (struct Lisp_Symbol *sym), (sym));
1711 1719
1712INLINE struct Lisp_Symbol * 1720INLINE struct Lisp_Symbol *
1713SYMBOL_ALIAS (struct Lisp_Symbol *sym) 1721SYMBOL_ALIAS (struct Lisp_Symbol *sym)
@@ -1729,7 +1737,7 @@ SYMBOL_FWD (struct Lisp_Symbol *sym)
1729} 1737}
1730 1738
1731LISP_MACRO_DEFUN_VOID (SET_SYMBOL_VAL, 1739LISP_MACRO_DEFUN_VOID (SET_SYMBOL_VAL,
1732 (struct Lisp_Symbol *sym, Lisp_Object v), (sym, v)) 1740 (struct Lisp_Symbol *sym, Lisp_Object v), (sym, v));
1733 1741
1734INLINE void 1742INLINE void
1735SET_SYMBOL_ALIAS (struct Lisp_Symbol *sym, struct Lisp_Symbol *v) 1743SET_SYMBOL_ALIAS (struct Lisp_Symbol *sym, struct Lisp_Symbol *v)
@@ -1776,7 +1784,7 @@ SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P (Lisp_Object sym)
1776 value cannot be changed (there is an exception for keyword symbols, 1784 value cannot be changed (there is an exception for keyword symbols,
1777 whose value can be set to the keyword symbol itself). */ 1785 whose value can be set to the keyword symbol itself). */
1778 1786
1779LISP_MACRO_DEFUN (SYMBOL_CONSTANT_P, int, (Lisp_Object sym), (sym)) 1787LISP_MACRO_DEFUN (SYMBOL_CONSTANT_P, int, (Lisp_Object sym), (sym));
1780 1788
1781/* Placeholder for make-docfile to process. The actual symbol 1789/* Placeholder for make-docfile to process. The actual symbol
1782 definition is done by lread.c's defsym. */ 1790 definition is done by lread.c's defsym. */
@@ -2446,7 +2454,7 @@ enum char_bits
2446 2454
2447/* Data type checking. */ 2455/* Data type checking. */
2448 2456
2449LISP_MACRO_DEFUN (NILP, bool, (Lisp_Object x), (x)) 2457LISP_MACRO_DEFUN (NILP, bool, (Lisp_Object x), (x));
2450 2458
2451INLINE bool 2459INLINE bool
2452NUMBERP (Lisp_Object x) 2460NUMBERP (Lisp_Object x)
@@ -2470,13 +2478,13 @@ RANGED_INTEGERP (intmax_t lo, Lisp_Object x, intmax_t hi)
2470 && (TYPE_SIGNED (type) ? TYPE_MINIMUM (type) <= XINT (x) : 0 <= XINT (x)) \ 2478 && (TYPE_SIGNED (type) ? TYPE_MINIMUM (type) <= XINT (x) : 0 <= XINT (x)) \
2471 && XINT (x) <= TYPE_MAXIMUM (type)) 2479 && XINT (x) <= TYPE_MAXIMUM (type))
2472 2480
2473LISP_MACRO_DEFUN (CONSP, bool, (Lisp_Object x), (x)) 2481LISP_MACRO_DEFUN (CONSP, bool, (Lisp_Object x), (x));
2474LISP_MACRO_DEFUN (FLOATP, bool, (Lisp_Object x), (x)) 2482LISP_MACRO_DEFUN (FLOATP, bool, (Lisp_Object x), (x));
2475LISP_MACRO_DEFUN (MISCP, bool, (Lisp_Object x), (x)) 2483LISP_MACRO_DEFUN (MISCP, bool, (Lisp_Object x), (x));
2476LISP_MACRO_DEFUN (SYMBOLP, bool, (Lisp_Object x), (x)) 2484LISP_MACRO_DEFUN (SYMBOLP, bool, (Lisp_Object x), (x));
2477LISP_MACRO_DEFUN (INTEGERP, bool, (Lisp_Object x), (x)) 2485LISP_MACRO_DEFUN (INTEGERP, bool, (Lisp_Object x), (x));
2478LISP_MACRO_DEFUN (VECTORLIKEP, bool, (Lisp_Object x), (x)) 2486LISP_MACRO_DEFUN (VECTORLIKEP, bool, (Lisp_Object x), (x));
2479LISP_MACRO_DEFUN (MARKERP, bool, (Lisp_Object x), (x)) 2487LISP_MACRO_DEFUN (MARKERP, bool, (Lisp_Object x), (x));
2480 2488
2481INLINE bool 2489INLINE bool
2482STRINGP (Lisp_Object x) 2490STRINGP (Lisp_Object x)
@@ -2627,9 +2635,9 @@ CHECK_LIST (Lisp_Object x)
2627 CHECK_TYPE (CONSP (x) || NILP (x), Qlistp, x); 2635 CHECK_TYPE (CONSP (x) || NILP (x), Qlistp, x);
2628} 2636}
2629 2637
2630LISP_MACRO_DEFUN_VOID (CHECK_LIST_CONS, (Lisp_Object x, Lisp_Object y), (x, y)) 2638LISP_MACRO_DEFUN_VOID (CHECK_LIST_CONS, (Lisp_Object x, Lisp_Object y), (x, y));
2631LISP_MACRO_DEFUN_VOID (CHECK_SYMBOL, (Lisp_Object x), (x)) 2639LISP_MACRO_DEFUN_VOID (CHECK_SYMBOL, (Lisp_Object x), (x));
2632LISP_MACRO_DEFUN_VOID (CHECK_NUMBER, (Lisp_Object x), (x)) 2640LISP_MACRO_DEFUN_VOID (CHECK_NUMBER, (Lisp_Object x), (x));
2633 2641
2634INLINE void 2642INLINE void
2635CHECK_STRING (Lisp_Object x) 2643CHECK_STRING (Lisp_Object x)