diff options
| author | Glenn Morris | 2020-01-28 07:50:22 -0800 |
|---|---|---|
| committer | Glenn Morris | 2020-01-28 07:50:22 -0800 |
| commit | 60a3c5d56c5684913e1ae77464d7c9e71bc04560 (patch) | |
| tree | eff936192f906634481b5035a93cb138a2a4f005 /doc | |
| parent | 5ee3c37634f7f8651b2da1f4b611334a2b146928 (diff) | |
| parent | 1bcac29b2f9980bf47f64217a3b6be5979051fe6 (diff) | |
| download | emacs-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.texi | 4 | ||||
| -rw-r--r-- | doc/lispref/objects.texi | 32 | ||||
| -rw-r--r-- | doc/lispref/streams.texi | 1 | ||||
| -rw-r--r-- | doc/lispref/tips.texi | 27 | ||||
| -rw-r--r-- | doc/misc/cc-mode.texi | 22 |
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 |
| 40 | ones, called @dfn{fixnums}, and larger ones, called @dfn{bignums}. | 40 | ones, called @dfn{fixnums}, and larger ones, called @dfn{bignums}. |
| 41 | Some functions in Emacs accept only fixnums. Also, while fixnums can | 41 | Some functions in Emacs accept only fixnums. Also, while fixnums can |
| 42 | always be compared for numeric equality with @code{eq}, bignums | 42 | be compared for numeric equality with @code{eq}, bignums require |
| 43 | require more-heavyweight equality predicates like @code{eql}. | 43 | more-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 |
| 46 | memory, by machine characteristics such as the size of the word used | 46 | memory, 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 |
| 267 | fixnum will return a bignum instead. | 267 | fixnum 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 | 270 | also be compared with @code{eq}. To test whether an integer is a fixnum or a |
| 271 | bignum, you can compare it to @code{most-negative-fixnum} and | 271 | bignum, 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. | |||
| 2167 | This function returns @code{t} if @var{object1} and @var{object2} are | 2167 | This function returns @code{t} if @var{object1} and @var{object2} are |
| 2168 | the same object, and @code{nil} otherwise. | 2168 | the same object, and @code{nil} otherwise. |
| 2169 | 2169 | ||
| 2170 | If @var{object1} and @var{object2} are fixnums with the same value, | 2170 | If @var{object1} and @var{object2} are symbols with the |
| 2171 | they 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 | ||
| 2173 | same name, they are normally the same object---but see @ref{Creating | 2171 | same name, they are normally the same object---but see @ref{Creating |
| 2174 | Symbols} for exceptions. For other types (e.g., lists, vectors, | 2172 | Symbols} for exceptions. For other non-numeric types (e.g., lists, vectors, |
| 2175 | strings), two arguments with the same contents or elements are not | 2173 | strings), two arguments with the same contents or elements are not |
| 2176 | necessarily @code{eq} to each other: they are @code{eq} only if they | 2174 | necessarily @code{eq} to each other: they are @code{eq} only if they |
| 2177 | are the same object, meaning that a change in the contents of one will | 2175 | are the same object, meaning that a change in the contents of one will |
| 2178 | be reflected by the same change in the contents of the other. | 2176 | be reflected by the same change in the contents of the other. |
| 2179 | For other types of objects whose contents cannot be changed (e.g., | 2177 | |
| 2180 | bignums and floats), two arguments with the same contents might or might not be | 2178 | If @var{object1} and @var{object2} are numbers with differing types or values, |
| 2179 | then they cannot be the same object and @code{eq} returns @code{nil}. | ||
| 2180 | If they are fixnums with the same value, | ||
| 2181 | then they are the same object and @code{eq} returns @code{t}. | ||
| 2182 | If they were computed separately but happen to have the same value | ||
| 2183 | and the same non-fixnum numeric type, then they might or might not be | ||
| 2181 | the same object, and @code{eq} returns @code{t} or @code{nil} | 2184 | the same object, and @code{eq} returns @code{t} or @code{nil} |
| 2182 | depending on whether the Lisp interpreter created one object or two. | 2185 | depending 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}, | |||
| 716 | returns @code{"The buffer is foo"}. | 716 | returns @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 |
| 720 | This function outputs @var{object} to @var{stream}, just like | 721 | This 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 | |||
| 803 | distracting. | 803 | distracting. |
| 804 | 804 | ||
| 805 | @item | 805 | @item |
| 806 | If a line in a documentation string begins with an open-parenthesis, | ||
| 807 | write a backslash before the open-parenthesis, like this: | ||
| 808 | |||
| 809 | @example | ||
| 810 | The argument FOO can be either a number | ||
| 811 | \(a buffer position) or a string (a file name). | ||
| 812 | @end example | ||
| 813 | |||
| 814 | This prevents the open-parenthesis from being treated as the start of a | ||
| 815 | defun (@pxref{Defuns,, Defuns, emacs, The GNU Emacs Manual}). | ||
| 816 | |||
| 817 | @item | ||
| 818 | Write documentation strings in the active voice, not the passive, and in | 806 | Write documentation strings in the active voice, not the passive, and in |
| 819 | the present tense, not the future. For instance, use ``Return a list | 807 | the present tense, not the future. For instance, use ``Return a list |
| 820 | containing A and B.@:'' instead of ``A list containing A and B will be | 808 | containing 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 | |||
| 849 | start with words such as ``Non-nil means'', to make it clear that | 837 | start with words such as ``Non-nil means'', to make it clear that |
| 850 | all non-@code{nil} values are equivalent and indicate explicitly what | 838 | all 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 | ||
| 842 | If a line in a documentation string begins with an open-parenthesis, | ||
| 843 | consider writing a backslash before the open-parenthesis, like this: | ||
| 844 | |||
| 845 | @example | ||
| 846 | The argument FOO can be either a number | ||
| 847 | \(a buffer position) or a string (a file name). | ||
| 848 | @end example | ||
| 849 | |||
| 850 | This 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}). | ||
| 853 | If you do not anticipate anyone editing your code with older Emacs | ||
| 854 | versions, 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-)} |
| 7096 | This variable is a list of names of noise macros which never have | 7096 | This variable is a list of names of noise macros which never have |
| 7097 | parenthesized arguments. Each element is a string, and must be a | 7097 | parenthesized arguments. Each element is a string, and must be a |
| 7098 | valid identifier. An element in @code{c-noise-macro-names} must not | 7098 | valid identifier. Alternatively, the variable may be a regular |
| 7099 | also be in @code{c-noise-macro-with-parens-names}. Such an element is | 7099 | expression which matches the names of such macros. Such a noise macro |
| 7100 | treated as whitespace by @ccmode{}. | 7100 | is treated as whitespace by @ccmode{}. It must not also be in, or be |
| 7101 | matched 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-)} |
| 7105 | This variable is a list of names of noise macros which optionally have | 7106 | This variable is a list of names of noise macros which optionally have |
| 7106 | arguments in parentheses. Each element of the list is a string, and | 7107 | arguments in parentheses. Each element of the list is a string, and |
| 7107 | must be a valid identifier. An element in | 7108 | must be a valid identifier. Alternatively, the variable may be a |
| 7108 | @code{c-noise-macro-with-parens-names} must not also be in | 7109 | regular expression which matches the names of such macros. Such a |
| 7109 | @code{c-noise-macro-names}. For performance reasons, such an element, | 7110 | noise macro must not also be in, or be matched by |
| 7110 | together with the optional parenthesized arguments, is specially | 7111 | @code{c-noise-macro-names}. For performance reasons, such a noise |
| 7111 | handled, but it is only handled when used in declaration | 7112 | macro, including any parenthesized arguments, is specially handled, |
| 7112 | contexts@footnote{If this restriction causes your project | 7113 | but it is only handled when used in declaration contexts@footnote{If |
| 7113 | difficulties, please get in touch with @email{bug-cc-mode@@gnu.org}.}. | 7114 | this restriction causes your project difficulties, please get in touch |
| 7115 | with @email{bug-cc-mode@@gnu.org}.}. | ||
| 7114 | 7116 | ||
| 7115 | The two compiler directives @code{__attribute__} and @code{__declspec} | 7117 | The two compiler directives @code{__attribute__} and @code{__declspec} |
| 7116 | have traditionally been handled specially in @ccmode{}; for example | 7118 | have traditionally been handled specially in @ccmode{}; for example |