Merge from origin/emacs-26

b98cf9c ; Fix a typo in the Emacs manual
700fcd7 * doc/emacs/help.texi: Fix paren typo.
c9c0e40 More minor changes in shell-related nodes of Emacs manual
e6bf19c Fix inaccuracies in "Shell Ring" node of Emacs manual
087681b8 Improve documentation of kmacro commands and variables.
be2e8cb * doc/man/emacs.1.in: Document --fg-daemon and --bg-daemon.
1d9e66a Don't check non-X frames for z order (Bug#31373)
7dc028e Check NSWindow is actually a frame

Conflicts:
	src/nsfns.m
This commit is contained in:
Glenn Morris 2018-05-15 09:09:48 -07:00
commit 3ee1841f28
7 changed files with 50 additions and 31 deletions

View file

@ -186,7 +186,7 @@ Otherwise, a reverse search (@kbd{C-r}) is often the best way.
dragging the word preceding or containing point forward as well. The
punctuation characters between the words do not move. For example,
@w{@samp{FOO, BAR}} transposes into @w{@samp{BAR, FOO}} rather than
@samp{@w{BAR FOO,}}. When point is at the end of the line, it will
@w{@samp{BAR FOO,}}. When point is at the end of the line, it will
transpose the word before point with the first word on the next line.
@findex transpose-sentences

View file

@ -491,7 +491,7 @@ buffer (@pxref{Package Menu}).
@findex describe-package
@kindex C-h P
@kbd{C-h P} (@code{describe-package}) prompts for the name of a
package (@pxref{Packages}, and displays a help buffer describing the
package (@pxref{Packages}), and displays a help buffer describing the
attributes of the package and the features that it implements. The
buffer lists the keywords that relate to the package in the form of
buttons. Click on a button with @kbd{mouse-1} or @kbd{mouse-2} to see

View file

@ -784,7 +784,8 @@ text in the buffer. To give input to the subshell, go to the end of
the buffer and type the input, terminated by @key{RET}.
By default, when the subshell is invoked interactively, the
@file{*shell*} buffer is displayed in a new window. This behavior can
@file{*shell*} buffer is displayed in a new window, unless the current
window already shows the @file{*shell*} buffer. This behavior can
be customized via @code{display-buffer-alist} (@pxref{Window Choice}).
While the subshell is waiting or running a command, you can switch
@ -1071,7 +1072,7 @@ Emacs Lisp Reference Manual}).
@vindex comint-use-prompt-regexp
@vindex shell-prompt-pattern
If you change the variable @code{comint-use-prompt-regexp} to a
non-@code{nil} value, then Comint mode recognize prompts using a
non-@code{nil} value, then Comint mode will recognize prompts using a
regular expression (@pxref{Regexps}). In Shell mode, the regular
expression is specified by the variable @code{shell-prompt-pattern}.
The default value of @code{comint-use-prompt-regexp} is @code{nil},
@ -1145,10 +1146,11 @@ Display the buffer's history of shell commands in another window
Shell buffers provide a history of previously entered shell
commands. To reuse shell commands from the history, use the editing
commands @kbd{M-p}, @kbd{M-n}, @kbd{M-r} and @kbd{M-s}. These work
just like the minibuffer history commands (@pxref{Minibuffer
commands @kbd{M-p}, @kbd{M-n}, and @kbd{M-r}. These work
similar to the minibuffer history commands (@pxref{Minibuffer
History}), except that they operate within the Shell buffer rather
than the minibuffer.
than the minibuffer, and @code{M-r} in a Shell buffer invokes
incremental search through shell command history.
@kbd{M-p} fetches an earlier shell command to the end of the shell
buffer. Successive use of @kbd{M-p} fetches successively earlier

View file

@ -123,7 +123,7 @@ Use specified
as the terminal instead of using stdin/stdout.
This must be the first argument specified in the command line.
.TP
.BI \-\-daemon "\fR[=\fPname\fR]"
.BI \-\-daemon "\fR[=\fPname\fR], " \-\-bg\-daemon "\fR[=\fPname\fR]"
Start Emacs as a daemon, enabling the Emacs server and disconnecting
from the terminal. You can then use the emacsclient (see
.BR emacsclient (1))
@ -131,6 +131,9 @@ command to
connect to the server (with optional
.IR name ")."
.TP
.BI \-\-fg\-daemon "\fR[=\fPname\fR]"
Like "\-\-bg\-daemon", but don't disconnect from the terminal.
.TP
.B \-\-version
Display
.I Emacs

View file

@ -226,12 +226,19 @@ macro to be executed before appending to it."
;;; Keyboard macro counter
(defvar kmacro-counter 0
"Current keyboard macro counter.")
"Current keyboard macro counter.
This is normally initialized to zero when the macro is defined,
and incremented each time the value of the counter is inserted
into a buffer. See `kmacro-start-macro-or-insert-counter' for
more details.")
(defvar kmacro-default-counter-format "%d")
(defvar kmacro-counter-format "%d"
"Current keyboard macro counter format.")
"Current keyboard macro counter format.
Can be set directly via `kmacro-set-format', which see.")
(defvar kmacro-counter-format-start kmacro-counter-format
"Macro format at start of macro execution.")
@ -247,9 +254,9 @@ macro to be executed before appending to it."
(defun kmacro-insert-counter (arg)
"Insert macro counter, then increment it by ARG.
"Insert current value of `kmacro-counter', then increment it by ARG.
Interactively, ARG defaults to 1. With \\[universal-argument], insert
previous `kmacro-counter', and do not modify counter."
current value of `kmacro-counter', but do not increment it."
(interactive "P")
(if kmacro-initial-counter-value
(setq kmacro-counter kmacro-initial-counter-value
@ -261,7 +268,7 @@ previous `kmacro-counter', and do not modify counter."
(defun kmacro-set-format (format)
"Set macro counter FORMAT."
"Set the format of `kmacro-counter' to FORMAT."
(interactive "sMacro Counter Format: ")
(setq kmacro-counter-format
(if (equal format "") "%d" format))
@ -277,7 +284,7 @@ previous `kmacro-counter', and do not modify counter."
(format kmacro-counter-format value) value))
(defun kmacro-set-counter (arg)
"Set `kmacro-counter' to ARG or prompt if missing.
"Set the value of `kmacro-counter' to ARG, or prompt for value if no argument.
With \\[universal-argument] prefix, reset counter to its value prior to this iteration of the macro."
(interactive "NMacro counter value: ")
(if (not (or defining-kbd-macro executing-kbd-macro))
@ -291,7 +298,7 @@ With \\[universal-argument] prefix, reset counter to its value prior to this ite
(defun kmacro-add-counter (arg)
"Add numeric prefix arg (prompt if missing) to macro counter.
"Add the value of numeric prefix arg (prompt if missing) to `kmacro-counter'.
With \\[universal-argument], restore previous counter value."
(interactive "NAdd to macro counter: ")
(if kmacro-initial-counter-value
@ -670,18 +677,21 @@ use \\[kmacro-name-last-macro]."
"Record subsequent keyboard input, defining a keyboard macro.
The commands are recorded even as they are executed.
Sets the `kmacro-counter' to ARG (or 0 if no prefix arg) before defining the
macro.
Initializes the macro's `kmacro-counter' to ARG (or 0 if no prefix arg)
before defining the macro.
With \\[universal-argument], appends to current keyboard macro (keeping
the current value of `kmacro-counter').
When defining/executing macro, inserts macro counter and increments
the counter with ARG or 1 if missing. With \\[universal-argument],
inserts previous `kmacro-counter' (but do not modify counter).
When used during defining/executing a macro, inserts the current value
of `kmacro-counter' and increments the counter value by ARG (or by 1 if no
prefix argument). With just \\[universal-argument], inserts the current value
of `kmacro-counter', but does not modify the counter; this is the
same as incrementing the counter by zero.
The macro counter can be modified via \\[kmacro-set-counter] and \\[kmacro-add-counter].
The format of the counter can be modified via \\[kmacro-set-format]."
The macro counter can be set directly via \\[kmacro-set-counter] and \\[kmacro-add-counter].
The format of the inserted value of the counter can be controlled
via \\[kmacro-set-format]."
(interactive "P")
(if (or defining-kbd-macro executing-kbd-macro)
(kmacro-insert-counter arg)

View file

@ -1451,9 +1451,9 @@ Frames are listed from topmost (first) to bottommost (last). */)
{
Lisp_Object frame;
/* Check against [win parentWindow] so that it doesn't match
itself. */
if (parent == nil || ns_window_is_ancestor (parent, [win parentWindow]))
/* Check against [win parentWindow] so that it doesn't match itself. */
if ([[win delegate] isKindOfClass:[EmacsView class]]
&& (parent == nil || ns_window_is_ancestor (parent, [win parentWindow])))
{
XSETFRAME (frame, ((EmacsView *)[win delegate])->emacsframe);
frames = Fcons(frame, frames);

View file

@ -5321,12 +5321,16 @@ x_frame_list_z_order (Display* dpy, Window window)
Lisp_Object frame, tail;
FOR_EACH_FRAME (tail, frame)
/* With a reparenting window manager the parent_desc field
usually specifies the topmost windows of our frames.
Otherwise FRAME_OUTER_WINDOW should do. */
if (XFRAME (frame)->output_data.x->parent_desc == children[i]
|| FRAME_OUTER_WINDOW (XFRAME (frame)) == children[i])
frames = Fcons (frame, frames);
{
struct frame *cf = XFRAME (frame);
/* With a reparenting window manager the parent_desc
field usually specifies the topmost windows of our
frames. Otherwise FRAME_OUTER_WINDOW should do. */
if (FRAME_X_P (cf)
&& (cf->output_data.x->parent_desc == children[i]
|| FRAME_OUTER_WINDOW (cf) == children[i]))
frames = Fcons (frame, frames);
}
}
if (children) XFree ((char *)children);