diff options
| -rw-r--r-- | doc/lispref/ChangeLog | 6 | ||||
| -rw-r--r-- | doc/lispref/processes.texi | 16 | ||||
| -rw-r--r-- | etc/NEWS | 7 | ||||
| -rw-r--r-- | lisp/ChangeLog | 25 | ||||
| -rw-r--r-- | lisp/comint.el | 8 | ||||
| -rw-r--r-- | lisp/frame.el | 26 | ||||
| -rw-r--r-- | nt/ChangeLog | 10 | ||||
| -rw-r--r-- | nt/cmdproxy.c | 72 | ||||
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/xfaces.c | 2 |
10 files changed, 161 insertions, 18 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index f96cb26a5e1..50cc9cb43b3 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2015-03-03 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * processes.texi (Synchronous Processes): Update documentation of | ||
| 4 | call-process-shell-command and process-file-shell-command. | ||
| 5 | |||
| 6 | 2015-03-03 Eli Zaretskii <eliz@gnu.org> | ||
| 1 | 2015-03-03 Daniel Colascione <dancol@dancol.org> | 7 | 2015-03-03 Daniel Colascione <dancol@dancol.org> |
| 2 | 8 | ||
| 3 | * control.texi (Generators): Correct missing word. Clarify which | 9 | * control.texi (Generators): Correct missing word. Clarify which |
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 99411af3d46..177cd684f5c 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi | |||
| @@ -503,17 +503,21 @@ inputinput@point{} | |||
| 503 | @c It actually uses shell-command-switch, but no need to mention that here. | 503 | @c It actually uses shell-command-switch, but no need to mention that here. |
| 504 | @end defun | 504 | @end defun |
| 505 | 505 | ||
| 506 | @defun call-process-shell-command command &optional infile destination display &rest args | 506 | @defun call-process-shell-command command &optional infile destination display |
| 507 | This function executes the shell command @var{command} synchronously. | 507 | This function executes the shell command @var{command} synchronously. |
| 508 | The final arguments @var{args} are additional arguments to add at the | 508 | The arguments are handled as in @code{call-process}. An old calling |
| 509 | end of @var{command}. The other arguments are handled as in | 509 | convention allowed to pass any number of additional arguments after |
| 510 | @code{call-process}. | 510 | @var{display}, which were concatenated to @var{command}; this is still |
| 511 | supported, but strongly discouraged. | ||
| 511 | @end defun | 512 | @end defun |
| 512 | 513 | ||
| 513 | @defun process-file-shell-command command &optional infile destination display &rest args | 514 | @defun process-file-shell-command command &optional infile destination display |
| 514 | This function is like @code{call-process-shell-command}, but uses | 515 | This function is like @code{call-process-shell-command}, but uses |
| 515 | @code{process-file} internally. Depending on @code{default-directory}, | 516 | @code{process-file} internally. Depending on @code{default-directory}, |
| 516 | @var{command} can be executed also on remote hosts. | 517 | @var{command} can be executed also on remote hosts. An old calling |
| 518 | convention allowed to pass any number of additional arguments after | ||
| 519 | @var{display}, which were concatenated to @var{command}; this is still | ||
| 520 | supported, but strongly discouraged. | ||
| 517 | @end defun | 521 | @end defun |
| 518 | 522 | ||
| 519 | @defun shell-command-to-string command | 523 | @defun shell-command-to-string command |
| @@ -29,6 +29,10 @@ otherwise leave it unmarked. | |||
| 29 | 29 | ||
| 30 | ** Building Emacs now requires GNU make, version 3.81 or later. | 30 | ** Building Emacs now requires GNU make, version 3.81 or later. |
| 31 | 31 | ||
| 32 | +++ | ||
| 33 | ** `call-process-shell-command' and `process-file-shell-command' | ||
| 34 | don't take "&rest args" any more. | ||
| 35 | |||
| 32 | ** By default, Emacs no longer works on IRIX. We expect that Emacs | 36 | ** By default, Emacs no longer works on IRIX. We expect that Emacs |
| 33 | users are not affected by this, as SGI stopped supporting IRIX in | 37 | users are not affected by this, as SGI stopped supporting IRIX in |
| 34 | December 2013. If you are affected, please send a bug report. You | 38 | December 2013. If you are affected, please send a bug report. You |
| @@ -40,6 +44,9 @@ or by sticking with Emacs 24.4. | |||
| 40 | If gnustep-config is not available, the old heuristics are used. | 44 | If gnustep-config is not available, the old heuristics are used. |
| 41 | 45 | ||
| 42 | --- | 46 | --- |
| 47 | *** cc-compat.el | ||
| 48 | |||
| 49 | --- | ||
| 43 | ** The configure option `--with-pkg-config-prog' has been removed. | 50 | ** The configure option `--with-pkg-config-prog' has been removed. |
| 44 | Use './configure PKG_CONFIG=/full/name/of/pkg-config' if you need to. | 51 | Use './configure PKG_CONFIG=/full/name/of/pkg-config' if you need to. |
| 45 | 52 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cd042da8e92..69ccbfaa507 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,30 @@ | |||
| 1 | 2015-03-03 Juri Linkov <juri@linkov.net> | 1 | 2015-03-03 Juri Linkov <juri@linkov.net> |
| 2 | 2 | ||
| 3 | Better support for the case of typing RET on the prompt in comint. | ||
| 4 | |||
| 5 | * comint.el (comint-get-old-input-default): Go to the field end | ||
| 6 | when comint-use-prompt-regexp is nil. | ||
| 7 | (comint-line-beginning-position): Check if point is already | ||
| 8 | on the prompt before searching for the prompt when | ||
| 9 | comint-use-prompt-regexp is non-nil. (Bug#19710) | ||
| 10 | |||
| 11 | 2015-03-03 Eli Zaretskii <eliz@gnu.org> | ||
| 12 | |||
| 13 | * frame.el (frame-notice-user-settings): Refresh the value of | ||
| 14 | frame parameters after calling tty-handle-reverse-video. Call | ||
| 15 | face-set-after-frame-default with the actual parameters, to avoid | ||
| 16 | resetting colors back to unspecified. | ||
| 17 | (set-background-color, set-foreground-color): Pass the foreground | ||
| 18 | and background colors to face-set-after-frame-default. (Bug#19802) | ||
| 19 | |||
| 20 | 2015-03-03 Wolfgang Jenkner <wjenkner@inode.at> | ||
| 21 | |||
| 22 | * net/network-stream.el (network-stream-open-tls): Respect the | ||
| 23 | :end-of-capability setting. | ||
| 24 | |||
| 25 | 2015-03-03 Juri Linkov <juri@linkov.net> | ||
| 26 | 2015-03-03 Juri Linkov <juri@linkov.net> | ||
| 27 | |||
| 3 | Revert the previous change of comint-line-beginning-position callers, | 28 | Revert the previous change of comint-line-beginning-position callers, |
| 4 | and modify comint-line-beginning-position instead. | 29 | and modify comint-line-beginning-position instead. |
| 5 | 30 | ||
diff --git a/lisp/comint.el b/lisp/comint.el index b14ab5bdf9f..722a42d6af2 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -2222,7 +2222,10 @@ the current line with any initial string matching the regexp | |||
| 2222 | (null (get-char-property (setq bof (field-beginning)) 'field))) | 2222 | (null (get-char-property (setq bof (field-beginning)) 'field))) |
| 2223 | (field-string-no-properties bof) | 2223 | (field-string-no-properties bof) |
| 2224 | (comint-bol) | 2224 | (comint-bol) |
| 2225 | (buffer-substring-no-properties (point) (line-end-position))))) | 2225 | (buffer-substring-no-properties (point) |
| 2226 | (if comint-use-prompt-regexp | ||
| 2227 | (line-end-position) | ||
| 2228 | (field-end)))))) | ||
| 2226 | 2229 | ||
| 2227 | (defun comint-copy-old-input () | 2230 | (defun comint-copy-old-input () |
| 2228 | "Insert after prompt old input at point as new input to be edited. | 2231 | "Insert after prompt old input at point as new input to be edited. |
| @@ -2270,8 +2273,9 @@ a buffer local variable." | |||
| 2270 | (if comint-use-prompt-regexp | 2273 | (if comint-use-prompt-regexp |
| 2271 | ;; Use comint-prompt-regexp | 2274 | ;; Use comint-prompt-regexp |
| 2272 | (save-excursion | 2275 | (save-excursion |
| 2273 | (re-search-backward comint-prompt-regexp nil t) | ||
| 2274 | (beginning-of-line) | 2276 | (beginning-of-line) |
| 2277 | (unless (looking-at comint-prompt-regexp) | ||
| 2278 | (re-search-backward comint-prompt-regexp nil t)) | ||
| 2275 | (comint-skip-prompt) | 2279 | (comint-skip-prompt) |
| 2276 | (point)) | 2280 | (point)) |
| 2277 | ;; Use input fields. Note that, unlike the behavior of | 2281 | ;; Use input fields. Note that, unlike the behavior of |
diff --git a/lisp/frame.el b/lisp/frame.el index c81ee9bfa61..94e581b1e24 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -259,6 +259,10 @@ there (in decreasing order of priority)." | |||
| 259 | (let ((newparms (frame-parameters)) | 259 | (let ((newparms (frame-parameters)) |
| 260 | (frame (selected-frame))) | 260 | (frame (selected-frame))) |
| 261 | (tty-handle-reverse-video frame newparms) | 261 | (tty-handle-reverse-video frame newparms) |
| 262 | ;; tty-handle-reverse-video might change the frame's | ||
| 263 | ;; color parameters, and we need to use the updated | ||
| 264 | ;; value below. | ||
| 265 | (setq newparms (frame-parameters)) | ||
| 262 | ;; If we changed the background color, we need to update | 266 | ;; If we changed the background color, we need to update |
| 263 | ;; the background-mode parameter, and maybe some faces, | 267 | ;; the background-mode parameter, and maybe some faces, |
| 264 | ;; too. | 268 | ;; too. |
| @@ -266,7 +270,7 @@ there (in decreasing order of priority)." | |||
| 266 | (unless (or (assq 'background-mode initial-frame-alist) | 270 | (unless (or (assq 'background-mode initial-frame-alist) |
| 267 | (assq 'background-mode default-frame-alist)) | 271 | (assq 'background-mode default-frame-alist)) |
| 268 | (frame-set-background-mode frame)) | 272 | (frame-set-background-mode frame)) |
| 269 | (face-set-after-frame-default frame)))))) | 273 | (face-set-after-frame-default frame newparms)))))) |
| 270 | 274 | ||
| 271 | ;; If the initial frame is still around, apply initial-frame-alist | 275 | ;; If the initial frame is still around, apply initial-frame-alist |
| 272 | ;; and default-frame-alist to it. | 276 | ;; and default-frame-alist to it. |
| @@ -1201,7 +1205,15 @@ To get the frame's current background color, use `frame-parameters'." | |||
| 1201 | (modify-frame-parameters (selected-frame) | 1205 | (modify-frame-parameters (selected-frame) |
| 1202 | (list (cons 'background-color color-name))) | 1206 | (list (cons 'background-color color-name))) |
| 1203 | (or window-system | 1207 | (or window-system |
| 1204 | (face-set-after-frame-default (selected-frame)))) | 1208 | (face-set-after-frame-default (selected-frame) |
| 1209 | (list | ||
| 1210 | (cons 'background-color color-name) | ||
| 1211 | ;; Pass the foreground-color as | ||
| 1212 | ;; well, if defined, to avoid | ||
| 1213 | ;; losing it when faces are reset | ||
| 1214 | ;; to their defaults. | ||
| 1215 | (assq 'foreground-color | ||
| 1216 | (frame-parameters)))))) | ||
| 1205 | 1217 | ||
| 1206 | (defun set-foreground-color (color-name) | 1218 | (defun set-foreground-color (color-name) |
| 1207 | "Set the foreground color of the selected frame to COLOR-NAME. | 1219 | "Set the foreground color of the selected frame to COLOR-NAME. |
| @@ -1211,7 +1223,15 @@ To get the frame's current foreground color, use `frame-parameters'." | |||
| 1211 | (modify-frame-parameters (selected-frame) | 1223 | (modify-frame-parameters (selected-frame) |
| 1212 | (list (cons 'foreground-color color-name))) | 1224 | (list (cons 'foreground-color color-name))) |
| 1213 | (or window-system | 1225 | (or window-system |
| 1214 | (face-set-after-frame-default (selected-frame)))) | 1226 | (face-set-after-frame-default (selected-frame) |
| 1227 | (list | ||
| 1228 | (cons 'foreground-color color-name) | ||
| 1229 | ;; Pass the background-color as | ||
| 1230 | ;; well, if defined, to avoid | ||
| 1231 | ;; losing it when faces are reset | ||
| 1232 | ;; to their defaults. | ||
| 1233 | (assq 'background-color | ||
| 1234 | (frame-parameters)))))) | ||
| 1215 | 1235 | ||
| 1216 | (defun set-cursor-color (color-name) | 1236 | (defun set-cursor-color (color-name) |
| 1217 | "Set the text cursor color of the selected frame to COLOR-NAME. | 1237 | "Set the text cursor color of the selected frame to COLOR-NAME. |
diff --git a/nt/ChangeLog b/nt/ChangeLog index 240f58c850b..cc77b18adba 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2015-03-03 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * cmdproxy.c (get_next_token): Don't make backslashes disappear | ||
| 4 | without a trace when they are not followed by a quote. | ||
| 5 | (search_dir): Support searching programs whose file name already | ||
| 6 | has an arbitrary extension. (Bug#19817) | ||
| 7 | (main): When passing a command line to the shell, use cmd.exe | ||
| 8 | rules for quoting command-line tail. | ||
| 9 | |||
| 10 | 2015-03-03 Oscar Fuentes <ofv@wanadoo.es> | ||
| 1 | 2015-02-27 Mark Laws <mdl@60hz.org> | 11 | 2015-02-27 Mark Laws <mdl@60hz.org> |
| 2 | 12 | ||
| 3 | Support daemon mode on MS-Windows (bug#19688) | 13 | Support daemon mode on MS-Windows (bug#19688) |
diff --git a/nt/cmdproxy.c b/nt/cmdproxy.c index faef2f83496..3157a69c1b6 100644 --- a/nt/cmdproxy.c +++ b/nt/cmdproxy.c | |||
| @@ -135,7 +135,10 @@ skip_nonspace (const char *str) | |||
| 135 | return str; | 135 | return str; |
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | int escape_char = '\\'; | 138 | /* This value is never changed by the code. We keep the code that |
| 139 | supports also the value of '"', but let's allow the compiler to | ||
| 140 | optimize it out, until someone actually uses that. */ | ||
| 141 | const int escape_char = '\\'; | ||
| 139 | 142 | ||
| 140 | /* Get next token from input, advancing pointer. */ | 143 | /* Get next token from input, advancing pointer. */ |
| 141 | int | 144 | int |
| @@ -196,11 +199,31 @@ get_next_token (char * buf, const char ** pSrc) | |||
| 196 | /* End of string, but no ending quote found. We might want to | 199 | /* End of string, but no ending quote found. We might want to |
| 197 | flag this as an error, but for now will consider the end as | 200 | flag this as an error, but for now will consider the end as |
| 198 | the end of the token. */ | 201 | the end of the token. */ |
| 202 | if (escape_char == '\\') | ||
| 203 | { | ||
| 204 | /* Output literal backslashes. Note that if the | ||
| 205 | token ends with an unpaired backslash, we eat it | ||
| 206 | up here. But since this case invokes undefined | ||
| 207 | behavior anyway, it's okay. */ | ||
| 208 | while (escape_char_run > 1) | ||
| 209 | { | ||
| 210 | *o++ = escape_char; | ||
| 211 | escape_char_run -= 2; | ||
| 212 | } | ||
| 213 | } | ||
| 199 | *o = '\0'; | 214 | *o = '\0'; |
| 200 | break; | 215 | break; |
| 201 | } | 216 | } |
| 202 | else | 217 | else |
| 203 | { | 218 | { |
| 219 | if (escape_char == '\\') | ||
| 220 | { | ||
| 221 | /* Output literal backslashes. Note that we don't | ||
| 222 | treat a backslash as an escape character here, | ||
| 223 | since it doesn't preceed a quote. */ | ||
| 224 | for ( ; escape_char_run > 0; escape_char_run--) | ||
| 225 | *o++ = escape_char; | ||
| 226 | } | ||
| 204 | *o++ = *p++; | 227 | *o++ = *p++; |
| 205 | } | 228 | } |
| 206 | } | 229 | } |
| @@ -251,13 +274,44 @@ search_dir (const char *dir, const char *exec, int bufsize, char *buffer) | |||
| 251 | int n_exts = sizeof (exts) / sizeof (char *); | 274 | int n_exts = sizeof (exts) / sizeof (char *); |
| 252 | char *dummy; | 275 | char *dummy; |
| 253 | int i, rc; | 276 | int i, rc; |
| 277 | const char *pext = strrchr (exec, '\\'); | ||
| 278 | |||
| 279 | /* Does EXEC already include an extension? */ | ||
| 280 | if (!pext) | ||
| 281 | pext = exec; | ||
| 282 | pext = strchr (pext, '.'); | ||
| 254 | 283 | ||
| 255 | /* Search the directory for the program. */ | 284 | /* Search the directory for the program. */ |
| 256 | for (i = 0; i < n_exts; i++) | 285 | if (pext) |
| 257 | { | 286 | { |
| 258 | rc = SearchPath (dir, exec, exts[i], bufsize, buffer, &dummy); | 287 | /* SearchPath will not append an extension if the file already |
| 288 | has an extension, so we must append it ourselves. */ | ||
| 289 | char exec_ext[MAX_PATH], *p; | ||
| 290 | |||
| 291 | p = strcpy (exec_ext, exec) + strlen (exec); | ||
| 292 | |||
| 293 | /* Search first without any extension; if found, we are done. */ | ||
| 294 | rc = SearchPath (dir, exec_ext, NULL, bufsize, buffer, &dummy); | ||
| 259 | if (rc > 0) | 295 | if (rc > 0) |
| 260 | return rc; | 296 | return rc; |
| 297 | |||
| 298 | /* Try the known extensions. */ | ||
| 299 | for (i = 0; i < n_exts; i++) | ||
| 300 | { | ||
| 301 | strcpy (p, exts[i]); | ||
| 302 | rc = SearchPath (dir, exec_ext, NULL, bufsize, buffer, &dummy); | ||
| 303 | if (rc > 0) | ||
| 304 | return rc; | ||
| 305 | } | ||
| 306 | } | ||
| 307 | else | ||
| 308 | { | ||
| 309 | for (i = 0; i < n_exts; i++) | ||
| 310 | { | ||
| 311 | rc = SearchPath (dir, exec, exts[i], bufsize, buffer, &dummy); | ||
| 312 | if (rc > 0) | ||
| 313 | return rc; | ||
| 314 | } | ||
| 261 | } | 315 | } |
| 262 | 316 | ||
| 263 | return 0; | 317 | return 0; |
| @@ -798,7 +852,7 @@ main (int argc, char ** argv) | |||
| 798 | quotes, since they are illegal in path names). */ | 852 | quotes, since they are illegal in path names). */ |
| 799 | 853 | ||
| 800 | remlen = maxlen = | 854 | remlen = maxlen = |
| 801 | strlen (progname) + extra_arg_space + strlen (cmdline) + 16; | 855 | strlen (progname) + extra_arg_space + strlen (cmdline) + 16 + 2; |
| 802 | buf = p = alloca (maxlen + 1); | 856 | buf = p = alloca (maxlen + 1); |
| 803 | 857 | ||
| 804 | /* Quote progname in case it contains spaces. */ | 858 | /* Quote progname in case it contains spaces. */ |
| @@ -813,10 +867,16 @@ main (int argc, char ** argv) | |||
| 813 | remlen = maxlen - (p - buf); | 867 | remlen = maxlen - (p - buf); |
| 814 | } | 868 | } |
| 815 | 869 | ||
| 870 | /* Now that we know we will be invoking the shell, quote the | ||
| 871 | command line after the "/c" switch as the shell expects: | ||
| 872 | a single pair of quotes enclosing the entire command | ||
| 873 | tail, no matter whether quotes are used in the command | ||
| 874 | line, and how many of them are there. See the output of | ||
| 875 | "cmd /?" for how cmd.exe treats quotes. */ | ||
| 816 | if (run_command_dot_com) | 876 | if (run_command_dot_com) |
| 817 | _snprintf (p, remlen, " /e:%d /c %s", envsize, cmdline); | 877 | _snprintf (p, remlen, " /e:%d /c \"%s\"", envsize, cmdline); |
| 818 | else | 878 | else |
| 819 | _snprintf (p, remlen, " /c %s", cmdline); | 879 | _snprintf (p, remlen, " /c \"%s\"", cmdline); |
| 820 | cmdline = buf; | 880 | cmdline = buf; |
| 821 | } | 881 | } |
| 822 | else | 882 | else |
diff --git a/src/ChangeLog b/src/ChangeLog index 5bfb1809139..2609ed7dd01 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,12 @@ | |||
| 1 | 2015-03-03 Eli Zaretskii <eliz@gnu.org> | 1 | 2015-03-03 Eli Zaretskii <eliz@gnu.org> |
| 2 | 2 | ||
| 3 | * xfaces.c (map_tty_color): Use assoc_no_quit instead of | ||
| 4 | assq_no_quit to fetch color definition by its string name. | ||
| 5 | (Bug#19802) | ||
| 6 | |||
| 7 | 2015-03-03 Eli Zaretskii <eliz@gnu.org> | ||
| 8 | 2015-03-03 Eli Zaretskii <eliz@gnu.org> | ||
| 9 | |||
| 3 | * xdisp.c (move_it_in_display_line_to): Handle the case where the | 10 | * xdisp.c (move_it_in_display_line_to): Handle the case where the |
| 4 | last character of a screen line is whitespace, and we are under | 11 | last character of a screen line is whitespace, and we are under |
| 5 | word-wrap with overflow-newline-into-fringe turned on. | 12 | word-wrap with overflow-newline-into-fringe turned on. |
diff --git a/src/xfaces.c b/src/xfaces.c index fcfdbc0ee4f..b2697220bce 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -5700,7 +5700,7 @@ map_tty_color (struct frame *f, struct face *face, | |||
| 5700 | if (STRINGP (color) | 5700 | if (STRINGP (color) |
| 5701 | && SCHARS (color) | 5701 | && SCHARS (color) |
| 5702 | && CONSP (Vtty_defined_color_alist) | 5702 | && CONSP (Vtty_defined_color_alist) |
| 5703 | && (def = assq_no_quit (color, call1 (Qtty_color_alist, frame)), | 5703 | && (def = assoc_no_quit (color, call1 (Qtty_color_alist, frame)), |
| 5704 | CONSP (def))) | 5704 | CONSP (def))) |
| 5705 | { | 5705 | { |
| 5706 | /* Associations in tty-defined-color-alist are of the form | 5706 | /* Associations in tty-defined-color-alist are of the form |