summaryrefslogtreecommitdiff
path: root/doc/lispref
diff options
context:
space:
mode:
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/edebug.texi35
-rw-r--r--doc/lispref/files.texi10
-rw-r--r--doc/lispref/numbers.texi18
3 files changed, 58 insertions, 5 deletions
diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi
index cebf0a3af3d..94d61480f10 100644
--- a/doc/lispref/edebug.texi
+++ b/doc/lispref/edebug.texi
@@ -1690,3 +1690,38 @@ Whether or not to pause for @code{edebug-sit-for-seconds} on reaching
a breakpoint. Set to @code{nil} to prevent the pause, non-@code{nil}
to allow it.
@end defopt
+
+@defopt edebug-behavior-alist
+By default, this alist contains one entry with the key @code{edebug}
+and a list of three functions, which are the default implementations
+of the functions inserted in instrumented code: @code{edebug-enter},
+@code{edebug-before} and @code{edebug-after}. To change Edebug's
+behavior globally, modify the default entry.
+
+Edebug's behavior may also be changed on a per-definition basis by
+adding an entry to this alist, with a key of your choice and three
+functions. Then set the @code{edebug-behavior} symbol property of an
+instrumented definition to the key of the new entry, and Edebug will
+call the new functions in place of its own for that definition.
+@end defopt
+
+@defopt edebug-new-definition-functions
+An abnormal hook run by Edebug after it wraps the body of a definition
+or closure. After Edebug has initialized its own data, each function
+is called with one argument, the symbol associated with the
+definition, which may be the actual symbol defined or one generated by
+Edebug. This hook may be used to set the @code{edebug-behavior}
+symbol property of each definition instrumented by Edebug.
+
+By default @code{edebug-new-definition-functions} contains
+@code{edebug-announce-definition} which prints a message each time a
+definition is instrumented. If you are instrumenting a lot of code
+and find the messages excessive, remove
+@code{edebug-announce-definition}.
+@end defopt
+
+@defopt edebug-after-instrumentation-functions
+An abnormal hook run by Edebug after it instruments a form.
+Each function is called with one argument, a form which has
+just been instrumented by Edebug.
+@end defopt
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index f49b02de97c..0f0ce157cad 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -2108,7 +2108,7 @@ Note that the @samp{.~3~} in the two last examples is the backup part,
not an extension.
@end defun
-@defun file-name-base &optional filename
+@defun file-name-base filename
This function is the composition of @code{file-name-sans-extension}
and @code{file-name-nondirectory}. For example,
@@ -2116,8 +2116,6 @@ and @code{file-name-nondirectory}. For example,
(file-name-base "/my/home/foo.c")
@result{} "foo"
@end example
-
-The @var{filename} argument defaults to @code{buffer-file-name}.
@end defun
@node Relative File Names
@@ -3137,7 +3135,8 @@ first, before handlers for jobs such as remote file access.
@code{file-ownership-preserved-p},
@code{file-readable-p}, @code{file-regular-p},
@code{file-remote-p}, @code{file-selinux-context},
-@code{file-symlink-p}, @code{file-truename}, @code{file-writable-p},
+@code{file-symlink-p}, @code{file-system-info},
+@code{file-truename}, @code{file-writable-p},
@code{find-backup-file-name},@*
@code{get-file-buffer},
@code{insert-directory},
@@ -3193,7 +3192,8 @@ first, before handlers for jobs such as remote file access.
@code{file-ownership-pre@discretionary{}{}{}served-p},
@code{file-readable-p}, @code{file-regular-p},
@code{file-remote-p}, @code{file-selinux-context},
-@code{file-symlink-p}, @code{file-truename}, @code{file-writable-p},
+@code{file-symlink-p}, @code{file-system-info},
+@code{file-truename}, @code{file-writable-p},
@code{find-backup-file-name},
@code{get-file-buffer},
@code{insert-directory},
diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi
index 3fdc94169bd..be74b0c6111 100644
--- a/doc/lispref/numbers.texi
+++ b/doc/lispref/numbers.texi
@@ -1107,6 +1107,24 @@ bit is one in the result if, and only if, the @var{n}th bit is zero in
@end example
@end defun
+@cindex popcount
+@cindex Hamming weight
+@cindex counting set bits
+@defun logcount integer
+This function returns the @dfn{Hamming weight} of @var{integer}: the
+number of ones in the binary representation of @var{integer}.
+If @var{integer} is negative, it returns the number of zero bits in
+its two's complement binary representation. The result is always
+nonnegative.
+
+@example
+(logcount 43) ; 43 = #b101011
+ @result{} 4
+(logcount -43) ; -43 = #b111...1010101
+ @result{} 3
+@end example
+@end defun
+
@node Math Functions
@section Standard Mathematical Functions
@cindex transcendental functions