mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-23 18:47:57 +00:00
Merge from origin/emacs-27
0a3731feef
Make memq etc. examples more like they wereed25282b82
Document effect of 'search-upper-case' on replacement comm...5a5d8a8ec0
* lisp/desktop.el (desktop-save): Doc fix. (Bug#41007)
This commit is contained in:
commit
99a544c807
@ -1324,10 +1324,14 @@ case-sensitive. Thus, searching for @samp{Foo} does not find
|
||||
@samp{foo} or @samp{FOO}. This applies to regular expression search
|
||||
as well as to literal string search. The effect ceases if you delete
|
||||
the upper-case letter from the search string. The variable
|
||||
@code{search-upper-case} controls this: if it is non-@code{nil} (the
|
||||
default), an upper-case character in the search string makes the
|
||||
search case-sensitive; setting it to @code{nil} disables this effect
|
||||
of upper-case characters.
|
||||
@code{search-upper-case} controls this: if it is non-@code{nil}, an
|
||||
upper-case character in the search string makes the search
|
||||
case-sensitive; setting it to @code{nil} disables this effect of
|
||||
upper-case characters. The default value of this variable is
|
||||
@code{not-yanks}, which makes search case-sensitive if there are
|
||||
upper-case letters in the search string, and also causes text yanked
|
||||
into the search string (@pxref{Isearch Yank}) to be down-cased, so
|
||||
that such searches are case-insensitive by default.
|
||||
|
||||
@vindex case-fold-search
|
||||
If you set the variable @code{case-fold-search} to @code{nil}, then
|
||||
@ -1572,9 +1576,13 @@ searching for patterns.
|
||||
@cindex case folding in replace commands
|
||||
If the first argument of a replace command is all lower case, the
|
||||
command ignores case while searching for occurrences to
|
||||
replace---provided @code{case-fold-search} is non-@code{nil}. If
|
||||
@code{case-fold-search} is set to @code{nil}, case is always significant
|
||||
in all searches.
|
||||
replace---provided @code{case-fold-search} is non-@code{nil} and
|
||||
@code{search-upper-case} is also non-@code{nil}. If
|
||||
@code{search-upper-case} (@pxref{Lax Search, search-upper-case}) is
|
||||
@code{nil}, whether searching ignores case is determined by
|
||||
@code{case-fold-search} alone, regardless of letter-case of the
|
||||
command's first argument. If @code{case-fold-search} is set to
|
||||
@code{nil}, case is always significant in all searches.
|
||||
|
||||
@vindex case-replace
|
||||
In addition, when the @var{newstring} argument is all or partly lower
|
||||
|
@ -1242,8 +1242,8 @@ compare @var{object} against the elements of the list. For example:
|
||||
@result{} (b c b a)
|
||||
@end group
|
||||
@group
|
||||
(memq '(2) '((1) (2))) ; @r{@code{(2)} and @code{(2)} are not @code{eq}.}
|
||||
@result{} nil
|
||||
(memq '(2) '((1) (2))) ; @r{The two @code{(2)}s need not be @code{eq}.}
|
||||
@result{} @r{Unspecified; might be @code{nil} or @code{((2))}.}
|
||||
@end group
|
||||
@end example
|
||||
@end defun
|
||||
@ -1356,12 +1356,12 @@ Compare this with @code{memq}:
|
||||
|
||||
@example
|
||||
@group
|
||||
(memql 1.2 '(1.1 1.2 1.3)) ; @r{@code{1.2} and @code{1.2} must be @code{eql}.}
|
||||
(memql 1.2 '(1.1 1.2 1.3)) ; @r{@code{1.2} and @code{1.2} are @code{eql}.}
|
||||
@result{} (1.2 1.3)
|
||||
@end group
|
||||
@group
|
||||
(memq 1.2 '(1.1 1.2 1.3)) ; @r{@code{1.2} and @code{1.2} need not be @code{eq}.}
|
||||
@result{} nil ; @r{... or it might be @code{(1.2 1.3)}.}
|
||||
(memq 1.2 '(1.1 1.2 1.3)) ; @r{The two @code{1.2}s need not be @code{eq}.}
|
||||
@result{} @r{Unspecified; might be @code{nil} or @code{(1.2 1.3)}.}
|
||||
@end group
|
||||
@end example
|
||||
@end defun
|
||||
@ -1380,12 +1380,12 @@ Compare this with @code{memq}:
|
||||
|
||||
@example
|
||||
@group
|
||||
(member (list 2) '((1) (2))) ; @r{@code{(list 2)} and @code{(2)} are @code{equal}.}
|
||||
(member '(2) '((1) (2))) ; @r{@code{(2)} and @code{(2)} are @code{equal}.}
|
||||
@result{} ((2))
|
||||
@end group
|
||||
@group
|
||||
(memq (list 2) '((1) (2))) ; @r{@code{(list 2)} and @code{(2)} are not @code{eq}.}
|
||||
@result{} nil
|
||||
(memq '(2) '((1) (2))) ; @r{The two @code{(2)}s need not be @code{eq}.}
|
||||
@result{} @r{Unspecified; might be @code{nil} or @code{(2)}.}
|
||||
@end group
|
||||
@group
|
||||
;; @r{Two strings with the same contents are @code{equal}.}
|
||||
@ -1626,7 +1626,7 @@ keys may not be symbols:
|
||||
("compound leaves" . horsechestnut)))
|
||||
|
||||
(assq "simple leaves" leaves)
|
||||
@result{} @r{Unspecified; might be @code{nil} or non-@code{nil}.}
|
||||
@result{} @r{Unspecified; might be @code{nil} or @code{("simple leaves" . oak)}.}
|
||||
(assoc "simple leaves" leaves)
|
||||
@result{} ("simple leaves" . oak)
|
||||
@end smallexample
|
||||
|
@ -1017,13 +1017,16 @@ Frames with a non-nil `desktop-dont-save' parameter are not saved."
|
||||
|
||||
;;;###autoload
|
||||
(defun desktop-save (dirname &optional release only-if-changed version)
|
||||
"Save the desktop in a desktop file.
|
||||
Parameter DIRNAME specifies where to save the desktop file.
|
||||
Optional parameter RELEASE says whether we're done with this
|
||||
desktop. If ONLY-IF-CHANGED is non-nil, compare the current
|
||||
desktop information to that in the desktop file, and if the
|
||||
desktop information has not changed since it was last saved then
|
||||
do not rewrite the file.
|
||||
"Save the state of Emacs in a desktop file in directory DIRNAME.
|
||||
Optional argument RELEASE non-nil says we're done with this
|
||||
desktop, in which case this function releases the lock of the
|
||||
desktop file in DIRNAME.
|
||||
If ONLY-IF-CHANGED is non-nil, compare the current desktop
|
||||
information to that in the desktop file, and if the desktop
|
||||
information has not changed since it was last saved, then do
|
||||
not rewrite the file.
|
||||
|
||||
To restore the desktop, use `desktop-read'.
|
||||
|
||||
This function can save the desktop in either format version
|
||||
208 (which only Emacs 25.1 and later can read) or version
|
||||
@ -1033,14 +1036,20 @@ it was last saved, or version 208 when writing a fresh desktop
|
||||
file.
|
||||
|
||||
To upgrade a version 206 file to version 208, call this command
|
||||
explicitly with a bare prefix argument: C-u M-x desktop-save.
|
||||
You are recommended to do this once you have firmly upgraded to
|
||||
Emacs 25.1 (or later). To downgrade a version 208 file to version
|
||||
206, use a double command prefix: C-u C-u M-x desktop-save.
|
||||
Confirmation will be requested in either case. In a non-interactive
|
||||
call, VERSION can be given as an integer, either 206 or 208, which
|
||||
will be accepted as the format version in which to save the file
|
||||
without further confirmation."
|
||||
explicitly with a prefix argument: \\[universal-argument] \\[desktop-save].
|
||||
If you are upgrading from Emacs 24 or older, we recommed to do
|
||||
this once you decide you no longer need compatibility with versions
|
||||
of Emacs before 25.1.
|
||||
|
||||
To downgrade a version 208 file to version 206, use a double prefix
|
||||
argument: \\[universal-argument] \\[universal-argument] \\[desktop-save].
|
||||
|
||||
Emacs will ask for confirmation when you upgrade or downgrade your
|
||||
desktop file.
|
||||
|
||||
In a non-interactive call, VERSION can be given as an integer, either
|
||||
206 or 208, to specify the format version in which to save the file,
|
||||
no questions asked."
|
||||
(interactive (list
|
||||
;; Or should we just use (car desktop-path)?
|
||||
(let ((default (if (member "." desktop-path)
|
||||
|
@ -340,13 +340,17 @@ that reads FROM-STRING, or invoke replacements from
|
||||
incremental search with a key sequence like `C-s C-s M-%'
|
||||
to use its current search string as the string to replace.
|
||||
|
||||
Matching is independent of case if `case-fold-search' is non-nil and
|
||||
FROM-STRING has no uppercase letters. Replacement transfers the case
|
||||
pattern of the old text to the new text, if `case-replace' and
|
||||
`case-fold-search' are non-nil and FROM-STRING has no uppercase
|
||||
letters. (Transferring the case pattern means that if the old text
|
||||
matched is all caps, or capitalized, then its replacement is upcased
|
||||
or capitalized.)
|
||||
Matching is independent of case if both `case-fold-search'
|
||||
and `search-upper-case' are non-nil and FROM-STRING has no
|
||||
uppercase letters; if `search-upper-case' is nil, then
|
||||
whether matching ignores case depends on `case-fold-search'
|
||||
regardless of whether there are uppercase letters in FROM-STRING.
|
||||
Replacement transfers the case pattern of the old text to the
|
||||
new text, if both `case-fold-search' and `case-replace' are
|
||||
non-nil and FROM-STRING has no uppercase letters.
|
||||
\(Transferring the case pattern means that if the old text
|
||||
matched is all caps, or capitalized, then its replacement is
|
||||
respectively upcased or capitalized.)
|
||||
|
||||
Ignore read-only matches if `query-replace-skip-read-only' is non-nil,
|
||||
ignore hidden matches if `search-invisible' is nil, and ignore more
|
||||
@ -402,13 +406,16 @@ that reads REGEXP, or invoke replacements from
|
||||
incremental search with a key sequence like `C-M-s C-M-s C-M-%'
|
||||
to use its current search regexp as the regexp to replace.
|
||||
|
||||
Matching is independent of case if `case-fold-search' is non-nil and
|
||||
REGEXP has no uppercase letters. Replacement transfers the case
|
||||
pattern of the old text to the new text, if `case-replace' and
|
||||
`case-fold-search' are non-nil and REGEXP has no uppercase letters.
|
||||
\(Transferring the case pattern means that if the old text matched is
|
||||
all caps, or capitalized, then its replacement is upcased or
|
||||
capitalized.)
|
||||
Matching is independent of case if both `case-fold-search'
|
||||
and `search-upper-case' are non-nil and REGEXP has no uppercase
|
||||
letters; if `search-upper-case' is nil, then whether matching
|
||||
ignores case depends on `case-fold-search' regardless of whether
|
||||
there are uppercase letters in REGEXP.
|
||||
Replacement transfers the case pattern of the old text to the new
|
||||
text, if both `case-fold-search' and `case-replace' are non-nil
|
||||
and REGEXP has no uppercase letters. (Transferring the case pattern
|
||||
means that if the old text matched is all caps, or capitalized,
|
||||
then its replacement is respectively upcased or capitalized.)
|
||||
|
||||
Ignore read-only matches if `query-replace-skip-read-only' is non-nil,
|
||||
ignore hidden matches if `search-invisible' is nil, and ignore more
|
||||
|
Loading…
Reference in New Issue
Block a user