[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lispref/functions.texi
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lispref/functions.texi |
Date: |
Thu, 10 Jan 2002 20:05:50 -0500 |
Index: emacs/lispref/functions.texi
diff -c emacs/lispref/functions.texi:1.17 emacs/lispref/functions.texi:1.18
*** emacs/lispref/functions.texi:1.17 Thu Sep 6 15:50:20 2001
--- emacs/lispref/functions.texi Thu Jan 10 20:05:49 2002
***************
*** 858,864 ****
@example
@group
(defun double-property (symbol prop)
! (change-property symbol prop (lambda (x) (* 2 x))))
@end group
@end example
--- 858,864 ----
@example
@group
(defun double-property (symbol prop)
! (change-property symbol prop '(lambda (x) (* 2 x))))
@end group
@end example
***************
*** 891,896 ****
--- 891,908 ----
do with the list. Perhaps it will check whether the @sc{car} of the third
element is the symbol @code{*}! Using @code{function} tells the
compiler it is safe to go ahead and compile the constant function.
+
+ Nowadays it is possible to omit @code{function} entirely, like this:
+
+ @example
+ @group
+ (defun double-property (symbol prop)
+ (change-property symbol prop (lambda (x) (* 2 x))))
+ @end group
+ @end example
+
+ @noindent
+ This is because @code{lambda} itself implies @code{function}.
We sometimes write @code{function} instead of @code{quote} when
quoting the name of a function, but this usage is just a sort of
- [Emacs-diffs] Changes to emacs/lispref/functions.texi,
Richard M. Stallman <=