aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorGlenn Morris2020-01-28 07:50:22 -0800
committerGlenn Morris2020-01-28 07:50:22 -0800
commit60a3c5d56c5684913e1ae77464d7c9e71bc04560 (patch)
treeeff936192f906634481b5035a93cb138a2a4f005 /doc
parent5ee3c37634f7f8651b2da1f4b611334a2b146928 (diff)
parent1bcac29b2f9980bf47f64217a3b6be5979051fe6 (diff)
downloademacs-60a3c5d56c5684913e1ae77464d7c9e71bc04560.tar.gz
emacs-60a3c5d56c5684913e1ae77464d7c9e71bc04560.zip
Merge from origin/emacs-27
1bcac29b2f (origin/emacs-27) dns-mode-soa-auto-increment-serial: safe... abf0f8666d * lisp/wdired.el: Clean out isearch-filter-predicate (bug#... c31c31e57f ; Spelling and URL fixes 066aad7b9d Finish the documentation for c-noise-macro-{,with-parens-}... c8fcabf245 Correct regexp for flags in `format' doc string 2e9a153b26 Moderate recommendation to escape '(' in doc strings d7cd4ab7d9 Objective C Mode: Make c-forward-type work with "unsigned ... 1705e32ebc Fix help text about configure module support baca81e641 * doc/lispref/streams.texi (Output Functions): Improve ind... 568a560fce Improve doc string of 'newline' 7f50698505 Improve doc of eq on bignums etc. e5327a569c Do not refer to obsolete alias fd09196781 ; Clarify what time-stamp-active enables # Conflicts: # etc/NEWS
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/numbers.texi4
-rw-r--r--doc/lispref/objects.texi32
-rw-r--r--doc/lispref/streams.texi1
-rw-r--r--doc/lispref/tips.texi27
-rw-r--r--doc/misc/cc-mode.texi22
5 files changed, 47 insertions, 39 deletions
diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi
index e952980f26f..c8941eab736 100644
--- a/doc/lispref/numbers.texi
+++ b/doc/lispref/numbers.texi
@@ -39,8 +39,8 @@ numbers have a fixed amount of precision.
39 Under the hood, though, there are two kinds of integers: smaller 39 Under the hood, though, there are two kinds of integers: smaller
40ones, called @dfn{fixnums}, and larger ones, called @dfn{bignums}. 40ones, called @dfn{fixnums}, and larger ones, called @dfn{bignums}.
41Some functions in Emacs accept only fixnums. Also, while fixnums can 41Some functions in Emacs accept only fixnums. Also, while fixnums can
42always be compared for numeric equality with @code{eq}, bignums 42be compared for numeric equality with @code{eq}, bignums require
43require more-heavyweight equality predicates like @code{eql}. 43more-heavyweight equality predicates like @code{eql} and @code{=}.
44 44
45 The range of values for bignums is limited by the amount of main 45 The range of values for bignums is limited by the amount of main
46memory, by machine characteristics such as the size of the word used 46memory, by machine characteristics such as the size of the word used
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi
index 4242223a48e..855dff2130a 100644
--- a/doc/lispref/objects.texi
+++ b/doc/lispref/objects.texi
@@ -266,8 +266,8 @@ but many machines provide a wider range.
266 Bignums can have arbitrary precision. Operations that overflow a 266 Bignums can have arbitrary precision. Operations that overflow a
267fixnum will return a bignum instead. 267fixnum will return a bignum instead.
268 268
269 Fixnums can be compared with @code{eq}, but bignums require 269 All numbers can be compared with @code{eql} or @code{=}; fixnums can
270@code{eql} or @code{=}. To test whether an integer is a fixnum or a 270also be compared with @code{eq}. To test whether an integer is a fixnum or a
271bignum, you can compare it to @code{most-negative-fixnum} and 271bignum, you can compare it to @code{most-negative-fixnum} and
272@code{most-positive-fixnum}, or you can use the convenience predicates 272@code{most-positive-fixnum}, or you can use the convenience predicates
273@code{fixnump} and @code{bignump} on any object. 273@code{fixnump} and @code{bignump} on any object.
@@ -2167,17 +2167,20 @@ appropriate chapter describing the data type.
2167This function returns @code{t} if @var{object1} and @var{object2} are 2167This function returns @code{t} if @var{object1} and @var{object2} are
2168the same object, and @code{nil} otherwise. 2168the same object, and @code{nil} otherwise.
2169 2169
2170If @var{object1} and @var{object2} are fixnums with the same value, 2170If @var{object1} and @var{object2} are symbols with the
2171they are considered to be the same object (i.e., @code{eq} returns
2172@code{t}). If @var{object1} and @var{object2} are symbols with the
2173same name, they are normally the same object---but see @ref{Creating 2171same name, they are normally the same object---but see @ref{Creating
2174Symbols} for exceptions. For other types (e.g., lists, vectors, 2172Symbols} for exceptions. For other non-numeric types (e.g., lists, vectors,
2175strings), two arguments with the same contents or elements are not 2173strings), two arguments with the same contents or elements are not
2176necessarily @code{eq} to each other: they are @code{eq} only if they 2174necessarily @code{eq} to each other: they are @code{eq} only if they
2177are the same object, meaning that a change in the contents of one will 2175are the same object, meaning that a change in the contents of one will
2178be reflected by the same change in the contents of the other. 2176be reflected by the same change in the contents of the other.
2179For other types of objects whose contents cannot be changed (e.g., 2177
2180bignums and floats), two arguments with the same contents might or might not be 2178If @var{object1} and @var{object2} are numbers with differing types or values,
2179then they cannot be the same object and @code{eq} returns @code{nil}.
2180If they are fixnums with the same value,
2181then they are the same object and @code{eq} returns @code{t}.
2182If they were computed separately but happen to have the same value
2183and the same non-fixnum numeric type, then they might or might not be
2181the same object, and @code{eq} returns @code{t} or @code{nil} 2184the same object, and @code{eq} returns @code{t} or @code{nil}
2182depending on whether the Lisp interpreter created one object or two. 2185depending on whether the Lisp interpreter created one object or two.
2183 2186
@@ -2188,26 +2191,25 @@ depending on whether the Lisp interpreter created one object or two.
2188@end group 2191@end group
2189 2192
2190@group 2193@group
2191(eq 456 456) 2194(eq ?A ?A)
2192 @result{} t 2195 @result{} t
2193@end group 2196@end group
2194 2197
2195@group 2198@group
2196(eq 3.0 3.0) 2199(eq 3.0 3.0)
2197 @result{} t @r{or} nil 2200 @result{} t @r{or} nil
2198;; @r{The result is implementation-dependent.} 2201;; @r{Equal floats may or may not be the same object.}
2199@end group 2202@end group
2200 2203
2201@group 2204@group
2202(eq "asdf" "asdf") 2205(eq (make-string 3 ?A) (make-string 3 ?A))
2203 @result{} nil 2206 @result{} nil
2204@end group 2207@end group
2205 2208
2206@group 2209@group
2207(eq "" "") 2210(eq "asdf" "asdf")
2208 @result{} t 2211 @result{} t @r{or} nil
2209;; @r{This exception occurs because Emacs Lisp} 2212;; @r{Equal string constants or may not be the same object.}
2210;; @r{makes just one multibyte empty string, to save space.}
2211@end group 2213@end group
2212 2214
2213@group 2215@group
diff --git a/doc/lispref/streams.texi b/doc/lispref/streams.texi
index 6d0b4b08083..d40ec8db105 100644
--- a/doc/lispref/streams.texi
+++ b/doc/lispref/streams.texi
@@ -716,6 +716,7 @@ For example, if the current buffer name is @samp{foo},
716returns @code{"The buffer is foo"}. 716returns @code{"The buffer is foo"}.
717@end defmac 717@end defmac
718 718
719@cindex pretty-printer
719@defun pp object &optional stream 720@defun pp object &optional stream
720This function outputs @var{object} to @var{stream}, just like 721This function outputs @var{object} to @var{stream}, just like
721@code{prin1}, but does it in a prettier way. That is, it'll 722@code{prin1}, but does it in a prettier way. That is, it'll
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi
index 4395069fe24..0610f8029df 100644
--- a/doc/lispref/tips.texi
+++ b/doc/lispref/tips.texi
@@ -803,18 +803,6 @@ starting the sentence with lower-case ``t'', which could be somewhat
803distracting. 803distracting.
804 804
805@item 805@item
806If a line in a documentation string begins with an open-parenthesis,
807write a backslash before the open-parenthesis, like this:
808
809@example
810The argument FOO can be either a number
811\(a buffer position) or a string (a file name).
812@end example
813
814This prevents the open-parenthesis from being treated as the start of a
815defun (@pxref{Defuns,, Defuns, emacs, The GNU Emacs Manual}).
816
817@item
818Write documentation strings in the active voice, not the passive, and in 806Write documentation strings in the active voice, not the passive, and in
819the present tense, not the future. For instance, use ``Return a list 807the present tense, not the future. For instance, use ``Return a list
820containing A and B.@:'' instead of ``A list containing A and B will be 808containing A and B.@:'' instead of ``A list containing A and B will be
@@ -849,6 +837,21 @@ The documentation string for a variable that is a yes-or-no flag should
849start with words such as ``Non-nil means'', to make it clear that 837start with words such as ``Non-nil means'', to make it clear that
850all non-@code{nil} values are equivalent and indicate explicitly what 838all non-@code{nil} values are equivalent and indicate explicitly what
851@code{nil} and non-@code{nil} mean. 839@code{nil} and non-@code{nil} mean.
840
841@item
842If a line in a documentation string begins with an open-parenthesis,
843consider writing a backslash before the open-parenthesis, like this:
844
845@example
846The argument FOO can be either a number
847\(a buffer position) or a string (a file name).
848@end example
849
850This avoids a bug in Emacs versions older than 27.1, where the
851@samp{(} was treated as the start of a defun
852(@pxref{Defuns,, Defuns, emacs, The GNU Emacs Manual}).
853If you do not anticipate anyone editing your code with older Emacs
854versions, there is no need for this work-around.
852@end itemize 855@end itemize
853 856
854@node Comment Tips 857@node Comment Tips
diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi
index 2c49a90c54b..544ff853351 100644
--- a/doc/misc/cc-mode.texi
+++ b/doc/misc/cc-mode.texi
@@ -7095,22 +7095,24 @@ constitute noise macros.
7095@vindex noise-macro-names @r{(c-)} 7095@vindex noise-macro-names @r{(c-)}
7096This variable is a list of names of noise macros which never have 7096This variable is a list of names of noise macros which never have
7097parenthesized arguments. Each element is a string, and must be a 7097parenthesized arguments. Each element is a string, and must be a
7098valid identifier. An element in @code{c-noise-macro-names} must not 7098valid identifier. Alternatively, the variable may be a regular
7099also be in @code{c-noise-macro-with-parens-names}. Such an element is 7099expression which matches the names of such macros. Such a noise macro
7100treated as whitespace by @ccmode{}. 7100is treated as whitespace by @ccmode{}. It must not also be in, or be
7101matched by @code{c-noise-macro-with-parens-names}.
7101@end defopt 7102@end defopt
7102 7103
7103@defopt c-noise-macro-with-parens-names 7104@defopt c-noise-macro-with-parens-names
7104@vindex noise-macro-with-parens-names @r{(c-)} 7105@vindex noise-macro-with-parens-names @r{(c-)}
7105This variable is a list of names of noise macros which optionally have 7106This variable is a list of names of noise macros which optionally have
7106arguments in parentheses. Each element of the list is a string, and 7107arguments in parentheses. Each element of the list is a string, and
7107must be a valid identifier. An element in 7108must be a valid identifier. Alternatively, the variable may be a
7108@code{c-noise-macro-with-parens-names} must not also be in 7109regular expression which matches the names of such macros. Such a
7109@code{c-noise-macro-names}. For performance reasons, such an element, 7110noise macro must not also be in, or be matched by
7110together with the optional parenthesized arguments, is specially 7111@code{c-noise-macro-names}. For performance reasons, such a noise
7111handled, but it is only handled when used in declaration 7112macro, including any parenthesized arguments, is specially handled,
7112contexts@footnote{If this restriction causes your project 7113but it is only handled when used in declaration contexts@footnote{If
7113difficulties, please get in touch with @email{bug-cc-mode@@gnu.org}.}. 7114this restriction causes your project difficulties, please get in touch
7115with @email{bug-cc-mode@@gnu.org}.}.
7114 7116
7115The two compiler directives @code{__attribute__} and @code{__declspec} 7117The two compiler directives @code{__attribute__} and @code{__declspec}
7116have traditionally been handled specially in @ccmode{}; for example 7118have traditionally been handled specially in @ccmode{}; for example