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 @@ +2015-03-03 Eli Zaretskii <eliz@gnu.org> + + * processes.texi (Synchronous Processes): Update documentation of + call-process-shell-command and process-file-shell-command. + +2015-03-03 Eli Zaretskii <eliz@gnu.org> 2015-03-03 Daniel Colascione <dancol@dancol.org> * 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{} @c It actually uses shell-command-switch, but no need to mention that here. @end defun -@defun call-process-shell-command command &optional infile destination display &rest args +@defun call-process-shell-command command &optional infile destination display This function executes the shell command @var{command} synchronously. -The final arguments @var{args} are additional arguments to add at the -end of @var{command}. The other arguments are handled as in -@code{call-process}. +The arguments are handled as in @code{call-process}. An old calling +convention allowed to pass any number of additional arguments after +@var{display}, which were concatenated to @var{command}; this is still +supported, but strongly discouraged. @end defun -@defun process-file-shell-command command &optional infile destination display &rest args +@defun process-file-shell-command command &optional infile destination display This function is like @code{call-process-shell-command}, but uses @code{process-file} internally. Depending on @code{default-directory}, -@var{command} can be executed also on remote hosts. +@var{command} can be executed also on remote hosts. An old calling +convention allowed to pass any number of additional arguments after +@var{display}, which were concatenated to @var{command}; this is still +supported, but strongly discouraged. @end defun @defun shell-command-to-string command @@ -29,6 +29,10 @@ otherwise leave it unmarked. ** Building Emacs now requires GNU make, version 3.81 or later. ++++ +** `call-process-shell-command' and `process-file-shell-command' +don't take "&rest args" any more. + ** By default, Emacs no longer works on IRIX. We expect that Emacs users are not affected by this, as SGI stopped supporting IRIX in December 2013. If you are affected, please send a bug report. You @@ -40,6 +44,9 @@ or by sticking with Emacs 24.4. If gnustep-config is not available, the old heuristics are used. --- +*** cc-compat.el + +--- ** The configure option `--with-pkg-config-prog' has been removed. Use './configure PKG_CONFIG=/full/name/of/pkg-config' if you need to. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cd042da8e92..69ccbfaa507 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,30 @@ 2015-03-03 Juri Linkov <juri@linkov.net> + Better support for the case of typing RET on the prompt in comint. + + * comint.el (comint-get-old-input-default): Go to the field end + when comint-use-prompt-regexp is nil. + (comint-line-beginning-position): Check if point is already + on the prompt before searching for the prompt when + comint-use-prompt-regexp is non-nil. (Bug#19710) + +2015-03-03 Eli Zaretskii <eliz@gnu.org> + + * frame.el (frame-notice-user-settings): Refresh the value of + frame parameters after calling tty-handle-reverse-video. Call + face-set-after-frame-default with the actual parameters, to avoid + resetting colors back to unspecified. + (set-background-color, set-foreground-color): Pass the foreground + and background colors to face-set-after-frame-default. (Bug#19802) + +2015-03-03 Wolfgang Jenkner <wjenkner@inode.at> + + * net/network-stream.el (network-stream-open-tls): Respect the + :end-of-capability setting. + +2015-03-03 Juri Linkov <juri@linkov.net> +2015-03-03 Juri Linkov <juri@linkov.net> + Revert the previous change of comint-line-beginning-position callers, and modify comint-line-beginning-position instead. 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 (null (get-char-property (setq bof (field-beginning)) 'field))) (field-string-no-properties bof) (comint-bol) - (buffer-substring-no-properties (point) (line-end-position))))) + (buffer-substring-no-properties (point) + (if comint-use-prompt-regexp + (line-end-position) + (field-end)))))) (defun comint-copy-old-input () "Insert after prompt old input at point as new input to be edited. @@ -2270,8 +2273,9 @@ a buffer local variable." (if comint-use-prompt-regexp ;; Use comint-prompt-regexp (save-excursion - (re-search-backward comint-prompt-regexp nil t) (beginning-of-line) + (unless (looking-at comint-prompt-regexp) + (re-search-backward comint-prompt-regexp nil t)) (comint-skip-prompt) (point)) ;; 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)." (let ((newparms (frame-parameters)) (frame (selected-frame))) (tty-handle-reverse-video frame newparms) + ;; tty-handle-reverse-video might change the frame's + ;; color parameters, and we need to use the updated + ;; value below. + (setq newparms (frame-parameters)) ;; If we changed the background color, we need to update ;; the background-mode parameter, and maybe some faces, ;; too. @@ -266,7 +270,7 @@ there (in decreasing order of priority)." (unless (or (assq 'background-mode initial-frame-alist) (assq 'background-mode default-frame-alist)) (frame-set-background-mode frame)) - (face-set-after-frame-default frame)))))) + (face-set-after-frame-default frame newparms)))))) ;; If the initial frame is still around, apply initial-frame-alist ;; and default-frame-alist to it. @@ -1201,7 +1205,15 @@ To get the frame's current background color, use `frame-parameters'." (modify-frame-parameters (selected-frame) (list (cons 'background-color color-name))) (or window-system - (face-set-after-frame-default (selected-frame)))) + (face-set-after-frame-default (selected-frame) + (list + (cons 'background-color color-name) + ;; Pass the foreground-color as + ;; well, if defined, to avoid + ;; losing it when faces are reset + ;; to their defaults. + (assq 'foreground-color + (frame-parameters)))))) (defun set-foreground-color (color-name) "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'." (modify-frame-parameters (selected-frame) (list (cons 'foreground-color color-name))) (or window-system - (face-set-after-frame-default (selected-frame)))) + (face-set-after-frame-default (selected-frame) + (list + (cons 'foreground-color color-name) + ;; Pass the background-color as + ;; well, if defined, to avoid + ;; losing it when faces are reset + ;; to their defaults. + (assq 'background-color + (frame-parameters)))))) (defun set-cursor-color (color-name) "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 @@ +2015-03-03 Eli Zaretskii <eliz@gnu.org> + + * cmdproxy.c (get_next_token): Don't make backslashes disappear + without a trace when they are not followed by a quote. + (search_dir): Support searching programs whose file name already + has an arbitrary extension. (Bug#19817) + (main): When passing a command line to the shell, use cmd.exe + rules for quoting command-line tail. + +2015-03-03 Oscar Fuentes <ofv@wanadoo.es> 2015-02-27 Mark Laws <mdl@60hz.org> 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) return str; } -int escape_char = '\\'; +/* This value is never changed by the code. We keep the code that + supports also the value of '"', but let's allow the compiler to + optimize it out, until someone actually uses that. */ +const int escape_char = '\\'; /* Get next token from input, advancing pointer. */ int @@ -196,11 +199,31 @@ get_next_token (char * buf, const char ** pSrc) /* End of string, but no ending quote found. We might want to flag this as an error, but for now will consider the end as the end of the token. */ + if (escape_char == '\\') + { + /* Output literal backslashes. Note that if the + token ends with an unpaired backslash, we eat it + up here. But since this case invokes undefined + behavior anyway, it's okay. */ + while (escape_char_run > 1) + { + *o++ = escape_char; + escape_char_run -= 2; + } + } *o = '\0'; break; } else { + if (escape_char == '\\') + { + /* Output literal backslashes. Note that we don't + treat a backslash as an escape character here, + since it doesn't preceed a quote. */ + for ( ; escape_char_run > 0; escape_char_run--) + *o++ = escape_char; + } *o++ = *p++; } } @@ -251,13 +274,44 @@ search_dir (const char *dir, const char *exec, int bufsize, char *buffer) int n_exts = sizeof (exts) / sizeof (char *); char *dummy; int i, rc; + const char *pext = strrchr (exec, '\\'); + + /* Does EXEC already include an extension? */ + if (!pext) + pext = exec; + pext = strchr (pext, '.'); /* Search the directory for the program. */ - for (i = 0; i < n_exts; i++) + if (pext) { - rc = SearchPath (dir, exec, exts[i], bufsize, buffer, &dummy); + /* SearchPath will not append an extension if the file already + has an extension, so we must append it ourselves. */ + char exec_ext[MAX_PATH], *p; + + p = strcpy (exec_ext, exec) + strlen (exec); + + /* Search first without any extension; if found, we are done. */ + rc = SearchPath (dir, exec_ext, NULL, bufsize, buffer, &dummy); if (rc > 0) return rc; + + /* Try the known extensions. */ + for (i = 0; i < n_exts; i++) + { + strcpy (p, exts[i]); + rc = SearchPath (dir, exec_ext, NULL, bufsize, buffer, &dummy); + if (rc > 0) + return rc; + } + } + else + { + for (i = 0; i < n_exts; i++) + { + rc = SearchPath (dir, exec, exts[i], bufsize, buffer, &dummy); + if (rc > 0) + return rc; + } } return 0; @@ -798,7 +852,7 @@ main (int argc, char ** argv) quotes, since they are illegal in path names). */ remlen = maxlen = - strlen (progname) + extra_arg_space + strlen (cmdline) + 16; + strlen (progname) + extra_arg_space + strlen (cmdline) + 16 + 2; buf = p = alloca (maxlen + 1); /* Quote progname in case it contains spaces. */ @@ -813,10 +867,16 @@ main (int argc, char ** argv) remlen = maxlen - (p - buf); } + /* Now that we know we will be invoking the shell, quote the + command line after the "/c" switch as the shell expects: + a single pair of quotes enclosing the entire command + tail, no matter whether quotes are used in the command + line, and how many of them are there. See the output of + "cmd /?" for how cmd.exe treats quotes. */ if (run_command_dot_com) - _snprintf (p, remlen, " /e:%d /c %s", envsize, cmdline); + _snprintf (p, remlen, " /e:%d /c \"%s\"", envsize, cmdline); else - _snprintf (p, remlen, " /c %s", cmdline); + _snprintf (p, remlen, " /c \"%s\"", cmdline); cmdline = buf; } else diff --git a/src/ChangeLog b/src/ChangeLog index 5bfb1809139..2609ed7dd01 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,12 @@ 2015-03-03 Eli Zaretskii <eliz@gnu.org> + * xfaces.c (map_tty_color): Use assoc_no_quit instead of + assq_no_quit to fetch color definition by its string name. + (Bug#19802) + +2015-03-03 Eli Zaretskii <eliz@gnu.org> +2015-03-03 Eli Zaretskii <eliz@gnu.org> + * xdisp.c (move_it_in_display_line_to): Handle the case where the last character of a screen line is whitespace, and we are under 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, if (STRINGP (color) && SCHARS (color) && CONSP (Vtty_defined_color_alist) - && (def = assq_no_quit (color, call1 (Qtty_color_alist, frame)), + && (def = assoc_no_quit (color, call1 (Qtty_color_alist, frame)), CONSP (def))) { /* Associations in tty-defined-color-alist are of the form |