From cf3c19b0298236293d9c56d5ba425af4f42c1f8e Mon Sep 17 00:00:00 2001 From: Tino Calancha Date: Tue, 7 Jun 2016 20:35:24 -0400 Subject: * lisp/ibuffer.el (ibuffer): Improve 'other-window' case. (Bug#23617) (cherry picked from commit f4ef1a1fea15aa58fbb5e7a59bff260720658e49) --- lisp/ibuffer.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 9d23e64cd81..1295ed7a82d 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -2336,7 +2336,8 @@ FORMATS is the value to use for `ibuffer-formats'. (setq other-window-p t)) (let ((buf (get-buffer-create (or name "*Ibuffer*")))) (if other-window-p - (funcall (if noselect (lambda (buf) (display-buffer buf t)) #'pop-to-buffer) buf) + (or (and noselect (display-buffer buf t)) + (pop-to-buffer buf t)) (funcall (if noselect #'display-buffer #'switch-to-buffer) buf)) (with-current-buffer buf (save-selected-window -- cgit v1.2.1 From b0c447e4668116cecfda91d0203cb7cac2486d92 Mon Sep 17 00:00:00 2001 From: Tino Calancha Date: Tue, 7 Jun 2016 19:24:51 -0400 Subject: * lisp/ibuf-ext.el (ibuffer-do-shell-command-file): Fix non-file-visiting-buffer case. (Bug#22678) (cherry picked from commit 738738259ba77fe17e433c64e0758ea59ab5bc75) --- lisp/ibuf-ext.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el index f5375612c34..4443383cdf5 100644 --- a/lisp/ibuf-ext.el +++ b/lisp/ibuf-ext.el @@ -347,10 +347,14 @@ the mode if ARG is omitted or nil." :modifier-p nil) (shell-command (concat command " " (shell-quote-argument - (if buffer-file-name - buffer-file-name - (make-temp-file - (substring (buffer-name) 0 (min 10 (length (buffer-name)))))))))) + (or buffer-file-name + (let ((file + (make-temp-file + (substring + (buffer-name) 0 + (min 10 (length (buffer-name))))))) + (write-region nil nil file nil 0) + file)))))) ;;;###autoload (autoload 'ibuffer-do-eval "ibuf-ext") (define-ibuffer-op eval (form) -- cgit v1.2.1 From a4285bcb1114e29200001f33af9b4802167d6140 Mon Sep 17 00:00:00 2001 From: Tino Calancha Date: Tue, 7 Jun 2016 15:06:38 -0400 Subject: * lisp/simple.el (process-menu-mode, list-processes--refresh): Include PID. (Bug#21725) (cherry picked from commit b7adc2f23787eb72015cd705b873e229db6a5049) --- lisp/simple.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index c43fe548c82..67c02665ea1 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3749,6 +3749,7 @@ support pty association, if PROGRAM is nil." (define-derived-mode process-menu-mode tabulated-list-mode "Process Menu" "Major mode for listing the processes called by Emacs." (setq tabulated-list-format [("Process" 15 t) + ("PID" 7 t) ("Status" 7 t) ("Buffer" 15 t) ("TTY" 12 t) @@ -3775,6 +3776,7 @@ Also, delete any process that is exited or signaled." (process-query-on-exit-flag p)) (let* ((buf (process-buffer p)) (type (process-type p)) + (pid (if (process-id p) (format "%d" (process-id p)) "--")) (name (process-name p)) (status (symbol-name (process-status p))) (buf-label (if (buffer-live-p buf) @@ -3810,7 +3812,7 @@ Also, delete any process that is exited or signaled." (format " at %s b/s" speed) ""))))) (mapconcat 'identity (process-command p) " ")))) - (push (list p (vector name status buf-label tty cmd)) + (push (list p (vector name pid status buf-label tty cmd)) tabulated-list-entries)))))) (defun process-menu-visit-buffer (button) -- cgit v1.2.1 From 12da149670a40c6d6c1bc107e8c29d7fcdcf7824 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 17 Oct 2016 12:12:25 +0300 Subject: Update URL of MS-Windows optional DLLs * nt/README.W32: * nt/INSTALL: Update the URL of the MS-Windows binaries of the optional libraries built with MSYS2/MinGW64 project tools. --- nt/INSTALL | 16 ++++++++-------- nt/README.W32 | 13 +++++++------ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/nt/INSTALL b/nt/INSTALL index cd726cbecbb..7bf544cf6ea 100644 --- a/nt/INSTALL +++ b/nt/INSTALL @@ -634,12 +634,12 @@ build will run on Windows 9X and newer systems). To support XPM images (required for color tool-bar icons), you will need the libXpm library. It is available from the ezwinports site, http://sourceforge.net/projects/ezwinports/files/ and from - http://alpha.gnu.org/gnu/emacs/pretest/windows/. + http://ftp.gnu.org/gnu/emacs/windows/. For PNG images, we recommend to use versions 1.4.x and later of libpng, because previous versions had security issues. You can find precompiled libraries and headers on the ezwinports site and on - alpha.gnu. + ftp.gnu.org. Versions 1.4.0 and later of libpng are binary incompatible with earlier versions, so Emacs will only look for libpng libraries which @@ -657,7 +657,7 @@ build will run on Windows 9X and newer systems). giflib, as it is much enhanced wrt previous versions. You can find precompiled binaries and headers for giflib on the ezwinports site, http://sourceforge.net/projects/ezwinports/files/ and on - http://alpha.gnu.org/gnu/emacs/pretest/windows/. + http://ftp.gnu.org/gnu/emacs/windows/. Version 5.0.0 and later of giflib are binary incompatible with previous versions (the signatures of several functions have @@ -671,7 +671,7 @@ build will run on Windows 9X and newer systems). For JPEG images, you will need libjpeg 6b or later, which will be called libjpeg-N.dll, jpeg62.dll, libjpeg.dll, or jpeg.dll. You can - find these on the ezwinports site and on alpha.gnu. + find these on the ezwinports site and on ftp.gnu.org. TIFF images require libTIFF 3.0 or later, which will be called libtiffN.dll or libtiff-N.dll or libtiff.dll. These can be found on @@ -698,7 +698,7 @@ build will run on Windows 9X and newer systems). because the compiler needs to see their header files when building Emacs. - http://alpha.gnu.org/gnu/emacs/pretest/windows/ + http://ftp.gnu.org/gnu/emacs/windows/ More fat ports, from the MSYS2 project. @@ -759,7 +759,7 @@ build will run on Windows 9X and newer systems). You can get pre-built binaries (including any required DLL and the header files) at http://sourceforge.net/projects/ezwinports/files/ - and on http://alpha.gnu.org/gnu/emacs/pretest/windows/. + and on http://ftp.gnu.org/gnu/emacs/windows/. * Optional libxml2 support @@ -781,7 +781,7 @@ build will run on Windows 9X and newer systems). (including any required DLL and the header files) is here: http://sourceforge.net/projects/ezwinports/files/ - http://alpha.gnu.org/gnu/emacs/pretest/windows/ + http://ftp.gnu.org/gnu/emacs/windows/ For runtime support of libxml2, you will also need to install the libiconv "development" tarball, because the libiconv headers need to @@ -797,7 +797,7 @@ build will run on Windows 9X and newer systems). Emacs can decompress text if compiled with the zlib library. Prebuilt binaries of zlib DLL (for 32-bit builds of Emacs) are - available from the ezwinports site and on alpha.gnu; see above for + available from the ezwinports site and on ftp.gnu.org; see above for the URLs. (This library is also a prerequisite for several image libraries, so diff --git a/nt/README.W32 b/nt/README.W32 index e3f6094f9be..5bd87962650 100644 --- a/nt/README.W32 +++ b/nt/README.W32 @@ -140,8 +140,10 @@ See the end of the file for license conditions. 1. http://sourceforge.net/projects/ezwinports/files/ -- up-to-date builds, self-contained archives, only for 32-bit Emacs - 2. Libraries from the MSYS2 project on alpha.gnu.org: - http://alpha.gnu.org/gnu/emacs/pretest/windows/. + 2. Libraries from the MSYS2 project on ftp.gnu.org: + http://ftp.gnu.org/gnu/emacs/windows/emacs-NN-i686-deps.zip (32-bit) + http://ftp.gnu.org/gnu/emacs/windows/emacs-NN-x86_64-deps.zip (64-bit) + where NN is the Emacs version to which the libraries correspond. 3. The MSYS2 project -- for 64-bit Emacs: http://msys2.github.io/ https://sourceforge.net/projects/msys2/files/REPOS/MINGW/x86_64/ @@ -200,7 +202,7 @@ See the end of the file for license conditions. You can get pre-built binaries (including any dependency DLLs) at http://sourceforge.net/projects/ezwinports/files/ and on - http://alpha.gnu.org/gnu/emacs/pretest/windows/. + http://ftp.gnu.org/gnu/emacs/windows/ * libxml2 support @@ -214,8 +216,7 @@ See the end of the file for license conditions. You can get pre-built binaries (including any required DLL and the header files) at http://sourceforge.net/projects/ezwinports/files/ and - http://alpha.gnu.org/gnu/emacs/pretest/windows/. - + http://ftp.gnu.org/gnu/emacs/windows/ * zlib support @@ -223,7 +224,7 @@ See the end of the file for license conditions. the zlib-decompress-region primitive. Prebuilt binaries of zlib DLL (for 32-bit builds of Emacs) are - available from the ezwinports site and on alpha.gnu; see above for + available from the ezwinports site and on ftp.gnu.org; see above for the URLs. For the 64-bit DLL, see the instructions below for installing from MSYS2 site. -- cgit v1.2.1 From e535ca4522222e68c9405a51c2abba83f9f2cd69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6ktu=C4=9F=20Kayaalp?= Date: Tue, 18 Oct 2016 03:01:58 +0300 Subject: Fix display of vc-dir CVS file statuses in subdirectories * lisp/vc/vc-cvs.el (vc-cvs-dir-status-files): Use 'cvs update' instead of 'cvs status'. It's faster, easier to parse, and relieves us of the need to use vc-expand-dirs. (Bug#24082) (vc-cvs-after-dir-status): Parse its output. --- lisp/vc/vc-cvs.el | 137 ++++++++++++------------------------------------------ 1 file changed, 31 insertions(+), 106 deletions(-) diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index a2499a2294b..3cfe8ee56a2 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el @@ -938,103 +938,32 @@ state." (t 'edited)))))))) (defun vc-cvs-after-dir-status (update-function) - ;; Heavily inspired by vc-cvs-parse-status. AKA a quick hack. - ;; This needs a lot of testing. - (let ((status nil) - (status-str nil) - (file nil) - (result nil) - (missing nil) - (ignore-next nil) - (subdir default-directory)) + (let ((result nil) + (translation '((?? . unregistered) + (?A . added) + (?C . conflict) + (?M . edited) + (?P . needs-merge) + (?R . removed) + (?U . needs-update)))) (goto-char (point-min)) - (while - ;; Look for either a file entry, an unregistered file, or a - ;; directory change. - (re-search-forward - "\\(^=+\n\\([^=c?\n].*\n\\|\n\\)+\\)\\|\\(\\(^?? .*\n\\)+\\)\\|\\(^cvs status: \\(Examining\\|nothing\\) .*\n\\)" - nil t) - ;; FIXME: get rid of narrowing here. - (narrow-to-region (match-beginning 0) (match-end 0)) - (goto-char (point-min)) - ;; The subdir - (when (looking-at "cvs status: Examining \\(.+\\)") - (setq subdir (expand-file-name (match-string 1)))) - ;; Unregistered files - (while (looking-at "? \\(.*\\)") - (setq file (file-relative-name - (expand-file-name (match-string 1) subdir))) - (push (list file 'unregistered) result) - (forward-line 1)) - (when (looking-at "cvs status: nothing known about") - ;; We asked about a non existent file. The output looks like this: - - ;; cvs status: nothing known about `lisp/v.diff' - ;; =================================================================== - ;; File: no file v.diff Status: Unknown - ;; - ;; Working revision: No entry for v.diff - ;; Repository revision: No revision control file - ;; - - ;; Due to narrowing in this iteration we only see the "cvs - ;; status:" line, so just set a flag so that we can ignore the - ;; file in the next iteration. - (setq ignore-next t)) - ;; A file entry. - (when (re-search-forward "^File: \\(no file \\)?\\(.*[^ \t]\\)[ \t]+Status: \\(.*\\)" nil t) - (setq missing (match-string 1)) - (setq file (file-relative-name - (expand-file-name (match-string 2) subdir))) - (setq status-str (match-string 3)) - (setq status - (cond - ((string-match "Up-to-date" status-str) 'up-to-date) - ((string-match "Locally Modified" status-str) 'edited) - ((string-match "Needs Merge" status-str) 'needs-merge) - ((string-match "Needs \\(Checkout\\|Patch\\)" status-str) - (if missing 'missing 'needs-update)) - ((string-match "Locally Added" status-str) 'added) - ((string-match "Locally Removed" status-str) 'removed) - ((string-match "File had conflicts " status-str) 'conflict) - ((string-match "Unknown" status-str) 'unregistered) - (t 'edited))) - (if ignore-next - (setq ignore-next nil) - (unless (eq status 'up-to-date) - (push (list file status) result)))) - (goto-char (point-max)) - (widen)) - (funcall update-function result)) - ;; Alternative implementation: use the "update" command instead of - ;; the "status" command. - ;; (let ((result nil) - ;; (translation '((?? . unregistered) - ;; (?A . added) - ;; (?C . conflict) - ;; (?M . edited) - ;; (?P . needs-merge) - ;; (?R . removed) - ;; (?U . needs-update)))) - ;; (goto-char (point-min)) - ;; (while (not (eobp)) - ;; (if (looking-at "^[ACMPRU?] \\(.*\\)$") - ;; (push (list (match-string 1) - ;; (cdr (assoc (char-after) translation))) - ;; result) - ;; (cond - ;; ((looking-at "cvs update: warning: \\(.*\\) was lost") - ;; ;; Format is: - ;; ;; cvs update: warning: FILENAME was lost - ;; ;; U FILENAME - ;; (push (list (match-string 1) 'missing) result) - ;; ;; Skip the "U" line - ;; (forward-line 1)) - ;; ((looking-at "cvs update: New directory `\\(.*\\)' -- ignored") - ;; (push (list (match-string 1) 'unregistered) result)))) - ;; (forward-line 1)) - ;; (funcall update-function result))) - ) + (while (not (eobp)) + (if (looking-at "^[ACMPRU?] \\(.*\\)$") + (push (list (match-string 1) + (cdr (assoc (char-after) translation))) + result) + (cond + ((looking-at "cvs update: warning: \\(.*\\) was lost") + ;; Format is: + ;; cvs update: warning: FILENAME was lost + ;; U FILENAME + (push (list (match-string 1) 'missing) result) + ;; Skip the "U" line + (forward-line 1)) + ((looking-at "cvs update: New directory `\\(.*\\)' -- ignored") + (push (list (match-string 1) 'unregistered) result)))) + (forward-line 1)) + (funcall update-function result))) ;; Based on vc-cvs-dir-state-heuristic from Emacs 22. ;; FIXME does not mention unregistered files. @@ -1071,16 +1000,12 @@ state." Query all files in DIR if files is nil." (let ((local (vc-cvs-stay-local-p dir))) (if (and (not files) local (not (eq local 'only-file))) - (vc-cvs-dir-status-heuristic dir update-function) - (if (not files) (setq files (vc-expand-dirs (list dir) 'CVS))) - (vc-cvs-command (current-buffer) 'async files "-f" "status") - ;; Alternative implementation: use the "update" command instead of - ;; the "status" command. - ;; (vc-cvs-command (current-buffer) 'async - ;; (file-relative-name dir) - ;; "-f" "-n" "update" "-d" "-P") - (vc-run-delayed - (vc-cvs-after-dir-status update-function))))) + (vc-cvs-dir-status-heuristic dir update-function)) + (vc-cvs-command (current-buffer) 'async + files + "-f" "-n" "-q" "update") + (vc-run-delayed + (vc-cvs-after-dir-status update-function)))) (defun vc-cvs-file-to-string (file) "Read the content of FILE and return it as a string." -- cgit v1.2.1 From baa8ba4ed471d7fe4bb07c80a9dd16c4712525b4 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 18 Oct 2016 09:24:05 +0300 Subject: * lisp/subr.el (start-process): Doc fix. (Bug#24693) --- lisp/subr.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/subr.el b/lisp/subr.el index a3aef2e4a5c..573f238f743 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1966,7 +1966,7 @@ this process is not associated with any buffer. PROGRAM is the program file name. It is searched for in `exec-path' \(which see). If nil, just associate a pty with the buffer. Remaining -arguments are strings to give program as arguments. +arguments PROGRAM-ARGS are strings to give program as arguments. If you want to separate standard output from standard error, use `make-process' or invoke the command through a shell and redirect -- cgit v1.2.1 From 9a758b4ccc9543ce0e74b4d71e5cd3a1443583e1 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Tue, 18 Oct 2016 20:41:19 +0200 Subject: Fix Bug#24698 * lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell): Don't send "stty tab0" to *BSD and Darwin machines. (Bug#24698) --- lisp/net/tramp-sh.el | 267 +++++++++++++++++++++++++-------------------------- 1 file changed, 131 insertions(+), 136 deletions(-) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 85712cc9d8a..166bc881676 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -4186,10 +4186,10 @@ process to set up. VEC specifies the connection." (case-fold-search t)) (tramp-open-shell vec (tramp-get-method-parameter vec 'tramp-remote-shell)) - ;; Disable tab and echo expansion. + ;; Disable echo expansion. (tramp-message vec 5 "Setting up remote shell environment") (tramp-send-command - vec "stty tab0 -inlcr -onlcr -echo kill '^U' erase '^H'" t) + vec "stty -inlcr -onlcr -echo kill '^U' erase '^H'" t) ;; Check whether the echo has really been disabled. Some ;; implementations, like busybox of embedded GNU/Linux, don't ;; support disabling. @@ -4206,7 +4206,8 @@ process to set up. VEC specifies the connection." (tramp-message vec 5 "Setting shell prompt") (tramp-send-command vec (format "PS1=%s PS2='' PS3='' PROMPT_COMMAND=''" - (tramp-shell-quote-argument tramp-end-of-output)) t) + (tramp-shell-quote-argument tramp-end-of-output)) + t) ;; Check whether the output of "uname -sr" has been changed. If ;; yes, this is a strong indication that we must expire all @@ -4214,148 +4215,142 @@ process to set up. VEC specifies the connection." ;; `tramp-maybe-open-connection', it will be caught there. (tramp-message vec 5 "Checking system information") (let ((old-uname (tramp-get-connection-property vec "uname" nil)) - (new-uname + (uname (tramp-set-connection-property vec "uname" (tramp-send-command-and-read vec "echo \\\"`uname -sr`\\\"")))) - (when (and (stringp old-uname) (not (string-equal old-uname new-uname))) + (when (and (stringp old-uname) (not (string-equal old-uname uname))) (tramp-message vec 3 "Connection reset, because remote host changed from `%s' to `%s'" - old-uname new-uname) + old-uname uname) ;; We want to keep the password. (tramp-cleanup-connection vec t t) - (throw 'uname-changed (tramp-maybe-open-connection vec)))) + (throw 'uname-changed (tramp-maybe-open-connection vec))) - ;; Try to set up the coding system correctly. - ;; CCC this can't be the right way to do it. Hm. - (tramp-message vec 5 "Determining coding system") - (with-current-buffer (process-buffer proc) - (if (featurep 'mule) - ;; Use MULE to select the right EOL convention for communicating - ;; with the process. - (let ((cs (or (and (memq 'utf-8 (coding-system-list)) - (string-match "utf-?8" (tramp-get-remote-locale vec)) - (cons 'utf-8 'utf-8)) - (tramp-compat-funcall 'process-coding-system proc) - (cons 'undecided 'undecided))) - cs-decode cs-encode) - (when (symbolp cs) (setq cs (cons cs cs))) - (setq cs-decode (or (car cs) 'undecided) - cs-encode (or (cdr cs) 'undecided)) - (setq cs-encode - (tramp-compat-coding-system-change-eol-conversion - cs-encode - (if (string-match - "^Darwin" (tramp-get-connection-property vec "uname" "")) - 'mac 'unix))) - (tramp-send-command vec "echo foo ; echo bar" t) - (goto-char (point-min)) - (when (search-forward "\r" nil t) - (setq cs-decode (tramp-compat-coding-system-change-eol-conversion - cs-decode 'dos))) - ;; Special setting for Mac OS X. - (when (and (string-match - "^Darwin" (tramp-get-connection-property vec "uname" "")) - (memq 'utf-8-hfs (coding-system-list))) - (setq cs-decode 'utf-8-hfs - cs-encode 'utf-8-hfs)) - (tramp-compat-funcall - 'set-buffer-process-coding-system cs-decode cs-encode) - (tramp-message - vec 5 "Setting coding system to `%s' and `%s'" cs-decode cs-encode)) - ;; Look for ^M and do something useful if found. - (when (search-forward "\r" nil t) - ;; We have found a ^M but cannot frob the process coding system - ;; because we're running on a non-MULE Emacs. Let's try - ;; stty, instead. - (tramp-send-command vec "stty -onlcr" t)))) - - (tramp-send-command vec "set +o vi +o emacs" t) - - ;; Check whether the remote host suffers from buggy - ;; `send-process-string'. This is known for FreeBSD (see comment in - ;; `send_process', file process.c). I've tested sending 624 bytes - ;; successfully, sending 625 bytes failed. Emacs makes a hack when - ;; this host type is detected locally. It cannot handle remote - ;; hosts, though. - (with-tramp-connection-property proc "chunksize" - (cond - ((and (integerp tramp-chunksize) (> tramp-chunksize 0)) - tramp-chunksize) - (t - (tramp-message - vec 5 "Checking remote host type for `send-process-string' bug") - (if (string-match - "^FreeBSD" (tramp-get-connection-property vec "uname" "")) - 500 0)))) - - ;; Set remote PATH variable. - (tramp-set-remote-path vec) - - ;; Search for a good shell before searching for a command which - ;; checks if a file exists. This is done because Tramp wants to use - ;; "test foo; echo $?" to check if various conditions hold, and - ;; there are buggy /bin/sh implementations which don't execute the - ;; "echo $?" part if the "test" part has an error. In particular, - ;; the OpenSolaris /bin/sh is a problem. There are also other - ;; problems with /bin/sh of OpenSolaris, like redirection of stderr - ;; in function declarations, or changing HISTFILE in place. - ;; Therefore, OpenSolaris' /bin/sh is replaced by bash, when - ;; detected. - (tramp-find-shell vec) - - ;; Disable unexpected output. - (tramp-send-command vec "mesg n 2>/dev/null; biff n 2>/dev/null" t) - - ;; IRIX64 bash expands "!" even when in single quotes. This - ;; destroys our shell functions, we must disable it. See - ;; . - (when (string-match "^IRIX64" (tramp-get-connection-property vec "uname" "")) - (tramp-send-command vec "set +H" t)) - - ;; On BSD-like systems, ?\t is expanded to spaces. Suppress this. - (when (string-match "BSD\\|Darwin" - (tramp-get-connection-property vec "uname" "")) - (tramp-send-command vec "stty -oxtabs" t)) - - ;; Set utf8 encoding. Needed for Mac OS X, for example. This is - ;; non-POSIX, so we must expect errors on some systems. - (tramp-send-command vec "stty iutf8 2>/dev/null" t) - - ;; Set `remote-tty' process property. - (let ((tty (tramp-send-command-and-read vec "echo \\\"`tty`\\\"" 'noerror))) - (unless (zerop (length tty)) - (tramp-compat-process-put proc 'remote-tty tty))) - - ;; Dump stty settings in the traces. - (when (>= tramp-verbose 9) - (tramp-send-command vec "stty -a" t)) - - ;; Set the environment. - (tramp-message vec 5 "Setting default environment") - - (let ((env (append `(,(tramp-get-remote-locale vec)) - (copy-sequence tramp-remote-process-environment))) - unset vars item) - (while env - (setq item (tramp-compat-split-string (car env) "=")) - (setcdr item (mapconcat 'identity (cdr item) "=")) - (if (and (stringp (cdr item)) (not (string-equal (cdr item) ""))) - (push (format "%s %s" (car item) (cdr item)) vars) - (push (car item) unset)) - (setq env (cdr env))) - (when vars - (tramp-send-command - vec - (format "while read var val; do export $var=$val; done <<'%s'\n%s\n%s" - tramp-end-of-heredoc - (mapconcat 'identity vars "\n") - tramp-end-of-heredoc) - t)) - (when unset - (tramp-send-command - vec (format "unset %s" (mapconcat 'identity unset " ")) t)))) + ;; Try to set up the coding system correctly. + ;; CCC this can't be the right way to do it. Hm. + (tramp-message vec 5 "Determining coding system") + (with-current-buffer (process-buffer proc) + (if (featurep 'mule) + ;; Use MULE to select the right EOL convention for + ;; communicating with the process. + (let ((cs (or (and (memq 'utf-8 (coding-system-list)) + (string-match "utf-?8" (tramp-get-remote-locale vec)) + (cons 'utf-8 'utf-8)) + (tramp-compat-funcall 'process-coding-system proc) + (cons 'undecided 'undecided))) + cs-decode cs-encode) + (when (symbolp cs) (setq cs (cons cs cs))) + (setq cs-decode (or (car cs) 'undecided) + cs-encode (or (cdr cs) 'undecided)) + (setq cs-encode + (tramp-compat-coding-system-change-eol-conversion + cs-encode (if (string-match "^Darwin" uname) 'mac 'unix))) + (tramp-send-command vec "echo foo ; echo bar" t) + (goto-char (point-min)) + (when (search-forward "\r" nil t) + (setq cs-decode (tramp-compat-coding-system-change-eol-conversion + cs-decode 'dos))) + ;; Special setting for Mac OS X. + (when (and (string-match "^Darwin" uname) + (memq 'utf-8-hfs (coding-system-list))) + (setq cs-decode 'utf-8-hfs + cs-encode 'utf-8-hfs)) + (tramp-compat-funcall + 'set-buffer-process-coding-system cs-decode cs-encode) + (tramp-message + vec 5 "Setting coding system to `%s' and `%s'" cs-decode cs-encode)) + ;; Look for ^M and do something useful if found. + (when (search-forward "\r" nil t) + ;; We have found a ^M but cannot frob the process coding + ;; system because we're running on a non-MULE Emacs. Let's + ;; try stty, instead. + (tramp-send-command vec "stty -onlcr" t)))) + + (tramp-send-command vec "set +o vi +o emacs" t) + + ;; Check whether the remote host suffers from buggy + ;; `send-process-string'. This is known for FreeBSD (see comment + ;; in `send_process', file process.c). I've tested sending 624 + ;; bytes successfully, sending 625 bytes failed. Emacs makes a + ;; hack when this host type is detected locally. It cannot handle + ;; remote hosts, though. + (with-tramp-connection-property proc "chunksize" + (cond + ((and (integerp tramp-chunksize) (> tramp-chunksize 0)) + tramp-chunksize) + (t + (tramp-message + vec 5 "Checking remote host type for `send-process-string' bug") + (if (string-match "^FreeBSD" uname) 500 0)))) + + ;; Set remote PATH variable. + (tramp-set-remote-path vec) + + ;; Search for a good shell before searching for a command which + ;; checks if a file exists. This is done because Tramp wants to + ;; use "test foo; echo $?" to check if various conditions hold, + ;; and there are buggy /bin/sh implementations which don't execute + ;; the "echo $?" part if the "test" part has an error. In + ;; particular, the OpenSolaris /bin/sh is a problem. There are + ;; also other problems with /bin/sh of OpenSolaris, like + ;; redirection of stderr in function declarations, or changing + ;; HISTFILE in place. Therefore, OpenSolaris' /bin/sh is replaced + ;; by bash, when detected. + (tramp-find-shell vec) + + ;; Disable unexpected output. + (tramp-send-command vec "mesg n 2>/dev/null; biff n 2>/dev/null" t) + + ;; IRIX64 bash expands "!" even when in single quotes. This + ;; destroys our shell functions, we must disable it. See + ;; . + (when (string-match "^IRIX64" uname) + (tramp-send-command vec "set +H" t)) + + ;; Disable tab expansion. + (if (string-match "BSD\\|Darwin" uname) + (tramp-send-command vec "stty tabs" t) + (tramp-send-command vec "stty tab0" t)) + + ;; Set utf8 encoding. Needed for Mac OS X, for example. This is + ;; non-POSIX, so we must expect errors on some systems. + (tramp-send-command vec "stty iutf8 2>/dev/null" t) + + ;; Set `remote-tty' process property. + (let ((tty (tramp-send-command-and-read vec "echo \\\"`tty`\\\"" 'noerror))) + (unless (zerop (length tty)) + (tramp-compat-process-put proc 'remote-tty tty))) + + ;; Dump stty settings in the traces. + (when (>= tramp-verbose 9) + (tramp-send-command vec "stty -a" t)) + + ;; Set the environment. + (tramp-message vec 5 "Setting default environment") + + (let ((env (append `(,(tramp-get-remote-locale vec)) + (copy-sequence tramp-remote-process-environment))) + unset vars item) + (while env + (setq item (tramp-compat-split-string (car env) "=")) + (setcdr item (mapconcat 'identity (cdr item) "=")) + (if (and (stringp (cdr item)) (not (string-equal (cdr item) ""))) + (push (format "%s %s" (car item) (cdr item)) vars) + (push (car item) unset)) + (setq env (cdr env))) + (when vars + (tramp-send-command + vec + (format "while read var val; do export $var=$val; done <<'%s'\n%s\n%s" + tramp-end-of-heredoc + (mapconcat 'identity vars "\n") + tramp-end-of-heredoc) + t)) + (when unset + (tramp-send-command + vec (format "unset %s" (mapconcat 'identity unset " ")) t))))) ;; Old text from documentation of tramp-methods: ;; Using a uuencode/uudecode inline method is discouraged, please use one -- cgit v1.2.1 From b2f32e4c9a06234019f07f448b53b76e62aebbba Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 19 Oct 2016 10:42:45 +0300 Subject: Don't scan compiled module files for autoloads * lisp/emacs-lisp/autoload.el (update-directory-autoloads): Ignore compiled module files. Make sure the extension really ends the file name. --- lisp/emacs-lisp/autoload.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index eb6b746bd80..d4b9479b752 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -766,7 +766,13 @@ write its autoloads into the specified file instead." (interactive "DUpdate autoloads from directory: ") (let* ((files-re (let ((tmp nil)) (dolist (suf (get-load-suffixes)) - (unless (string-match "\\.elc" suf) (push suf tmp))) + ;; We don't use module-file-suffix below because + ;; we don't want to depend on whether Emacs was + ;; built with or without modules support, nor + ;; what is the suffix for the underlying OS. + (unless (string-match "\\.\\(elc\\|\\so\\|dll\\)\\'" + suf) + (push suf tmp))) (concat "^[^=.].*" (regexp-opt tmp t) "\\'"))) (files (apply 'nconc (mapcar (lambda (dir) -- cgit v1.2.1 From 62f268414c1a04235b34befe3ad103cecec72382 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 19 Oct 2016 10:59:05 +0300 Subject: * lisp/emacs-lisp/autoload.el (update-directory-autoloads): Fix last change. --- lisp/emacs-lisp/autoload.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index d4b9479b752..883a38a4884 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -770,8 +770,7 @@ write its autoloads into the specified file instead." ;; we don't want to depend on whether Emacs was ;; built with or without modules support, nor ;; what is the suffix for the underlying OS. - (unless (string-match "\\.\\(elc\\|\\so\\|dll\\)\\'" - suf) + (unless (string-match "\\.\\(elc\\|\\so\\|dll\\)" suf) (push suf tmp))) (concat "^[^=.].*" (regexp-opt tmp t) "\\'"))) (files (apply 'nconc -- cgit v1.2.1 From 6b9dee1ae6bc8717ccabad5d5f9bb33ebad4c69f Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Wed, 19 Oct 2016 10:35:52 +0200 Subject: Change Tramp version to "2.2.13.25.2" * doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.2.13.25.2". --- doc/misc/trampver.texi | 2 +- lisp/net/trampver.el | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi index 0cdf08daee1..b12614bae53 100644 --- a/doc/misc/trampver.texi +++ b/doc/misc/trampver.texi @@ -8,7 +8,7 @@ @c In the Tramp GIT, the version number is auto-frobbed from @c configure.ac, so you should edit that file and run @c "autoconf && ./configure" to change the version number. -@set trampver 2.2.13.25.1 +@set trampver 2.2.13.25.2 @c Other flags from configuration @set instprefix /usr/local diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index fc65c0a1081..25e8b22d327 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el @@ -6,7 +6,7 @@ ;; Author: Kai Großjohann ;; Keywords: comm, processes ;; Package: tramp -;; Version: 2.2.13.25.1 +;; Version: 2.2.13.25.2 ;; This file is part of GNU Emacs. @@ -32,7 +32,7 @@ ;; should be changed only there. ;;;###tramp-autoload -(defconst tramp-version "2.2.13.25.1" +(defconst tramp-version "2.2.13.25.2" "This version of Tramp.") ;;;###tramp-autoload @@ -63,7 +63,7 @@ (= emacs-major-version 21) (>= emacs-minor-version 4))) "ok" - (format "Tramp 2.2.13.25.1 is not fit for %s" + (format "Tramp 2.2.13.25.2 is not fit for %s" (when (string-match "^.*$" (emacs-version)) (match-string 0 (emacs-version))))))) (unless (string-match "\\`ok\\'" x) (error "%s" x))) -- cgit v1.2.1 From 8ad0d7da0a84750e1884a89a212963f81ae26816 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Wed, 19 Oct 2016 10:49:13 +0200 Subject: ; Fix quoting in etc/NEWS --- etc/NEWS | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 3e686f98db3..5b89639440d 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -20,13 +20,13 @@ with a prefix argument or by typing C-u C-h C-n. This is a bug-fix release with (almost) no new features. --- -** `find-library', `help-function-def' and `help-variable-def' now run -`find-function-after-hook'. +** 'find-library', 'help-function-def' and 'help-variable-def' now run +'find-function-after-hook'. +++ ** New basic face 'fixed-pitch-serif', for a fixed-width font with serifs. -The Info-quoted and tex-verbatim faces now default to inheriting from -it. +The 'Info-quoted' and 'tex-verbatim' faces now default to inheriting +from it. --- ** New variable 'use-default-font-for-symbols' for backward compatibility. -- cgit v1.2.1