From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: #2 [Was: Re: Function attributes for make-docfile] Date: Mon, 12 Jan 2015 15:28:19 +0300 Message-ID: <54B3BDE3.8030602@yandex.ru> References: <54B348E8.7080203@yandex.ru> <54B3604E.9020304@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050601000505030000060403" X-Trace: ger.gmane.org 1421065735 30440 80.91.229.3 (12 Jan 2015 12:28:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Jan 2015 12:28:55 +0000 (UTC) Cc: Stefan Monnier , Emacs development discussions To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 12 13:28:49 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YAe6y-0003zx-54 for ged-emacs-devel@m.gmane.org; Mon, 12 Jan 2015 13:28:48 +0100 Original-Received: from localhost ([::1]:33695 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YAe6x-0007gJ-CU for ged-emacs-devel@m.gmane.org; Mon, 12 Jan 2015 07:28:47 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55941) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YAe6f-0007fJ-M5 for emacs-devel@gnu.org; Mon, 12 Jan 2015 07:28:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YAe6b-0001Au-Hs for emacs-devel@gnu.org; Mon, 12 Jan 2015 07:28:29 -0500 Original-Received: from forward2l.mail.yandex.net ([84.201.143.145]:43683) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YAe6b-00018i-3y for emacs-devel@gnu.org; Mon, 12 Jan 2015 07:28:25 -0500 Original-Received: from smtp2h.mail.yandex.net (smtp2h.mail.yandex.net [84.201.187.145]) by forward2l.mail.yandex.net (Yandex) with ESMTP id C7EA81AC1162; Mon, 12 Jan 2015 15:28:21 +0300 (MSK) Original-Received: from smtp2h.mail.yandex.net (localhost [127.0.0.1]) by smtp2h.mail.yandex.net (Yandex) with ESMTP id 007B41706D40; Mon, 12 Jan 2015 15:28:20 +0300 (MSK) Original-Received: from unknown (unknown [195.239.22.162]) by smtp2h.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id lPNygo6qam-SKTO21JS; Mon, 12 Jan 2015 15:28:20 +0300 (using TLSv1.2 with cipher AES128-SHA (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1421065700; bh=u9wHYh/KuISJycsvh1XqBNN6NBj7AyAv1FxxdPGMbFQ=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type; b=ped+YzIZto4UnnG0JoSnbj5hpzANGcYmpFhAqOY2tJRC2bWXZoHent2tw02henbRz 9fS7UlY1NH6dqbI6e4wPskaf2tWtz5Qzky+U7lAFtzUfnEtpMjenCnHQfWQhVctsbR PJm+3bhHQX1+V/8ZCrP+/hF4BUKkzZXPRDvPe1yA= Authentication-Results: smtp2h.mail.yandex.net; dkim=pass header.i=@yandex.ru User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 In-Reply-To: <54B3604E.9020304@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 84.201.143.145 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:181173 Archived-At: This is a multi-part message in MIME format. --------------050601000505030000060403 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 01/12/2015 08:49 AM, Paul Eggert wrote: > Good idea, but I worry that the comments are fragile. How about the following > idea for improving the proposed syntax? Move the directives to be inside the > DEFUN, making it clearer that they're part > of the function definition mechanism. Something like this, say: > > DEFUN ("eq", Feq, Seq, 2, 2, 0, > doc: /* Return t if the two args are the same Lisp object. */ > attribute: const) > > and similarly for 'noreturn' instead of (or in addition to) 'const'. Ah yes, this looks better, and not too hard to (re)implement. The only minor issue is that 'const' is unconditionally highlighted as a C keyword but 'noreturn' isn't. OK to install? Dmitry --------------050601000505030000060403 Content-Type: text/x-diff; name="function_attributes_2.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="function_attributes_2.patch" diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index bc5420e..79d421a 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -562,6 +562,7 @@ struct global { enum global_type type; char *name; + int flags; union { int value; @@ -569,13 +570,16 @@ struct global } v; }; =20 +/* Bit values for FLAGS field from the above. Applied for DEFUNs only. = */ +enum { DEFUN_noreturn =3D 1, DEFUN_const =3D 2 }; + /* All the variable names we saw while scanning C sources in `-g' mode. */ int num_globals; int num_globals_allocated; struct global *globals; =20 -static void +static struct global * add_global (enum global_type type, char *name, int value, char const *sv= alue) { /* Ignore the one non-symbol that can occur. */ @@ -601,7 +605,10 @@ add_global (enum global_type type, char *name, int v= alue, char const *svalue) globals[num_globals - 1].v.svalue =3D svalue; else globals[num_globals - 1].v.value =3D value; + globals[num_globals - 1].flags =3D 0; + return globals + num_globals - 1; } + return NULL; } =20 static int @@ -708,13 +715,7 @@ write_globals (void) globals[i].name, globals[i].name, globals[i].name); else { - /* It would be nice to have a cleaner way to deal with these - special hacks. */ - if (strcmp (globals[i].name, "Fthrow") =3D=3D 0 - || strcmp (globals[i].name, "Ftop_level") =3D=3D 0 - || strcmp (globals[i].name, "Fkill_emacs") =3D=3D 0 - || strcmp (globals[i].name, "Fexit_recursive_edit") =3D=3D 0 - || strcmp (globals[i].name, "Fabort_recursive_edit") =3D=3D 0) + if (globals[i].flags & DEFUN_noreturn) fputs ("_Noreturn ", stdout); =20 printf ("EXFUN (%s, ", globals[i].name); @@ -726,36 +727,7 @@ write_globals (void) printf ("%d", globals[i].v.value); putchar (')'); =20 - /* It would be nice to have a cleaner way to deal with these - special hacks, too. */ - if (strcmp (globals[i].name, "Fatom") =3D=3D 0 - || strcmp (globals[i].name, "Fbyteorder") =3D=3D 0 - || strcmp (globals[i].name, "Fcharacterp") =3D=3D 0 - || strcmp (globals[i].name, "Fchar_or_string_p") =3D=3D 0 - || strcmp (globals[i].name, "Fconsp") =3D=3D 0 - || strcmp (globals[i].name, "Feq") =3D=3D 0 - || strcmp (globals[i].name, "Fface_attribute_relative_p") =3D=3D = 0 - || strcmp (globals[i].name, "Fframe_windows_min_size") =3D=3D 0 - || strcmp (globals[i].name, "Fgnutls_errorp") =3D=3D 0 - || strcmp (globals[i].name, "Fidentity") =3D=3D 0 - || strcmp (globals[i].name, "Fintegerp") =3D=3D 0 - || strcmp (globals[i].name, "Finteractive") =3D=3D 0 - || strcmp (globals[i].name, "Ffloatp") =3D=3D 0 - || strcmp (globals[i].name, "Flistp") =3D=3D 0 - || strcmp (globals[i].name, "Fmax_char") =3D=3D 0 - || strcmp (globals[i].name, "Fnatnump") =3D=3D 0 - || strcmp (globals[i].name, "Fnlistp") =3D=3D 0 - || strcmp (globals[i].name, "Fnull") =3D=3D 0 - || strcmp (globals[i].name, "Fnumberp") =3D=3D 0 - || strcmp (globals[i].name, "Fstringp") =3D=3D 0 - || strcmp (globals[i].name, "Fsymbolp") =3D=3D 0 - || strcmp (globals[i].name, "Ftool_bar_height") =3D=3D 0 - || strcmp (globals[i].name, "Fwindow__sanitize_window_sizes") =3D= =3D 0 -#ifndef WINDOWSNT - || strcmp (globals[i].name, "Fgnutls_available_p") =3D=3D 0 - || strcmp (globals[i].name, "Fzlib_available_p") =3D=3D 0 -#endif - || 0) + if (globals[i].flags & DEFUN_const) fputs (" ATTRIBUTE_CONST", stdout); =20 puts (";"); @@ -817,6 +789,23 @@ scan_c_file (char *filename, const char *mode) return scan_c_stream (infile); } =20 +/* Return 1 if next input from INFILE is equal to P, -1 if EOF, + 0 if input doesn't match. */ + +static int +stream_match (FILE *infile, const char *p) +{ + for (; *p; p++) + { + int c =3D getc (infile); + if (c =3D=3D EOF) + return -1; + if (c !=3D *p) + return 0; + } + return 1; +} + static int scan_c_stream (FILE *infile) { @@ -1033,7 +1022,63 @@ scan_c_stream (FILE *infile) =20 if (generate_globals) { - add_global (FUNCTION, name, maxargs, 0); + struct global *g =3D add_global (FUNCTION, name, maxargs, 0); + + /* The following code tries to recognize function attributes + specified after the docstring, e.g.: + + DEFUN ("foo", Ffoo, Sfoo, X, Y, Z, + doc: /\* doc *\/ + attributes: attribute1 attribute2 ...) + (Lisp_Object arg...) + + Now only 'noreturn' and 'const' attributes are used. */ + + /* Advance to the end of docstring. */ + c =3D getc (infile); + if (c =3D=3D EOF) + goto eof; + int d =3D getc (infile); + if (d =3D=3D EOF) + goto eof; + while (1) + { + if (c =3D=3D '*' && d =3D=3D '/') + break; + c =3D d, d =3D getc (infile); + if (d =3D=3D EOF) + goto eof; + } + /* Skip spaces, if any. */ + do + { + c =3D getc (infile); + if (c =3D=3D EOF) + goto eof; + } + while (c =3D=3D ' ' || c =3D=3D '\n' || c =3D=3D '\r' || c =3D=3D '\t= '); + /* Check for 'attributes:' token. */ + if (c =3D=3D 'a' && stream_match (infile, "ttributes:")) + { + char *p =3D input_buffer; + /* Collect attributes up to ')'. */ + while (1) + { + c =3D getc (infile); + if (c =3D=3D EOF) + goto eof; + if (c =3D=3D ')') + break; + if (p - input_buffer > sizeof (input_buffer)) + abort (); + *p++ =3D c; + } + *p =3D 0; + if (strstr (input_buffer, "noreturn")) + g->flags |=3D DEFUN_noreturn; + if (strstr (input_buffer, "const")) + g->flags |=3D DEFUN_const; + } continue; } =20 diff --git a/src/callint.c b/src/callint.c index 2595503..dd238b9 100644 --- a/src/callint.c +++ b/src/callint.c @@ -101,7 +101,8 @@ If the string begins with `^' and `shift-select-mode'= is non-nil, Emacs first calls the function `handle-shift-selection'. You may use `@', `*', and `^' together. They are processed in the order that they appear, before reading any arguments. -usage: (interactive &optional ARGS) */) +usage: (interactive &optional ARGS) */ + attributes: const) (Lisp_Object args) { return Qnil; diff --git a/src/character.c b/src/character.c index 4a5c7ec..39d32c9 100644 --- a/src/character.c +++ b/src/character.c @@ -232,14 +232,16 @@ DEFUN ("characterp", Fcharacterp, Scharacterp, 1, 2= , 0, In Emacs Lisp, characters are represented by character codes, which are non-negative integers. The function `max-char' returns the maximum character code. -usage: (characterp OBJECT) */) +usage: (characterp OBJECT) */ + attributes: const) (Lisp_Object object, Lisp_Object ignore) { return (CHARACTERP (object) ? Qt : Qnil); } =20 DEFUN ("max-char", Fmax_char, Smax_char, 0, 0, 0, - doc: /* Return the character of the maximum code. */) + doc: /* Return the character of the maximum code. */ + attributes: const) (void) { return make_number (MAX_CHAR); diff --git a/src/data.c b/src/data.c index 820c3ce..0389eb4 100644 --- a/src/data.c +++ b/src/data.c @@ -176,7 +176,8 @@ args_out_of_range_3 (Lisp_Object a1, Lisp_Object a2, = Lisp_Object a3) /* Data type predicates. */ =20 DEFUN ("eq", Feq, Seq, 2, 2, 0, - doc: /* Return t if the two args are the same Lisp object. */) + doc: /* Return t if the two args are the same Lisp object. */ + attributes: const) (Lisp_Object obj1, Lisp_Object obj2) { if (EQ (obj1, obj2)) @@ -185,7 +186,8 @@ DEFUN ("eq", Feq, Seq, 2, 2, 0, } =20 DEFUN ("null", Fnull, Snull, 1, 1, 0, - doc: /* Return t if OBJECT is nil. */) + doc: /* Return t if OBJECT is nil. */ + attributes: const) (Lisp_Object object) { if (NILP (object)) @@ -263,7 +265,8 @@ for example, (type-of 1) returns `integer'. */) } =20 DEFUN ("consp", Fconsp, Sconsp, 1, 1, 0, - doc: /* Return t if OBJECT is a cons cell. */) + doc: /* Return t if OBJECT is a cons cell. */ + attributes: const) (Lisp_Object object) { if (CONSP (object)) @@ -272,7 +275,8 @@ DEFUN ("consp", Fconsp, Sconsp, 1, 1, 0, } =20 DEFUN ("atom", Fatom, Satom, 1, 1, 0, - doc: /* Return t if OBJECT is not a cons cell. This includes nil= =2E */) + doc: /* Return t if OBJECT is not a cons cell. This includes nil= =2E */ + attributes: const) (Lisp_Object object) { if (CONSP (object)) @@ -282,7 +286,8 @@ DEFUN ("atom", Fatom, Satom, 1, 1, 0, =20 DEFUN ("listp", Flistp, Slistp, 1, 1, 0, doc: /* Return t if OBJECT is a list, that is, a cons cell or nil= =2E -Otherwise, return nil. */) +Otherwise, return nil. */ + attributes: const) (Lisp_Object object) { if (CONSP (object) || NILP (object)) @@ -291,7 +296,8 @@ Otherwise, return nil. */) } =20 DEFUN ("nlistp", Fnlistp, Snlistp, 1, 1, 0, - doc: /* Return t if OBJECT is not a list. Lists include nil. */= ) + doc: /* Return t if OBJECT is not a list. Lists include nil. */= + attributes: const) (Lisp_Object object) { if (CONSP (object) || NILP (object)) @@ -300,7 +306,8 @@ DEFUN ("nlistp", Fnlistp, Snlistp, 1, 1, 0, } =0C DEFUN ("symbolp", Fsymbolp, Ssymbolp, 1, 1, 0, - doc: /* Return t if OBJECT is a symbol. */) + doc: /* Return t if OBJECT is a symbol. */ + attributes: const) (Lisp_Object object) { if (SYMBOLP (object)) @@ -333,7 +340,8 @@ DEFUN ("vectorp", Fvectorp, Svectorp, 1, 1, 0, } =20 DEFUN ("stringp", Fstringp, Sstringp, 1, 1, 0, - doc: /* Return t if OBJECT is a string. */) + doc: /* Return t if OBJECT is a string. */ + attributes: const) (Lisp_Object object) { if (STRINGP (object)) @@ -436,7 +444,8 @@ DEFUN ("byte-code-function-p", Fbyte_code_function_p,= Sbyte_code_function_p, } =20 DEFUN ("char-or-string-p", Fchar_or_string_p, Schar_or_string_p, 1, 1, 0= , - doc: /* Return t if OBJECT is a character or a string. */) + doc: /* Return t if OBJECT is a character or a string. */ + attributes: const) (register Lisp_Object object) { if (CHARACTERP (object) || STRINGP (object)) @@ -445,7 +454,8 @@ DEFUN ("char-or-string-p", Fchar_or_string_p, Schar_o= r_string_p, 1, 1, 0, } =0C DEFUN ("integerp", Fintegerp, Sintegerp, 1, 1, 0, - doc: /* Return t if OBJECT is an integer. */) + doc: /* Return t if OBJECT is an integer. */ + attributes: const) (Lisp_Object object) { if (INTEGERP (object)) @@ -463,7 +473,8 @@ DEFUN ("integer-or-marker-p", Finteger_or_marker_p, S= integer_or_marker_p, 1, 1, } =20 DEFUN ("natnump", Fnatnump, Snatnump, 1, 1, 0, - doc: /* Return t if OBJECT is a nonnegative integer. */) + doc: /* Return t if OBJECT is a nonnegative integer. */ + attributes: const) (Lisp_Object object) { if (NATNUMP (object)) @@ -472,7 +483,8 @@ DEFUN ("natnump", Fnatnump, Snatnump, 1, 1, 0, } =20 DEFUN ("numberp", Fnumberp, Snumberp, 1, 1, 0, - doc: /* Return t if OBJECT is a number (floating point or integer= ). */) + doc: /* Return t if OBJECT is a number (floating point or integer= ). */ + attributes: const) (Lisp_Object object) { if (NUMBERP (object)) @@ -492,7 +504,8 @@ DEFUN ("number-or-marker-p", Fnumber_or_marker_p, } =20 DEFUN ("floatp", Ffloatp, Sfloatp, 1, 1, 0, - doc: /* Return t if OBJECT is a floating point number. */) + doc: /* Return t if OBJECT is a floating point number. */ + attributes: const) (Lisp_Object object) { if (FLOATP (object)) @@ -2954,7 +2967,8 @@ DEFUN ("lognot", Flognot, Slognot, 1, 1, 0, DEFUN ("byteorder", Fbyteorder, Sbyteorder, 0, 0, 0, doc: /* Return the byteorder for the machine. Returns 66 (ASCII uppercase B) for big endian machines or 108 (ASCII -lowercase l) for small endian machines. */) +lowercase l) for small endian machines. */ + attributes: const) (void) { unsigned i =3D 0x04030201; diff --git a/src/decompress.c b/src/decompress.c index b14f0a2..b78dace 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -88,7 +88,8 @@ unwind_decompress (void *ddata) } =20 DEFUN ("zlib-available-p", Fzlib_available_p, Szlib_available_p, 0, 0, 0= , - doc: /* Return t if zlib decompression is available in this insta= nce of Emacs. */) + doc: /* Return t if zlib decompression is available in this insta= nce of Emacs. */ + attributes: const) (void) { #ifdef WINDOWSNT diff --git a/src/emacs.c b/src/emacs.c index d09c3c3..ca1a8b2 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1892,7 +1892,8 @@ or SIGHUP, and upon SIGINT in batch mode. =20 The value of `kill-emacs-hook', if not void, is a list of functions (of no args), -all of which are called before Emacs is actually killed. */) +all of which are called before Emacs is actually killed. */ + attributes: noreturn) (Lisp_Object arg) { struct gcpro gcpro1; diff --git a/src/eval.c b/src/eval.c index 7e4b016..5cadb1b 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1162,7 +1162,8 @@ unwind_to_catch (struct handler *catch, Lisp_Object= value) =20 DEFUN ("throw", Fthrow, Sthrow, 2, 2, 0, doc: /* Throw to the catch for TAG and return VALUE from it. -Both TAG and VALUE are evalled. */) +Both TAG and VALUE are evalled. */ + attributes: noreturn) (register Lisp_Object tag, Lisp_Object value) { struct handler *c; diff --git a/src/fns.c b/src/fns.c index 7739663..91cd513 100644 --- a/src/fns.c +++ b/src/fns.c @@ -46,7 +46,8 @@ static void sort_vector_copy (Lisp_Object, ptrdiff_t, static bool internal_equal (Lisp_Object, Lisp_Object, int, bool, Lisp_Ob= ject); =20 DEFUN ("identity", Fidentity, Sidentity, 1, 1, 0, - doc: /* Return the argument unchanged. */) + doc: /* Return the argument unchanged. */ + attributes: const) (Lisp_Object arg) { return arg; diff --git a/src/frame.c b/src/frame.c index 3d2ffbf..150c058 100644 --- a/src/frame.c +++ b/src/frame.c @@ -267,7 +267,8 @@ predicates which report frame's specific UI-related c= apabilities. */) /* Placeholder used by temacs -nw before window.el is loaded. */ DEFUN ("frame-windows-min-size", Fframe_windows_min_size, Sframe_windows_min_size, 4, 4, 0, - doc: /* */) + doc: /* */ + attributes: const) (Lisp_Object frame, Lisp_Object horizontal, Lisp_Object ignore, Lisp_Object pixelwise) { diff --git a/src/gnutls.c b/src/gnutls.c index 75fe614..5e6c635 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -695,7 +695,8 @@ See also `gnutls-boot'. */) DEFUN ("gnutls-errorp", Fgnutls_errorp, Sgnutls_errorp, 1, 1, 0, doc: /* Return t if ERROR indicates a GnuTLS problem. ERROR is an integer or a symbol with an integer `gnutls-code' property. -usage: (gnutls-errorp ERROR) */) +usage: (gnutls-errorp ERROR) */ + attributes: const) (Lisp_Object err) { if (EQ (err, Qt)) return Qnil; @@ -1603,7 +1604,8 @@ This function may also return `gnutls-e-again', or #endif /* HAVE_GNUTLS */ =20 DEFUN ("gnutls-available-p", Fgnutls_available_p, Sgnutls_available_p, 0= , 0, 0, - doc: /* Return t if GnuTLS is available in this instance of Emacs= =2E */) + doc: /* Return t if GnuTLS is available in this instance of Emacs= =2E */ + attributes: const) (void) { #ifdef HAVE_GNUTLS diff --git a/src/keyboard.c b/src/keyboard.c index 5411aff..c1207f8 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1163,7 +1163,8 @@ top_level_1 (Lisp_Object ignore) =20 DEFUN ("top-level", Ftop_level, Stop_level, 0, 0, "", doc: /* Exit all recursive editing levels. -This also exits all active minibuffers. */) +This also exits all active minibuffers. */ + attributes: noreturn) (void) { #ifdef HAVE_WINDOW_SYSTEM @@ -1186,7 +1187,8 @@ user_error (const char *msg) =20 /* _Noreturn will be added to prototype by make-docfile. */ DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit= , 0, 0, "", - doc: /* Exit from the innermost recursive edit or minibuffer. */= ) + doc: /* Exit from the innermost recursive edit or minibuffer. */= + attributes: noreturn) (void) { if (command_loop_level > 0 || minibuf_level > 0) @@ -1197,7 +1199,8 @@ DEFUN ("exit-recursive-edit", Fexit_recursive_edit,= Sexit_recursive_edit, 0, 0, =20 /* _Noreturn will be added to prototype by make-docfile. */ DEFUN ("abort-recursive-edit", Fabort_recursive_edit, Sabort_recursive_e= dit, 0, 0, "", - doc: /* Abort the command that requested this recursive edit or m= inibuffer input. */) + doc: /* Abort the command that requested this recursive edit or m= inibuffer input. */ + attributes: noreturn) (void) { if (command_loop_level > 0 || minibuf_level > 0) diff --git a/src/window.c b/src/window.c index 1d2221f..e11299e 100644 --- a/src/window.c +++ b/src/window.c @@ -3000,7 +3000,8 @@ resize_root_window (Lisp_Object window, Lisp_Object= delta, Lisp_Object horizonta /* Placeholder used by temacs -nw before window.el is loaded. */ DEFUN ("window--sanitize-window-sizes", Fwindow__sanitize_window_sizes, Swindow__sanitize_window_sizes, 2, 2, 0, - doc: /* */) + doc: /* */ + attributes: const) (Lisp_Object frame, Lisp_Object horizontal) { return Qnil; diff --git a/src/xdisp.c b/src/xdisp.c index 31702ed..bb7ad19 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -12276,7 +12276,8 @@ DEFUN ("tool-bar-height", Ftool_bar_height, Stool= _bar_height, 0, 2, 0, doc: /* Return the number of lines occupied by the tool bar of FR= AME. If FRAME is nil or omitted, use the selected frame. Optional argument -PIXELWISE non-nil means return the height of the tool bar in pixels. */= ) +PIXELWISE non-nil means return the height of the tool bar in pixels. */= + attributes: const) (Lisp_Object frame, Lisp_Object pixelwise) { int height =3D 0; diff --git a/src/xfaces.c b/src/xfaces.c index 6ecd857..85af770 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -3546,7 +3546,8 @@ with the value VALUE is relative. A relative value is one that doesn't entirely override whatever is inherited from another face. For most possible attributes, the only relative value that users see is `unspecified'. -However, for :height, floating point values are also relative. */) +However, for :height, floating point values are also relative. */ + attributes: const) (Lisp_Object attribute, Lisp_Object value) { if (EQ (value, Qunspecified) || (EQ (value, QCignore_defface))) --------------050601000505030000060403--