commit 457b02440510a594e3ff6f17cc6846a3a467a6a1 (HEAD, refs/remotes/origin/master) Author: Michael Albinus Date: Mon May 27 09:21:37 2019 +0200 Another attempt to fix Bug#35769 * lisp/net/tramp.el (tramp-call-process, tramp-call-process-region) (tramp-process-lines): Suppress `process-environment' entries dedicated for remote processes. (Bug#35769) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 48152444a6..a2558184fb 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -4637,6 +4637,7 @@ It always returns a return code. The Lisp error raised when PROGRAM is nil is trapped also, returning 1. Furthermore, traces are written with verbosity of 6." (let ((default-directory (tramp-compat-temporary-file-directory)) + (process-environment (default-toplevel-value 'process-environment)) (destination (if (eq destination t) (current-buffer) destination)) (vec (or vec (car tramp-current-connection))) output error result) @@ -4670,6 +4671,7 @@ It always returns a return code. The Lisp error raised when PROGRAM is nil is trapped also, returning 1. Furthermore, traces are written with verbosity of 6." (let ((default-directory (tramp-compat-temporary-file-directory)) + (process-environment (default-toplevel-value 'process-environment)) (buffer (if (eq buffer t) (current-buffer) buffer)) result) (tramp-message @@ -4699,6 +4701,7 @@ are written with verbosity of 6." If an error occurs, it returns nil. Traces are written with verbosity of 6." (let ((default-directory (tramp-compat-temporary-file-directory)) + (process-environment (default-toplevel-value 'process-environment)) (vec (or vec (car tramp-current-connection))) result) (if args commit dc9f8c1c63fd7fb2c39c9263424fe7fc9dca66ae Author: Noam Postavsky Date: Sun May 26 21:55:00 2019 -0400 ; Fix read-multiple-choice test * test/lisp/emacs-lisp/rmc-tests.el (test-read-multiple-choice): Rebind read-event, read-multiple-choice uses that since 2019-05-26 "Avoid infloop in read-multiple-choice (Bug#32257)". diff --git a/test/lisp/emacs-lisp/rmc-tests.el b/test/lisp/emacs-lisp/rmc-tests.el index b20bfd4e0c..71c7835e20 100644 --- a/test/lisp/emacs-lisp/rmc-tests.el +++ b/test/lisp/emacs-lisp/rmc-tests.el @@ -31,7 +31,7 @@ (ert-deftest test-read-multiple-choice () (dolist (char '(?y ?n)) - (cl-letf* (((symbol-function #'read-char) (lambda () char)) + (cl-letf* (((symbol-function #'read-event) (lambda () char)) (str (if (eq char ?y) "yes" "no"))) (should (equal (list char str) (read-multiple-choice "Do it? " '((?y "yes") (?n "no")))))))) commit 9d5906d9d21da4b85a3a9316ebd693daaa5bec38 Author: Simen Heggestøyl Date: Sun May 26 21:37:05 2019 +0200 Add a menu bar menu for CSS mode * lisp/textmodes/css-mode.el (css-mode-map): Add menu bar menu. diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index 11a77b5bb7..ae7b8eacd1 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el @@ -845,6 +845,18 @@ cannot be completed sensibly: `custom-ident', (let ((map (make-sparse-keymap))) (define-key map [remap info-lookup-symbol] 'css-lookup-symbol) (define-key map "\C-c\C-f" 'css-cycle-color-format) + (easy-menu-define css-menu map "CSS mode menu" + '("CSS" + :help "CSS-specific features" + ["Reformat block" fill-paragraph + :help "Reformat declaration block or fill comment at point"] + ["Cycle color format" css-cycle-color-format + :help "Cycle color at point between different formats"] + "-" + ["Describe symbol" css-lookup-symbol + :help "Display documentation for a CSS symbol"] + ["Complete symbol" complete-symbol + :help "Complete symbol before point"])) map) "Keymap used in `css-mode'.") commit 3e8aad77b10767c76ffdc56875e470b551e3fa56 Author: Michael Albinus Date: Sun May 26 21:37:34 2019 +0200 * lisp/net/tramp-sh.el (tramp-maybe-open-connection): Revert fix for Bug#35769 diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 11b1af8116..2d27baf454 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -4769,8 +4769,8 @@ Does not do anything if a connection is already open, but re-opens the connection if a previous connection has died for some reason." (let ((p (tramp-get-connection-process vec)) (process-name (tramp-get-connection-property vec "process-name" nil)) - (pos (with-current-buffer (tramp-get-connection-buffer vec) (point))) - tmp-process-environment) + (process-environment (copy-sequence process-environment)) + (pos (with-current-buffer (tramp-get-connection-buffer vec) (point)))) ;; If Tramp opens the same connection within a short time frame, ;; there is a problem. We shall signal this. @@ -4835,22 +4835,17 @@ connection if a previous connection has died for some reason." ;; Start new process. (when (and p (processp p)) (delete-process p)) - ;; Use a temporary `process-environment', in order not - ;; to penetrate local processes. - (let ((process-environment (copy-sequence process-environment))) - (setenv "TERM" tramp-terminal-type) - (setenv "LC_ALL" (tramp-get-local-locale vec)) - (if (stringp tramp-histfile-override) - (setenv "HISTFILE" tramp-histfile-override) - (if tramp-histfile-override - (progn - (setenv "HISTFILE") - (setenv "HISTFILESIZE" "0") - (setenv "HISTSIZE" "0")))) - (setenv "PROMPT_COMMAND") - (setenv "PS1" tramp-initial-end-of-output) - (setq tmp-process-environment - (copy-sequence process-environment))) + (setenv "TERM" tramp-terminal-type) + (setenv "LC_ALL" (tramp-get-local-locale vec)) + (if (stringp tramp-histfile-override) + (setenv "HISTFILE" tramp-histfile-override) + (if tramp-histfile-override + (progn + (setenv "HISTFILE") + (setenv "HISTFILESIZE" "0") + (setenv "HISTSIZE" "0")))) + (setenv "PROMPT_COMMAND") + (setenv "PS1" tramp-initial-end-of-output) (unless (stringp tramp-encoding-shell) (tramp-error vec 'file-error "`tramp-encoding-shell' not set")) (let* ((current-host (system-name)) @@ -4867,8 +4862,7 @@ connection if a previous connection has died for some reason." ;; This must be done in order to avoid our file ;; name handler. (p (let ((default-directory - (tramp-compat-temporary-file-directory)) - (process-environment tmp-process-environment)) + (tramp-compat-temporary-file-directory))) (apply #'start-process (tramp-get-connection-name vec) commit e06a4f0fa0a08175131604e431c65b4129b0e0dd Author: Eli Zaretskii Date: Sun May 26 19:32:46 2019 +0300 ; * INSTALL.REPO: Start by telling how to clone the repository. diff --git a/INSTALL.REPO b/INSTALL.REPO index b7433856c6..48faa81fbb 100644 --- a/INSTALL.REPO +++ b/INSTALL.REPO @@ -1,8 +1,15 @@ Building and Installing Emacs from the Repository -Simply run 'make'. This should work if your files are freshly checked -out from the repository, and if you have the proper tools installed. -If it doesn't work, or if you have special build requirements, the +The Emacs repository is hosted on Savannah. The following Git command +will clone the repository to the 'emacs' subdirectory of the current +directory on your local machine: + + git clone git://git.sv.gnu.org/emacs.git + +To build the repository code, simply run 'make' in the 'emacs' +directory. This should work if your files are freshly checked out +from the repository, and if you have the proper tools installed. If +it doesn't work, or if you have special build requirements, the following information may be helpful. Building Emacs from the source-code repository requires some tools commit 3f03f6284a093d69086773226bc2273cf62f5e85 Author: Noam Postavsky Date: Tue May 21 20:38:00 2019 -0400 Avoid infloop in read-multiple-choice (Bug#32257) * lisp/emacs-lisp/rmc.el (read-multiple-choice): Use `read-event' which won't get stuck (return the same event over and over again) for non-character events, unlike `read-char'. diff --git a/lisp/emacs-lisp/rmc.el b/lisp/emacs-lisp/rmc.el index 6d1adae974..47f3b8dc9c 100644 --- a/lisp/emacs-lisp/rmc.el +++ b/lisp/emacs-lisp/rmc.el @@ -118,7 +118,7 @@ Usage example: choices))) (condition-case nil (let ((cursor-in-echo-area t)) - (read-char)) + (read-event)) (error nil)))) (setq answer (lookup-key query-replace-map (vector tchar) t)) (setq tchar commit 9fe3bdf25d63f441e973cdcf88de0b26b53a54a3 Author: Basil L. Contovounesios Date: Sun May 26 11:23:03 2019 +0100 Tweak recent additions in tabify-tests.el * test/lisp/tabify-tests.el (tabify-tests--test-changes): Rename third argument to avoid "lexical argument shadows dynamic variable" warnings. Use mapconcat in place of mapcar+concat. (tabify-tests-untabify, tabify-tests-tabify): Quote function symbols as such. diff --git a/test/lisp/tabify-tests.el b/test/lisp/tabify-tests.el index 6670702eac..db073338b3 100644 --- a/test/lisp/tabify-tests.el +++ b/test/lisp/tabify-tests.el @@ -24,12 +24,12 @@ (require 'ert) (require 'tabify) -(defun tabify-tests--test-changes (fun changes tab-width) +(defun tabify-tests--test-changes (fun changes width) (with-temp-buffer - (let ((tab-width tab-width)) - (insert (apply 'concat (mapcar 'car changes))) + (let ((tab-width width)) + (insert (mapconcat #'car changes "")) (funcall fun (point-min) (point-max)) - (should (equal (buffer-string) (apply 'concat (mapcar 'cadr changes))))))) + (should (equal (buffer-string) (mapconcat #'cadr changes "")))))) (ert-deftest tabify-tests-untabify () (let ((changes '(("***\n" "***\n") @@ -44,7 +44,7 @@ (" \t ***\n" " ***\n") (" \t***\n" " ***\n") (" \t***\n" " ***\n")))) - (tabify-tests--test-changes 'untabify changes 2))) + (tabify-tests--test-changes #'untabify changes 2))) (ert-deftest tabify-tests-tabify () (let ((changes '(("***\n" "***\n") @@ -58,7 +58,7 @@ ("\t***\n" "\t***\n") ("\t ***\n" "\t ***\n") ("\t\t***\n" "\t\t***\n")))) - (tabify-tests--test-changes 'tabify changes 2))) + (tabify-tests--test-changes #'tabify changes 2))) (ert-deftest tabify-tests-tabify/all-spaces-on-line () (with-temp-buffer commit a51ab2f357af49f67feaa6e9484fcca2c91f5cb4 Author: Simen Heggestøyl Date: Sun May 26 11:11:23 2019 +0200 Use lexical-binding in paren.el and add tests * lisp/paren.el: Use lexical-binding. (show-paren--default): Use imperative form in doc-string. * test/lisp/paren-tests.el: New file with tests for paren.el. diff --git a/lisp/paren.el b/lisp/paren.el index 13908d46ee..c7d782a8a1 100644 --- a/lisp/paren.el +++ b/lisp/paren.el @@ -1,4 +1,4 @@ -;;; paren.el --- highlight matching paren +;;; paren.el --- highlight matching paren -*- lexical-binding:t -*- ;; Copyright (C) 1993, 1996, 2001-2019 Free Software Foundation, Inc. @@ -173,7 +173,7 @@ if there's no opener/closer near point, or a list of the form Where HERE-BEG..HERE-END is expected to be near point.") (defun show-paren--default () - "Finds the opener/closer near point and its match. + "Find the opener/closer near point and its match. It is the default value of `show-paren-data-function'." (let* ((temp (show-paren--locate-near-paren)) diff --git a/test/lisp/paren-tests.el b/test/lisp/paren-tests.el new file mode 100644 index 0000000000..5aaea8a7d9 --- /dev/null +++ b/test/lisp/paren-tests.el @@ -0,0 +1,121 @@ +;;; paren-tests.el --- Tests for paren.el -*- lexical-binding: t; -*- + +;; Copyright (C) 2019 Free Software Foundation, Inc. + +;; Author: Simen Heggestøyl +;; Keywords: + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; + +;;; Code: + +(require 'ert) +(require 'paren) + +(ert-deftest paren-tests-unescaped-p () + (with-temp-buffer + (insert "(insert)") + (backward-char) + (should (show-paren--unescaped-p (point))) + (insert "\\") + (should-not (show-paren--unescaped-p (point))))) + +(ert-deftest paren-tests-categorize-paren () + (with-temp-buffer + (insert "(insert)") + (backward-char) + (should (equal (show-paren--categorize-paren (point)) + (cons -1 (+ (point) 1)))) + (goto-char (point-min)) + (should (equal (show-paren--categorize-paren (point)) + (cons 1 (point)))))) + +(ert-deftest paren-tests-locate-near-paren () + (with-temp-buffer + (let ((show-paren-when-point-inside-paren nil) + (show-paren-when-point-in-periphery nil)) + (insert "(insert)") + (should (equal (show-paren--locate-near-paren) + (cons -1 (point)))) + (backward-char) + (should-not (show-paren--locate-near-paren)) + (goto-char (point-min)) + (should (equal (show-paren--locate-near-paren) + (cons 1 (point-min)))) + (forward-char) + (should-not (show-paren--locate-near-paren))))) + +(ert-deftest paren-tests-locate-near-paren-inside () + (with-temp-buffer + (let ((show-paren-when-point-inside-paren t) + (show-paren-when-point-in-periphery nil)) + (insert "(insert)") + (should (equal (show-paren--locate-near-paren) + (cons -1 (point)))) + (backward-char) + (should (equal (show-paren--locate-near-paren) + (cons -1 (+ (point) 1)))) + (goto-char (point-min)) + (should (equal (show-paren--locate-near-paren) + (cons 1 (point-min)))) + (forward-char) + (should (equal (show-paren--locate-near-paren) + (cons 1 (point-min))))))) + +(ert-deftest paren-tests-locate-near-paren-in-periphery () + (with-temp-buffer + (let ((show-paren-when-point-inside-paren nil) + (show-paren-when-point-in-periphery t)) + (insert " (insert) ") + (should (equal (show-paren--locate-near-paren) + (cons -1 (- (point) 1)))) + (backward-char 2) + (should-not (show-paren--locate-near-paren)) + (goto-char (point-min)) + (should (equal (show-paren--locate-near-paren) + (cons 1 (+ (point) 1)))) + (forward-char) + (should (equal (show-paren--locate-near-paren) + (cons 1 (point)))) + (forward-char) + (should-not (show-paren--locate-near-paren))))) + +(ert-deftest paren-tests-default () + (with-temp-buffer + (insert "(insert") + (goto-char (point-min)) + (should (equal (show-paren--default) + (list (point) (+ (point) 1) + nil nil + t))) + (goto-char (point-max)) + (insert ")") + (should (equal (show-paren--default) + (list (- (point) 1) (point) + (point-min) (+ (point-min) 1) + nil))) + (goto-char (point-min)) + (should (equal (show-paren--default) + (list (point) (+ (point) 1) + (- (point-max) 1) (point-max) + nil))))) + +(provide 'paren-tests) +;;; paren-tests.el ends here