diff options
| author | Glenn Morris | 2018-05-15 09:09:48 -0700 |
|---|---|---|
| committer | Glenn Morris | 2018-05-15 09:09:48 -0700 |
| commit | 3ee1841f288b5b9cf9301945d10db2b45688bcf8 (patch) | |
| tree | a1168744379c82fa3c0a92e14373fcc3897fb435 | |
| parent | b3956d85c71c30af732a8bc035ed39421bafe11d (diff) | |
| parent | b98cf9cdabd710f89eb57645a163fd52db338404 (diff) | |
| download | emacs-3ee1841f288b5b9cf9301945d10db2b45688bcf8.tar.gz emacs-3ee1841f288b5b9cf9301945d10db2b45688bcf8.zip | |
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
| -rw-r--r-- | doc/emacs/fixit.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/help.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/misc.texi | 12 | ||||
| -rw-r--r-- | doc/man/emacs.1.in | 5 | ||||
| -rw-r--r-- | lisp/kmacro.el | 38 | ||||
| -rw-r--r-- | src/nsfns.m | 6 | ||||
| -rw-r--r-- | src/xfns.c | 16 |
7 files changed, 50 insertions, 31 deletions
diff --git a/doc/emacs/fixit.texi b/doc/emacs/fixit.texi index 0cb8565c6a4..ec26a35d682 100644 --- a/doc/emacs/fixit.texi +++ b/doc/emacs/fixit.texi | |||
| @@ -186,7 +186,7 @@ Otherwise, a reverse search (@kbd{C-r}) is often the best way. | |||
| 186 | dragging the word preceding or containing point forward as well. The | 186 | dragging the word preceding or containing point forward as well. The |
| 187 | punctuation characters between the words do not move. For example, | 187 | punctuation characters between the words do not move. For example, |
| 188 | @w{@samp{FOO, BAR}} transposes into @w{@samp{BAR, FOO}} rather than | 188 | @w{@samp{FOO, BAR}} transposes into @w{@samp{BAR, FOO}} rather than |
| 189 | @samp{@w{BAR FOO,}}. When point is at the end of the line, it will | 189 | @w{@samp{BAR FOO,}}. When point is at the end of the line, it will |
| 190 | transpose the word before point with the first word on the next line. | 190 | transpose the word before point with the first word on the next line. |
| 191 | 191 | ||
| 192 | @findex transpose-sentences | 192 | @findex transpose-sentences |
diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi index a5700760d44..94d27a276dc 100644 --- a/doc/emacs/help.texi +++ b/doc/emacs/help.texi | |||
| @@ -491,7 +491,7 @@ buffer (@pxref{Package Menu}). | |||
| 491 | @findex describe-package | 491 | @findex describe-package |
| 492 | @kindex C-h P | 492 | @kindex C-h P |
| 493 | @kbd{C-h P} (@code{describe-package}) prompts for the name of a | 493 | @kbd{C-h P} (@code{describe-package}) prompts for the name of a |
| 494 | package (@pxref{Packages}, and displays a help buffer describing the | 494 | package (@pxref{Packages}), and displays a help buffer describing the |
| 495 | attributes of the package and the features that it implements. The | 495 | attributes of the package and the features that it implements. The |
| 496 | buffer lists the keywords that relate to the package in the form of | 496 | buffer lists the keywords that relate to the package in the form of |
| 497 | buttons. Click on a button with @kbd{mouse-1} or @kbd{mouse-2} to see | 497 | buttons. Click on a button with @kbd{mouse-1} or @kbd{mouse-2} to see |
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index a4bfba3e98d..dd434e200b2 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi | |||
| @@ -784,7 +784,8 @@ text in the buffer. To give input to the subshell, go to the end of | |||
| 784 | the buffer and type the input, terminated by @key{RET}. | 784 | the buffer and type the input, terminated by @key{RET}. |
| 785 | 785 | ||
| 786 | By default, when the subshell is invoked interactively, the | 786 | By default, when the subshell is invoked interactively, the |
| 787 | @file{*shell*} buffer is displayed in a new window. This behavior can | 787 | @file{*shell*} buffer is displayed in a new window, unless the current |
| 788 | window already shows the @file{*shell*} buffer. This behavior can | ||
| 788 | be customized via @code{display-buffer-alist} (@pxref{Window Choice}). | 789 | be customized via @code{display-buffer-alist} (@pxref{Window Choice}). |
| 789 | 790 | ||
| 790 | While the subshell is waiting or running a command, you can switch | 791 | While the subshell is waiting or running a command, you can switch |
| @@ -1071,7 +1072,7 @@ Emacs Lisp Reference Manual}). | |||
| 1071 | @vindex comint-use-prompt-regexp | 1072 | @vindex comint-use-prompt-regexp |
| 1072 | @vindex shell-prompt-pattern | 1073 | @vindex shell-prompt-pattern |
| 1073 | If you change the variable @code{comint-use-prompt-regexp} to a | 1074 | If you change the variable @code{comint-use-prompt-regexp} to a |
| 1074 | non-@code{nil} value, then Comint mode recognize prompts using a | 1075 | non-@code{nil} value, then Comint mode will recognize prompts using a |
| 1075 | regular expression (@pxref{Regexps}). In Shell mode, the regular | 1076 | regular expression (@pxref{Regexps}). In Shell mode, the regular |
| 1076 | expression is specified by the variable @code{shell-prompt-pattern}. | 1077 | expression is specified by the variable @code{shell-prompt-pattern}. |
| 1077 | The default value of @code{comint-use-prompt-regexp} is @code{nil}, | 1078 | 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 | |||
| 1145 | 1146 | ||
| 1146 | Shell buffers provide a history of previously entered shell | 1147 | Shell buffers provide a history of previously entered shell |
| 1147 | commands. To reuse shell commands from the history, use the editing | 1148 | commands. To reuse shell commands from the history, use the editing |
| 1148 | commands @kbd{M-p}, @kbd{M-n}, @kbd{M-r} and @kbd{M-s}. These work | 1149 | commands @kbd{M-p}, @kbd{M-n}, and @kbd{M-r}. These work |
| 1149 | just like the minibuffer history commands (@pxref{Minibuffer | 1150 | similar to the minibuffer history commands (@pxref{Minibuffer |
| 1150 | History}), except that they operate within the Shell buffer rather | 1151 | History}), except that they operate within the Shell buffer rather |
| 1151 | than the minibuffer. | 1152 | than the minibuffer, and @code{M-r} in a Shell buffer invokes |
| 1153 | incremental search through shell command history. | ||
| 1152 | 1154 | ||
| 1153 | @kbd{M-p} fetches an earlier shell command to the end of the shell | 1155 | @kbd{M-p} fetches an earlier shell command to the end of the shell |
| 1154 | buffer. Successive use of @kbd{M-p} fetches successively earlier | 1156 | buffer. Successive use of @kbd{M-p} fetches successively earlier |
diff --git a/doc/man/emacs.1.in b/doc/man/emacs.1.in index 51169530419..e332fb45c7b 100644 --- a/doc/man/emacs.1.in +++ b/doc/man/emacs.1.in | |||
| @@ -123,7 +123,7 @@ Use specified | |||
| 123 | as the terminal instead of using stdin/stdout. | 123 | as the terminal instead of using stdin/stdout. |
| 124 | This must be the first argument specified in the command line. | 124 | This must be the first argument specified in the command line. |
| 125 | .TP | 125 | .TP |
| 126 | .BI \-\-daemon "\fR[=\fPname\fR]" | 126 | .BI \-\-daemon "\fR[=\fPname\fR], " \-\-bg\-daemon "\fR[=\fPname\fR]" |
| 127 | Start Emacs as a daemon, enabling the Emacs server and disconnecting | 127 | Start Emacs as a daemon, enabling the Emacs server and disconnecting |
| 128 | from the terminal. You can then use the emacsclient (see | 128 | from the terminal. You can then use the emacsclient (see |
| 129 | .BR emacsclient (1)) | 129 | .BR emacsclient (1)) |
| @@ -131,6 +131,9 @@ command to | |||
| 131 | connect to the server (with optional | 131 | connect to the server (with optional |
| 132 | .IR name ")." | 132 | .IR name ")." |
| 133 | .TP | 133 | .TP |
| 134 | .BI \-\-fg\-daemon "\fR[=\fPname\fR]" | ||
| 135 | Like "\-\-bg\-daemon", but don't disconnect from the terminal. | ||
| 136 | .TP | ||
| 134 | .B \-\-version | 137 | .B \-\-version |
| 135 | Display | 138 | Display |
| 136 | .I Emacs | 139 | .I Emacs |
diff --git a/lisp/kmacro.el b/lisp/kmacro.el index 0acb7fce8f3..08a27aef5c6 100644 --- a/lisp/kmacro.el +++ b/lisp/kmacro.el | |||
| @@ -226,12 +226,19 @@ macro to be executed before appending to it." | |||
| 226 | ;;; Keyboard macro counter | 226 | ;;; Keyboard macro counter |
| 227 | 227 | ||
| 228 | (defvar kmacro-counter 0 | 228 | (defvar kmacro-counter 0 |
| 229 | "Current keyboard macro counter.") | 229 | "Current keyboard macro counter. |
| 230 | |||
| 231 | This is normally initialized to zero when the macro is defined, | ||
| 232 | and incremented each time the value of the counter is inserted | ||
| 233 | into a buffer. See `kmacro-start-macro-or-insert-counter' for | ||
| 234 | more details.") | ||
| 230 | 235 | ||
| 231 | (defvar kmacro-default-counter-format "%d") | 236 | (defvar kmacro-default-counter-format "%d") |
| 232 | 237 | ||
| 233 | (defvar kmacro-counter-format "%d" | 238 | (defvar kmacro-counter-format "%d" |
| 234 | "Current keyboard macro counter format.") | 239 | "Current keyboard macro counter format. |
| 240 | |||
| 241 | Can be set directly via `kmacro-set-format', which see.") | ||
| 235 | 242 | ||
| 236 | (defvar kmacro-counter-format-start kmacro-counter-format | 243 | (defvar kmacro-counter-format-start kmacro-counter-format |
| 237 | "Macro format at start of macro execution.") | 244 | "Macro format at start of macro execution.") |
| @@ -247,9 +254,9 @@ macro to be executed before appending to it." | |||
| 247 | 254 | ||
| 248 | 255 | ||
| 249 | (defun kmacro-insert-counter (arg) | 256 | (defun kmacro-insert-counter (arg) |
| 250 | "Insert macro counter, then increment it by ARG. | 257 | "Insert current value of `kmacro-counter', then increment it by ARG. |
| 251 | Interactively, ARG defaults to 1. With \\[universal-argument], insert | 258 | Interactively, ARG defaults to 1. With \\[universal-argument], insert |
| 252 | previous `kmacro-counter', and do not modify counter." | 259 | current value of `kmacro-counter', but do not increment it." |
| 253 | (interactive "P") | 260 | (interactive "P") |
| 254 | (if kmacro-initial-counter-value | 261 | (if kmacro-initial-counter-value |
| 255 | (setq kmacro-counter kmacro-initial-counter-value | 262 | (setq kmacro-counter kmacro-initial-counter-value |
| @@ -261,7 +268,7 @@ previous `kmacro-counter', and do not modify counter." | |||
| 261 | 268 | ||
| 262 | 269 | ||
| 263 | (defun kmacro-set-format (format) | 270 | (defun kmacro-set-format (format) |
| 264 | "Set macro counter FORMAT." | 271 | "Set the format of `kmacro-counter' to FORMAT." |
| 265 | (interactive "sMacro Counter Format: ") | 272 | (interactive "sMacro Counter Format: ") |
| 266 | (setq kmacro-counter-format | 273 | (setq kmacro-counter-format |
| 267 | (if (equal format "") "%d" format)) | 274 | (if (equal format "") "%d" format)) |
| @@ -277,7 +284,7 @@ previous `kmacro-counter', and do not modify counter." | |||
| 277 | (format kmacro-counter-format value) value)) | 284 | (format kmacro-counter-format value) value)) |
| 278 | 285 | ||
| 279 | (defun kmacro-set-counter (arg) | 286 | (defun kmacro-set-counter (arg) |
| 280 | "Set `kmacro-counter' to ARG or prompt if missing. | 287 | "Set the value of `kmacro-counter' to ARG, or prompt for value if no argument. |
| 281 | With \\[universal-argument] prefix, reset counter to its value prior to this iteration of the macro." | 288 | With \\[universal-argument] prefix, reset counter to its value prior to this iteration of the macro." |
| 282 | (interactive "NMacro counter value: ") | 289 | (interactive "NMacro counter value: ") |
| 283 | (if (not (or defining-kbd-macro executing-kbd-macro)) | 290 | (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 | |||
| 291 | 298 | ||
| 292 | 299 | ||
| 293 | (defun kmacro-add-counter (arg) | 300 | (defun kmacro-add-counter (arg) |
| 294 | "Add numeric prefix arg (prompt if missing) to macro counter. | 301 | "Add the value of numeric prefix arg (prompt if missing) to `kmacro-counter'. |
| 295 | With \\[universal-argument], restore previous counter value." | 302 | With \\[universal-argument], restore previous counter value." |
| 296 | (interactive "NAdd to macro counter: ") | 303 | (interactive "NAdd to macro counter: ") |
| 297 | (if kmacro-initial-counter-value | 304 | (if kmacro-initial-counter-value |
| @@ -670,18 +677,21 @@ use \\[kmacro-name-last-macro]." | |||
| 670 | "Record subsequent keyboard input, defining a keyboard macro. | 677 | "Record subsequent keyboard input, defining a keyboard macro. |
| 671 | The commands are recorded even as they are executed. | 678 | The commands are recorded even as they are executed. |
| 672 | 679 | ||
| 673 | Sets the `kmacro-counter' to ARG (or 0 if no prefix arg) before defining the | 680 | Initializes the macro's `kmacro-counter' to ARG (or 0 if no prefix arg) |
| 674 | macro. | 681 | before defining the macro. |
| 675 | 682 | ||
| 676 | With \\[universal-argument], appends to current keyboard macro (keeping | 683 | With \\[universal-argument], appends to current keyboard macro (keeping |
| 677 | the current value of `kmacro-counter'). | 684 | the current value of `kmacro-counter'). |
| 678 | 685 | ||
| 679 | When defining/executing macro, inserts macro counter and increments | 686 | When used during defining/executing a macro, inserts the current value |
| 680 | the counter with ARG or 1 if missing. With \\[universal-argument], | 687 | of `kmacro-counter' and increments the counter value by ARG (or by 1 if no |
| 681 | inserts previous `kmacro-counter' (but do not modify counter). | 688 | prefix argument). With just \\[universal-argument], inserts the current value |
| 689 | of `kmacro-counter', but does not modify the counter; this is the | ||
| 690 | same as incrementing the counter by zero. | ||
| 682 | 691 | ||
| 683 | The macro counter can be modified via \\[kmacro-set-counter] and \\[kmacro-add-counter]. | 692 | The macro counter can be set directly via \\[kmacro-set-counter] and \\[kmacro-add-counter]. |
| 684 | The format of the counter can be modified via \\[kmacro-set-format]." | 693 | The format of the inserted value of the counter can be controlled |
| 694 | via \\[kmacro-set-format]." | ||
| 685 | (interactive "P") | 695 | (interactive "P") |
| 686 | (if (or defining-kbd-macro executing-kbd-macro) | 696 | (if (or defining-kbd-macro executing-kbd-macro) |
| 687 | (kmacro-insert-counter arg) | 697 | (kmacro-insert-counter arg) |
diff --git a/src/nsfns.m b/src/nsfns.m index 7cf45a54f90..9ff7e88a8d4 100644 --- a/src/nsfns.m +++ b/src/nsfns.m | |||
| @@ -1451,9 +1451,9 @@ Frames are listed from topmost (first) to bottommost (last). */) | |||
| 1451 | { | 1451 | { |
| 1452 | Lisp_Object frame; | 1452 | Lisp_Object frame; |
| 1453 | 1453 | ||
| 1454 | /* Check against [win parentWindow] so that it doesn't match | 1454 | /* Check against [win parentWindow] so that it doesn't match itself. */ |
| 1455 | itself. */ | 1455 | if ([[win delegate] isKindOfClass:[EmacsView class]] |
| 1456 | if (parent == nil || ns_window_is_ancestor (parent, [win parentWindow])) | 1456 | && (parent == nil || ns_window_is_ancestor (parent, [win parentWindow]))) |
| 1457 | { | 1457 | { |
| 1458 | XSETFRAME (frame, ((EmacsView *)[win delegate])->emacsframe); | 1458 | XSETFRAME (frame, ((EmacsView *)[win delegate])->emacsframe); |
| 1459 | frames = Fcons(frame, frames); | 1459 | frames = Fcons(frame, frames); |
diff --git a/src/xfns.c b/src/xfns.c index 78151c81380..fe8170cf635 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -5321,12 +5321,16 @@ x_frame_list_z_order (Display* dpy, Window window) | |||
| 5321 | Lisp_Object frame, tail; | 5321 | Lisp_Object frame, tail; |
| 5322 | 5322 | ||
| 5323 | FOR_EACH_FRAME (tail, frame) | 5323 | FOR_EACH_FRAME (tail, frame) |
| 5324 | /* With a reparenting window manager the parent_desc field | 5324 | { |
| 5325 | usually specifies the topmost windows of our frames. | 5325 | struct frame *cf = XFRAME (frame); |
| 5326 | Otherwise FRAME_OUTER_WINDOW should do. */ | 5326 | /* With a reparenting window manager the parent_desc |
| 5327 | if (XFRAME (frame)->output_data.x->parent_desc == children[i] | 5327 | field usually specifies the topmost windows of our |
| 5328 | || FRAME_OUTER_WINDOW (XFRAME (frame)) == children[i]) | 5328 | frames. Otherwise FRAME_OUTER_WINDOW should do. */ |
| 5329 | frames = Fcons (frame, frames); | 5329 | if (FRAME_X_P (cf) |
| 5330 | && (cf->output_data.x->parent_desc == children[i] | ||
| 5331 | || FRAME_OUTER_WINDOW (cf) == children[i])) | ||
| 5332 | frames = Fcons (frame, frames); | ||
| 5333 | } | ||
| 5330 | } | 5334 | } |
| 5331 | 5335 | ||
| 5332 | if (children) XFree ((char *)children); | 5336 | if (children) XFree ((char *)children); |