From 93304e31159ac4e123b26349429cdce0fbd23685 Mon Sep 17 00:00:00 2001 From: Gemini Lasswell Date: Mon, 13 Nov 2017 13:22:39 -0800 Subject: [PATCH 1/8] Improve documentation of Edebug and macros * doc/lispref/edebug.texi (Instrumenting Macro Calls): Improve discussion of when it might be necessary to find and evaluate macro specifications before instrumenting. (Specification List): Clarify what "defining form" means to Edebug and when 'def-form' or 'def-body' should be used instead of 'form' or 'body'. --- doc/lispref/edebug.texi | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi index cebf0a3af3d..62fd9f38cb6 100644 --- a/doc/lispref/edebug.texi +++ b/doc/lispref/edebug.texi @@ -1144,9 +1144,12 @@ the @code{declare} form. @c automatically load the entire source file containing the function @c being instrumented. That would avoid this. Take care to ensure that the specifications are known to Edebug when -you instrument code. If you are instrumenting a function from a file -that uses @code{eval-when-compile} to require another file containing -macro definitions, you may need to explicitly load that file. +you instrument code. If you are instrumenting a function which uses a +macro defined in another file, you may first need to either evaluate +the @code{require} forms in the file containing your function, or +explicitly load the file containing the macro. If the definition of a +macro is wrapped by @code{eval-when-compile}, you may need to evaluate +it. You can also define an edebug specification for a macro separately from the macro definition with @code{def-edebug-spec}. Adding @@ -1231,13 +1234,17 @@ A single unevaluated Lisp object, which is not instrumented. @c an "expression" is not necessarily intended for evaluation. @item form -A single evaluated expression, which is instrumented. +A single evaluated expression, which is instrumented. If your macro +wraps the expression with @code{lambda} before it is evaluated, use +@code{def-form} instead. See @code{def-form} below. @item place A generalized variable. @xref{Generalized Variables}. @item body -Short for @code{&rest form}. See @code{&rest} below. +Short for @code{&rest form}. See @code{&rest} below. If your macro +wraps its body of code with @code{lambda} before it is evaluated, use +@code{def-body} instead. See @code{def-body} below. @item function-form A function form: either a quoted function symbol, a quoted lambda @@ -1292,11 +1299,16 @@ succeeds. @item &define @c @kindex &define @r{(Edebug)} -Indicates that the specification is for a defining form. The defining -form itself is not instrumented (that is, Edebug does not stop before and -after the defining form), but forms inside it typically will be -instrumented. The @code{&define} keyword should be the first element in -a list specification. + +Indicates that the specification is for a defining form. Edebug's +definition of a defining form is a form containing one or more code +forms which are saved and executed later, after the execution of the +defining form. + +The defining form itself is not instrumented (that is, Edebug does not +stop before and after the defining form), but forms inside it +typically will be instrumented. The @code{&define} keyword should be +the first element in a list specification. @item nil This is successful when there are no more arguments to match at the From caa39f495c0783dac2d5701100db83ea10f126c0 Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Mon, 13 Nov 2017 23:56:26 +0000 Subject: [PATCH 2/8] Fix cookie handling (bug#29282) * lisp/url/url-cookie.el (url-cookie-handle-set-cookie): Regard a Set-Cookie header as it contains a single cookie; prefer Max-Age to Expires and convert it to Expires; remove support for old time string styles (bug#29282). --- lisp/url/url-cookie.el | 53 +++++++++++------------------------------- 1 file changed, 13 insertions(+), 40 deletions(-) diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el index d922033d820..27c8dd70e09 100644 --- a/lisp/url/url-cookie.el +++ b/lisp/url/url-cookie.el @@ -241,7 +241,7 @@ telling Microsoft that." (defun url-cookie-handle-set-cookie (str) (setq url-cookies-changed-since-last-save t) - (let* ((args (url-parse-args str t)) + (let* ((args (nreverse (url-parse-args str t))) (case-fold-search t) (secure (and (assoc-string "secure" args t) t)) (domain (or (cdr-safe (assoc-string "domain" args t)) @@ -249,44 +249,16 @@ telling Microsoft that." (current-url (url-view-url t)) (trusted url-cookie-trusted-urls) (untrusted url-cookie-untrusted-urls) - (expires (cdr-safe (assoc-string "expires" args t))) + (max-age (cdr-safe (assoc-string "max-age" args t))) (localpart (or (cdr-safe (assoc-string "path" args t)) (file-name-directory (url-filename url-current-object)))) - (rest nil)) - (dolist (this args) - (or (member (downcase (car this)) '("secure" "domain" "expires" "path")) - (setq rest (cons this rest)))) - - ;; Sometimes we get dates that the timezone package cannot handle very - ;; gracefully - take care of this here, instead of in url-cookie-expired-p - ;; to speed things up. - (and expires - (string-match - (concat "^[^,]+, +\\(..\\)-\\(...\\)-\\(..\\) +" - "\\(..:..:..\\) +\\[*\\([^]]+\\)\\]*$") - expires) - (setq expires (concat (match-string 1 expires) " " - (match-string 2 expires) " " - (match-string 3 expires) " " - (match-string 4 expires) " [" - (match-string 5 expires) "]"))) - - ;; This one is for older Emacs/XEmacs variants that don't - ;; understand this format without tenths of a second in it. - ;; Wednesday, 30-Dec-2037 16:00:00 GMT - ;; - vs - - ;; Wednesday, 30-Dec-2037 16:00:00.00 GMT - (and expires - (string-match - "\\([0-9]+\\)-\\([A-Za-z]+\\)-\\([0-9]+\\)[ \t]+\\([0-9]+:[0-9]+:[0-9]+\\)\\(\\.[0-9]+\\)*[ \t]+\\([-+a-zA-Z0-9]+\\)" - expires) - (setq expires (concat (match-string 1 expires) "-" ; day - (match-string 2 expires) "-" ; month - (match-string 3 expires) " " ; year - (match-string 4 expires) ".00 " ; hour:minutes:seconds - (match-string 6 expires)))) ":" ; timezone - + (expires nil)) + (if (and max-age (string-match "\\`-?[0-9]+\\'" max-age)) + (setq expires (format-time-string "%a %b %d %H:%M:%S %Y GMT" + (time-add nil (read max-age)) + t)) + (setq expires (cdr-safe (assoc-string "expires" args t)))) (while (consp trusted) (if (string-match (car trusted) current-url) (setq trusted (- (match-end 0) (match-beginning 0))) @@ -310,8 +282,9 @@ telling Microsoft that." (not trusted) (save-window-excursion (with-output-to-temp-buffer "*Cookie Warning*" - (dolist (x rest) - (princ (format "%s - %s" (car x) (cdr x))))) + (princ (format "%s=\"%s\"\n" (caar args) (cdar args))) + (dolist (x (cdr args)) + (princ (format " %s=\"%s\"\n" (car x) (cdr x))))) (prog1 (not (funcall url-confirmation-func (format "Allow %s to set these cookies? " @@ -322,8 +295,8 @@ telling Microsoft that." nil) ((url-cookie-host-can-set-p (url-host url-current-object) domain) ;; Cookie is accepted by the user, and passes our security checks. - (dolist (cur rest) - (url-cookie-store (car cur) (cdr cur) expires domain localpart secure))) + (url-cookie-store (caar args) (cdar args) + expires domain localpart secure)) (t (url-lazy-message "%s tried to set a cookie for domain %s - rejected." (url-host url-current-object) domain))))) From 0491de8dad7b3e25e643f4556375a82b7e6ac445 Mon Sep 17 00:00:00 2001 From: Alexander Gramiak Date: Sun, 12 Nov 2017 18:06:32 -0600 Subject: [PATCH 3/8] * etc/PROBLEMS: Remove fixed xterm-mouse-mode problems See: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29143#26 --- etc/PROBLEMS | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 3dd225302a7..ac76230f690 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -1117,14 +1117,6 @@ to happen in *.UTF-8 locales; zh_CN.GB2312 and zh_CN.GBK locales, for example, work fine. A bug report has been filed in the Gnome bugzilla: http://bugzilla.gnome.org/show_bug.cgi?id=357032 -*** Gnome: Emacs's xterm-mouse-mode doesn't work on the Gnome terminal. - -A symptom of this bug is that double-clicks insert a control sequence -into the buffer. The reason this happens is an apparent -incompatibility of the Gnome terminal with Xterm, which also affects -other programs using the Xterm mouse interface. A problem report has -been filed. - *** Gnome: GPaste clipboard manager causes erratic behavior of 'yank' The symptom is that 'kill-line' followed by 'yank' often (but not @@ -1496,22 +1488,6 @@ this, you can remove the X resource or put this in your init file: (xterm-remove-modify-other-keys) -** Emacs's xterm-mouse doesn't work well in Evil mode. - -Specifically, clicking mouse-1 doesn't work as expected: instead of -moving point where you click, it highlights the region between the -line beginning and the click location, and displays error messages -about unbound keys in the echo area. - -To work around this, put this in your .emacs file: - - (with-eval-after-load 'evil-maps - (define-key evil-motion-state-map [down-mouse-1] nil)) - -This appears to be a bug in Evil. -See discussions in https://github.com/emacs-evil/evil/issues/960 -and https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29143 - ** Emacs spontaneously displays "I-search: " at the bottom of the screen. This means that Control-S/Control-Q (XON/XOFF) "flow control" is being From ff7bd84b233888257b4b71214eb0a372168d0bae Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Tue, 14 Nov 2017 10:09:24 +0100 Subject: [PATCH 4/8] Make 'mouse-drag-and-drop-region' work with 'mouse-autoselect-window' non-nil * lisp/mouse.el (mouse-drag-and-drop-region): Ignore 'select-window' events to make it work with 'mouse-autoselect-window'. --- lisp/mouse.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/mouse.el b/lisp/mouse.el index 5eeee1ec52c..545a7ff2a02 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -2380,7 +2380,9 @@ is copied instead of being cut." ;; When event was click instead of drag, skip loop (while (progn (setq event (read-event)) - (mouse-movement-p event)) + (or (mouse-movement-p event) + ;; Handle `mouse-autoselect-window'. + (eq (car event) 'select-window))) (unless value-selection ; initialization (delete-overlay mouse-secondary-overlay) (setq value-selection (buffer-substring start end)) From 8b900e5ba2052898d98f7bd4ff3151389c10ab02 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Tue, 14 Nov 2017 10:21:55 +0100 Subject: [PATCH 5/8] Fix Bug#2928 * test/lisp/net/tramp-tests.el (tramp-test25-file-selinux): Enhance test. (Bug#29287) (tramp-test44-delay-load): Fix for older Emacsen. --- test/lisp/net/tramp-tests.el | 117 +++++++++++++++++++++++------------ 1 file changed, 76 insertions(+), 41 deletions(-) diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 7a7cf933fa3..a43ac739496 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -2921,6 +2921,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." ;; Cleanup. (ignore-errors (delete-file tmp-name)))))) +;; This test is inspired by Bug#29149. (ert-deftest tramp-test24-file-acl () "Check that `file-acl' and `set-file-acl' work proper." (skip-unless (tramp--test-enabled)) @@ -2995,8 +2996,6 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (ignore-errors (delete-file tmp-name1)) (ignore-errors (delete-file tmp-name3)))))) -;; TODO: This test didn't run in reality yet. Pls report if it -;; doesn't work as expected. (ert-deftest tramp-test25-file-selinux () "Check `file-selinux-context' and `set-file-selinux-context'." (skip-unless (tramp--test-enabled)) @@ -3013,7 +3012,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." ;; Both files are remote. (unwind-protect (progn - ;; Two files with same SELINUX context. + ;; Two files with same SELinux context. (write-region "foo" nil tmp-name1) (should (file-exists-p tmp-name1)) (should (file-selinux-context tmp-name1)) @@ -3023,14 +3022,18 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (equal (file-selinux-context tmp-name1) (file-selinux-context tmp-name2))) - ;; Different permissions mean different SELINUX context. - (set-file-modes tmp-name1 #o777) - (set-file-modes tmp-name2 #o444) - (should-not - (equal - (file-selinux-context tmp-name1) - (file-selinux-context tmp-name2))) - ;; Copy SELINUX context. + ;; Check different SELinux context. We cannot support + ;; different ranges in this test; let's assume the most + ;; likely one. + (let ((context (file-selinux-context tmp-name1))) + (when (and (string-equal (nth 3 context) "s0") + (setcar (nthcdr 3 context) "s0:c0") + (set-file-selinux-context tmp-name1 context)) + (should-not + (equal + (file-selinux-context tmp-name1) + (file-selinux-context tmp-name2))))) + ;; Copy SELinux context. (should (set-file-selinux-context tmp-name2 (file-selinux-context tmp-name1))) @@ -3038,7 +3041,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (equal (file-selinux-context tmp-name1) (file-selinux-context tmp-name2))) - ;; An invalid SELINUX context does not harm. + ;; An invalid SELinux context does not harm. (should-not (set-file-selinux-context tmp-name2 "foo"))) ;; Cleanup. @@ -3047,52 +3050,83 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." ;; Remote and local file. (unwind-protect - (when (not (or (equal (file-selinux-context temporary-file-directory) - '(nil nil nil nil)) - (tramp--test-windows-nt-or-smb-p))) - ;; Two files with same SELINUX context. + (when (and (not + (or (equal (file-selinux-context temporary-file-directory) + '(nil nil nil nil)) + (tramp--test-windows-nt-or-smb-p))) + ;; Both users shall use the same SELinux context. + (string-equal + (let ((default-directory temporary-file-directory)) + (shell-command-to-string "id -Z")) + (let ((default-directory + tramp-test-temporary-file-directory)) + (shell-command-to-string "id -Z")))) + + ;; Two files with same SELinux context. (write-region "foo" nil tmp-name1) (should (file-exists-p tmp-name1)) (should (file-selinux-context tmp-name1)) (copy-file tmp-name1 tmp-name3) (should (file-selinux-context tmp-name3)) + ;; We cannot expect that copying over file system + ;; boundaries keeps SELinux context. So we copy it + ;; explicitely. + (should + (set-file-selinux-context + tmp-name3 (file-selinux-context tmp-name1))) (should (equal (file-selinux-context tmp-name1) (file-selinux-context tmp-name3))) - ;; Different permissions mean different SELINUX context. - (set-file-modes tmp-name1 #o777) - (set-file-modes tmp-name3 #o444) - (should-not - (equal - (file-selinux-context tmp-name1) - (file-selinux-context tmp-name3))) - ;; Copy SELINUX context. - (set-file-selinux-context - tmp-name3 (file-selinux-context tmp-name1)) + ;; Check different SELinux context. We cannot support + ;; different ranges in this test; let's assume the most + ;; likely one. + (let ((context (file-selinux-context tmp-name1))) + (when (and (string-equal (nth 3 context) "s0") + (setcar (nthcdr 3 context) "s0:c0") + (set-file-selinux-context tmp-name1 context)) + (should-not + (equal + (file-selinux-context tmp-name1) + (file-selinux-context tmp-name3))))) + ;; Copy SELinux context. + (should + (set-file-selinux-context + tmp-name3 (file-selinux-context tmp-name1))) (should (equal (file-selinux-context tmp-name1) (file-selinux-context tmp-name3))) - ;; Two files with same SELINUX context. + ;; Two files with same SELinux context. (delete-file tmp-name1) (copy-file tmp-name3 tmp-name1) (should (file-selinux-context tmp-name1)) + ;; We cannot expect that copying over file system + ;; boundaries keeps SELinux context. So we copy it + ;; explicitely. + (should + (set-file-selinux-context + tmp-name1 (file-selinux-context tmp-name3))) (should (equal (file-selinux-context tmp-name1) (file-selinux-context tmp-name3))) - ;; Different permissions mean different SELINUX context. - (set-file-modes tmp-name1 #o777) - (set-file-modes tmp-name3 #o444) - (should-not - (equal - (file-selinux-context tmp-name1) - (file-selinux-context tmp-name3))) - ;; Copy SELINUX context. - (set-file-selinux-context - tmp-name1 (file-selinux-context tmp-name2)) + ;; Check different SELinux context. We cannot support + ;; different ranges in this test; let's assume the most + ;; likely one. + (let ((context (file-selinux-context tmp-name3))) + (when (and (string-equal (nth 3 context) "s0") + (setcar (nthcdr 3 context) "s0:c0") + (set-file-selinux-context tmp-name3 context)) + (should-not + (equal + (file-selinux-context tmp-name1) + (file-selinux-context tmp-name3))))) + ;; Copy SELinux context. + (should + (set-file-selinux-context + tmp-name1 (file-selinux-context tmp-name3))) (should (equal (file-selinux-context tmp-name1) @@ -3619,7 +3653,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (fboundp 'connection-local-set-profiles))) ;; `connection-local-set-profile-variables' and - ;; `connection-local-set-profiles' exist since Emacs 26. We don't + ;; `connection-local-set-profiles' exist since Emacs 26.1. We don't ;; want to see compiler warnings for older Emacsen. (let ((default-directory tramp-test-temporary-file-directory) explicit-shell-file-name kill-buffer-query-functions) @@ -3923,8 +3957,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (and (fboundp 'make-nearby-temp-file) (fboundp 'temporary-file-directory))) ;; `make-nearby-temp-file' and `temporary-file-directory' exists - ;; since Emacs 26. We don't want to see compiler warnings for older - ;; Emacsen. + ;; since Emacs 26.1. We don't want to see compiler warnings for + ;; older Emacsen. (let ((default-directory tramp-test-temporary-file-directory) tmp-file) ;; The remote host shall know a temporary file directory. @@ -4622,7 +4656,8 @@ process sentinels. They shall not disturb each other." (message \"Tramp loaded: %%s\" (featurep 'tramp)) \ (file-name-all-completions \"/foo:\" \"/\") \ (message \"Tramp loaded: %%s\" (featurep 'tramp)))")) - (dolist (tm '(t nil)) + ;; Tramp doesn't load when `tramp-mode' is nil since Emacs 26.1. + (dolist (tm (if (tramp--test-emacs26-p) '(t nil) '(nil))) (should (string-match (format From a5ec644caa746092a9a1d002f565d4fb260f9567 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Tue, 14 Nov 2017 10:38:41 +0100 Subject: [PATCH 6/8] Fix Bug#29291 * test/lisp/net/tramp-tests.el (tramp-test24-file-acl): Preserve permissions when copying. (Bug#29291) --- test/lisp/net/tramp-tests.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index a43ac739496..68236daf49b 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -2940,7 +2940,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (write-region "foo" nil tmp-name1) (should (file-exists-p tmp-name1)) (should (file-acl tmp-name1)) - (copy-file tmp-name1 tmp-name2) + (copy-file tmp-name1 tmp-name2 nil nil nil 'preserve-permissions) (should (file-acl tmp-name2)) (should (string-equal (file-acl tmp-name1) (file-acl tmp-name2))) ;; Different permissions mean different ACLs. @@ -2966,7 +2966,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (write-region "foo" nil tmp-name1) (should (file-exists-p tmp-name1)) (should (file-acl tmp-name1)) - (copy-file tmp-name1 tmp-name3) + (copy-file tmp-name1 tmp-name3 nil nil nil 'preserve-permissions) (should (file-acl tmp-name3)) (should (string-equal (file-acl tmp-name1) (file-acl tmp-name3))) ;; Different permissions mean different ACLs. @@ -2980,7 +2980,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." ;; Two files with same ACLs. (delete-file tmp-name1) - (copy-file tmp-name3 tmp-name1) + (copy-file tmp-name3 tmp-name1 nil nil nil 'preserve-permissions) (should (file-acl tmp-name1)) (should (string-equal (file-acl tmp-name1) (file-acl tmp-name3))) ;; Different permissions mean different ACLs. From 40d41dd4971a880b30b505e6f0da797048983954 Mon Sep 17 00:00:00 2001 From: Daniel Pittman Date: Tue, 14 Nov 2017 11:38:30 +0100 Subject: [PATCH 7/8] Fix Bug#28139 * tramp-sh.el: Set TERM and INSIDE_EMACS environment earlier. (tramp-remote-process-environment): Remove TERM and INSIDE_EMACS. (tramp-remote-process-environment): Document their special handling. (tramp-open-shell): Set TERM and INSIDE_EMACS prior to starting the initial remote shell, so that it is also aware of the environment in which it is operating. (Bug#28139) --- lisp/net/tramp-sh.el | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 52a6b8fac0b..acb5a12ba2a 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -533,9 +533,7 @@ the list by the special value `tramp-own-remote-path'." ;;;###tramp-autoload (defcustom tramp-remote-process-environment - `("ENV=''" "TMOUT=0" "LC_CTYPE=''" - ,(format "TERM=%s" tramp-terminal-type) - ,(format "INSIDE_EMACS='%s,tramp:%s'" emacs-version tramp-version) + '("ENV=''" "TMOUT=0" "LC_CTYPE=''" "CDPATH=" "HISTORY=" "MAIL=" "MAILCHECK=" "MAILPATH=" "PAGER=cat" "autocorrect=" "correct=") "List of environment variables to be set on the remote host. @@ -544,8 +542,15 @@ Each element should be a string of the form ENVVARNAME=VALUE. An entry ENVVARNAME= disables the corresponding environment variable, which might have been set in the init files like ~/.profile. -Special handling is applied to the PATH environment, which should -not be set here. Instead, it should be set via `tramp-remote-path'." +Special handling is applied to some environment variables, +which should not be set here: + +The PATH environment variable should be set via `tramp-remote-path'. + +The TERM environment variable should be set via `tramp-terminal-type'. + +The INSIDE_EMACS environment variable will automatically be set +based on the TRAMP and Emacs versions, and should not be set here." :group 'tramp :version "26.1" :type '(repeat string) @@ -3948,9 +3953,17 @@ file exists and nonzero exit status otherwise." ;; file clobbering $PS1. $PROMPT_COMMAND is another way to set ;; the prompt in /bin/bash, it must be discarded as well. ;; $HISTFILE is set according to `tramp-histfile-override'. + ;; $TERM and $INSIDE_EMACS set here to ensure they have the + ;; correct values when the shell starts, not just processes + ;; run within the shell. (Which processes include our + ;; initial probes to ensure the remote shell is usable.) (tramp-send-command vec (format - "exec env ENV=%s %s PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s" + (concat + "exec env TERM='%s' INSIDE_EMACS='%s,tramp:%s' " + "ENV=%s %s PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s") + tramp-terminal-type + emacs-version tramp-version ; INSIDE_EMACS (or (getenv-internal "ENV" tramp-remote-process-environment) "") (if (stringp tramp-histfile-override) (format "HISTFILE=%s" From 796c7f7a949c83d64ae37cadb9a0ca28a2f1823a Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Tue, 14 Nov 2017 18:36:12 +0100 Subject: [PATCH 8/8] ; Fix last fix of 'mouse-drag-and-drop-region' * lisp/mouse.el (mouse-drag-and-drop-region): Use 'car-safe' instead of 'car' to ignore 'select-window' events. Thanks to Stefan Monnier for spotting this. --- lisp/mouse.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/mouse.el b/lisp/mouse.el index 545a7ff2a02..17d1732e501 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -2382,7 +2382,7 @@ is copied instead of being cut." (setq event (read-event)) (or (mouse-movement-p event) ;; Handle `mouse-autoselect-window'. - (eq (car event) 'select-window))) + (eq (car-safe event) 'select-window))) (unless value-selection ; initialization (delete-overlay mouse-secondary-overlay) (setq value-selection (buffer-substring start end))