Some doc for defalias-fset-function
authorGlenn Morris <rgm@gnu.org>
Thu, 20 Feb 2014 07:38:47 +0000 (23:38 -0800)
committerGlenn Morris <rgm@gnu.org>
Thu, 20 Feb 2014 07:38:47 +0000 (23:38 -0800)
* doc/lispref/functions.texi (Defining Functions):
Mention defalias-fset-function.

* src/data.c (Fdefalias): Doc fix.

* etc/NEWS: Related edit.

doc/lispref/ChangeLog
doc/lispref/functions.texi
etc/NEWS
src/ChangeLog
src/data.c

index 7869bcf..fcfb524 100644 (file)
@@ -1,3 +1,7 @@
+2014-02-20  Glenn Morris  <rgm@gnu.org>
+
+       * functions.texi (Defining Functions): Mention defalias-fset-function.
+
 2014-02-17  Glenn Morris  <rgm@gnu.org>
 
        * minibuf.texi (Text from Minibuffer): Update read-regexp details.
index d86430a..0781eaf 100644 (file)
@@ -592,6 +592,11 @@ If @var{doc} is non-@code{nil}, it becomes the function documentation
 of @var{name}.  Otherwise, any documentation provided by
 @var{definition} is used.
 
+@cindex defalias-fset-function property
+Internally, @code{defalias} normally uses @code{fset} to set the definition.
+If @var{name} has a @code{defalias-fset-function} property, however,
+the associated value is used as a function to call in place of @code{fset}.
+
 The proper place to use @code{defalias} is where a specific function
 name is being defined---especially where that name appears explicitly in
 the source file being loaded.  This is because @code{defalias} records
index bfe3ef6..c8f1c7f 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1094,8 +1094,10 @@ treated as regexps rather than literal strings.
 Generic commands are interactive functions whose implementation can be
 selected among several alternatives, as a matter of user preference.
 
-** The `defalias-fset-function' property lets you catch `defalias'
-calls, and redirect them to your own function, instead of `fset'.
++++
+** If you give a symbol a `defalias-fset-function' property, `defalias'
+on that symbol will use the associated value as a function to call
+in place of `fset'.
 
 +++
 ** New variable `enable-dir-local-variables'.
index f89f7e0..c127e79 100644 (file)
@@ -1,3 +1,7 @@
+2014-02-20  Glenn Morris  <rgm@gnu.org>
+
+       * data.c (Fdefalias): Doc fix.
+
 2014-02-19  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (display_line): Fix horizontal scrolling of large images
index a52cee6..4ef81f2 100644 (file)
@@ -738,6 +738,10 @@ Associates the function with the current load file, if any.
 The optional third argument DOCSTRING specifies the documentation string
 for SYMBOL; if it is omitted or nil, SYMBOL uses the documentation string
 determined by DEFINITION.
+
+Internally, this normally uses `fset', but if SYMBOL has a
+`defalias-fset-function' property, the associated value is used instead.
+
 The return value is undefined.  */)
   (register Lisp_Object symbol, Lisp_Object definition, Lisp_Object docstring)
 {