aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2014-02-21 22:39:10 -0500
committerStefan Monnier2014-02-21 22:39:10 -0500
commitadd6de1c9474d8679ac7472456d8aac0ad9a7615 (patch)
tree626d4026520d8a0a8c909022b8fff482db1d9edb
parente59fa9adb3e9e2ec7993267667c6a31d2cf57fdd (diff)
downloademacs-add6de1c9474d8679ac7472456d8aac0ad9a7615.tar.gz
emacs-add6de1c9474d8679ac7472456d8aac0ad9a7615.zip
* doc/lispref/functions.texi (Declare Form): Document gv-expander,
gv-setter, and compiler-macro. Fixes: debbugs:16829
-rw-r--r--doc/lispref/ChangeLog30
-rw-r--r--doc/lispref/functions.texi37
2 files changed, 55 insertions, 12 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 706fe131d7b..fe00e5a7b53 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
12014-02-22 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * functions.texi (Declare Form): Document gv-expander, gv-setter, and
4 compiler-macro (bug#16829).
5
12014-02-21 Juanma Barranquero <lekktu@gmail.com> 62014-02-21 Juanma Barranquero <lekktu@gmail.com>
2 7
3 * windows.texi (Window Configurations): Doc fix. 8 * windows.texi (Window Configurations): Doc fix.
@@ -16,6 +21,11 @@
16 21
17 * functions.texi (Defining Functions): Mention defalias-fset-function. 22 * functions.texi (Defining Functions): Mention defalias-fset-function.
18 23
242014-02-17 Stefan Monnier <monnier@iro.umontreal.ca>
25
26 * minibuf.texi (Completion Commands): Don't document obsolete
27 `common-substring' arg of display-completion-list.
28
192014-02-17 Glenn Morris <rgm@gnu.org> 292014-02-17 Glenn Morris <rgm@gnu.org>
20 30
21 * minibuf.texi (Text from Minibuffer): Update read-regexp details. 31 * minibuf.texi (Text from Minibuffer): Update read-regexp details.
@@ -31,8 +41,8 @@
31 41
322014-02-10 Lars Ingebrigtsen <larsi@gnus.org> 422014-02-10 Lars Ingebrigtsen <larsi@gnus.org>
33 43
34 * text.texi (User-Level Deletion): Document 44 * text.texi (User-Level Deletion):
35 `delete-trailing-whitespace' (bug#15309). 45 Document `delete-trailing-whitespace' (bug#15309).
36 46
372014-02-09 Lars Ingebrigtsen <larsi@gnus.org> 472014-02-09 Lars Ingebrigtsen <larsi@gnus.org>
38 48
@@ -237,8 +247,8 @@
2372013-12-24 Tassilo Horn <tsdh@gnu.org> 2472013-12-24 Tassilo Horn <tsdh@gnu.org>
238 248
239 * control.texi (Pattern matching case statement): Fix missing 249 * control.texi (Pattern matching case statement): Fix missing
240 argument in simple expression language sample (Bug#16238). Add 250 argument in simple expression language sample (Bug#16238).
241 some sample programs written in that language. Mention that 251 Add some sample programs written in that language. Mention that
242 `pcase' requires lexical binding. 252 `pcase' requires lexical binding.
243 253
2442013-12-23 Xue Fuqiao <xfq.free@gmail.com> 2542013-12-23 Xue Fuqiao <xfq.free@gmail.com>
@@ -253,8 +263,8 @@
253 263
2542013-12-23 Chong Yidong <cyd@gnu.org> 2642013-12-23 Chong Yidong <cyd@gnu.org>
255 265
256 * keymaps.texi (Controlling Active Maps): Renamed 266 * keymaps.texi (Controlling Active Maps):
257 set-temporary-overlay-map to set-transient map. Doc fixes. 267 Rename set-temporary-overlay-map to set-transient map. Doc fixes.
258 (Searching Keymaps): The transient keymap takes precedence. 268 (Searching Keymaps): The transient keymap takes precedence.
259 269
2602013-12-23 Glenn Morris <rgm@gnu.org> 2702013-12-23 Glenn Morris <rgm@gnu.org>
@@ -523,8 +533,8 @@
5232013-10-08 Eli Zaretskii <eliz@gnu.org> 5332013-10-08 Eli Zaretskii <eliz@gnu.org>
524 534
525 Support menus on text-mode terminals. 535 Support menus on text-mode terminals.
526 * keymaps.texi (Defining Menus, Mouse Menus, Menu Bar): Modify 536 * keymaps.texi (Defining Menus, Mouse Menus, Menu Bar):
527 wording to the effect that menus are supported on TTYs. 537 Modify wording to the effect that menus are supported on TTYs.
528 538
529 * frames.texi (Pop-Up Menus, Dialog Boxes) 539 * frames.texi (Pop-Up Menus, Dialog Boxes)
530 (Display Feature Testing): Update for menu support on TTYs. 540 (Display Feature Testing): Update for menu support on TTYs.
@@ -731,8 +741,8 @@
7312013-07-22 Michael Albinus <michael.albinus@gmx.de> 7412013-07-22 Michael Albinus <michael.albinus@gmx.de>
732 742
733 * files.texi (Magic File Names): Add file-notify-add-watch, 743 * files.texi (Magic File Names): Add file-notify-add-watch,
734 file-notify-rm-watch and file-notify-supported-p. Move 744 file-notify-rm-watch and file-notify-supported-p.
735 file-remote-p down. 745 Move file-remote-p down.
736 746
737 * errors.texi (Standard Errors): Add file-notify-error. 747 * errors.texi (Standard Errors): Add file-notify-error.
738 748
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 0781eaf056c..b2bd22e9ffd 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -1554,14 +1554,17 @@ following effects:
1554This acts like a call to @code{set-advertised-calling-convention} 1554This acts like a call to @code{set-advertised-calling-convention}
1555(@pxref{Obsolete Functions}); @var{signature} specifies the correct 1555(@pxref{Obsolete Functions}); @var{signature} specifies the correct
1556argument list for calling the function or macro, and @var{when} should 1556argument list for calling the function or macro, and @var{when} should
1557be a string indicating when the variable was first made obsolete. 1557be a string indicating when the old argument list was first made obsolete.
1558 1558
1559@item (debug @var{edebug-form-spec}) 1559@item (debug @var{edebug-form-spec})
1560This is valid for macros only. When stepping through the macro with 1560This is valid for macros only. When stepping through the macro with
1561Edebug, use @var{edebug-form-spec}. @xref{Instrumenting Macro Calls}. 1561Edebug, use @var{edebug-form-spec}. @xref{Instrumenting Macro Calls}.
1562 1562
1563@item (doc-string @var{n}) 1563@item (doc-string @var{n})
1564Use element number @var{n}, if any, as the documentation string. 1564This is used when defining a function or macro which itself will be used to
1565define entities like functions, macros, or variables. It indicates that
1566the @var{n}th argument, if any, should be considered
1567as a documentation string.
1565 1568
1566@item (indent @var{indent-spec}) 1569@item (indent @var{indent-spec})
1567Indent calls to this function or macro according to @var{indent-spec}. 1570Indent calls to this function or macro according to @var{indent-spec}.
@@ -1576,7 +1579,37 @@ instead), a string (specifying the warning message), or @code{nil} (in
1576which case the warning message gives no extra details). @var{when} 1579which case the warning message gives no extra details). @var{when}
1577should be a string indicating when the function or macro was first 1580should be a string indicating when the function or macro was first
1578made obsolete. 1581made obsolete.
1582
1583@item (compiler-macro @var{expander})
1584This can only be used for functions, and tells the compiler to use
1585@var{expander} as an optimization function. When encountering a call to the
1586function, of the form @code{(@var{function} @var{args}@dots)}, the macro
1587expander will call @var{expander} with that form as well as with
1588@var{args}@dots, and @var{expander} can either return a new expression to use
1589instead of the function call, or it can return just the form unchanged,
1590to indicate that the function call should be left alone. @var{expander} can
1591be a symbol, or it can be a form @code{(lambda (@var{arg}) @var{body})} in
1592which case @var{arg} will hold the original function call expression, and the
1593(unevaluated) arguments to the function can be accessed using the function's
1594formal arguments.
1595
1596@item (gv-expander @var{expander})
1597Declare @var{expander} to be the function to handle calls to the macro (or
1598function) as a generalized variable, similarly to @code{gv-define-expander}.
1599@var{expander} can be a symbol or it can be of the form @code{(lambda
1600(@var{arg}) @var{body})} in which case that function will additionally have
1601access to the macro (or function)'s arguments.
1602
1603@item (gv-setter @var{setter})
1604Declare @var{setter} to be the function to handle calls to the macro (or
1605function) as a generalized variable. @var{setter} can be a symbol in which
1606case it will be passed to @code{gv-define-simple-setter}, or it can be of the
1607form @code{(lambda (@var{arg}) @var{body})} in which case that function will
1608additionally have access to the macro (or function)'s arguments and it will
1609passed to @code{gv-define-setter}.
1610
1579@end table 1611@end table
1612
1580@end defmac 1613@end defmac
1581 1614
1582@node Declaring Functions 1615@node Declaring Functions