commit 30c0f81f9faca5df012a93b6b0dc9cab5a7de65d (HEAD, refs/remotes/origin/master) Author: Eli Zaretskii Date: Sat Jun 10 11:29:58 2017 +0300 Fix handling of Python/Guile commands with arguments in gdb-mi.el * lisp/progmodes/gdb-mi.el (gdb-python-guile-commands-regexp): New variable. (gdb-control-commands-regexp): Use it. (gdb-send): Don't increment gdb-control-level if the command matches gdb-python-guile-commands-regexp and has non-empty arguments. Reported by David Boles in http://lists.gnu.org/archive/html/emacs-devel/2017-06/msg00009.html. diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 1af520dbc3..cc9205c0d8 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -1767,13 +1767,17 @@ static char *magick[] = { :group 'gdb) +(defvar gdb-python-guile-commands-regexp + "python\\|python-interactive\\|pi\\|guile\\|guile-repl\\|gr" + "Regexp that matches Python and Guile commands supported by GDB.") + (defvar gdb-control-commands-regexp (concat "^\\(" "commands\\|if\\|while\\|define\\|document\\|" - "python\\|python-interactive\\|pi\\|guile\\|guile-repl\\|gr\\|" - "while-stepping\\|stepping\\|ws\\|actions" - "\\)\\([[:blank:]]+.*\\)?$") + gdb-python-guile-commands-regexp + "\\|while-stepping\\|stepping\\|ws\\|actions" + "\\)\\([[:blank:]]+\\([^[:blank:]]*\\)\\)?$") "Regexp matching GDB commands that enter a recursive reading loop. As long as GDB is in the recursive reading loop, it does not expect commands to be prefixed by \"-interpreter-exec console\".") @@ -1831,8 +1835,17 @@ commands to be prefixed by \"-interpreter-exec console\".") (> gdb-control-level 0)) (setq gdb-control-level (1- gdb-control-level))) (setq gdb-continuation nil))) - (if (string-match gdb-control-commands-regexp string) - (setq gdb-control-level (1+ gdb-control-level)))) + ;; Python and Guile commands that have an argument don't enter the + ;; recursive reading loop. + (let* ((control-command-p (string-match gdb-control-commands-regexp string)) + (command-arg (match-string 3 string)) + (python-or-guile-p (string-match gdb-python-guile-commands-regexp + string))) + (if (and control-command-p + (or (not python-or-guile-p) + (null command-arg) + (zerop (length command-arg)))) + (setq gdb-control-level (1+ gdb-control-level))))) (defun gdb-mi-quote (string) "Return STRING quoted properly as an MI argument. commit 6b4b13eb3868e861df8e52e491214376134baf63 Author: Eli Zaretskii Date: Sat Jun 10 11:22:50 2017 +0300 Preserve point in Dired windows under 'dired-auto-revert-buffer' * lisp/dired.el (dired-find-file): When dired-auto-revert-buffer is non-nil, bind switch-to-buffer-preserve-window-point to nil while calling find-file. (Bug#27243) diff --git a/lisp/dired.el b/lisp/dired.el index 8396652d50..909735a3b5 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -2126,7 +2126,16 @@ directory in another window." (interactive) ;; Bind `find-file-run-dired' so that the command works on directories ;; too, independent of the user's setting. - (let ((find-file-run-dired t)) + (let ((find-file-run-dired t) + ;; This binding prevents problems with preserving point in + ;; windows displaying Dired buffers, because reverting a Dired + ;; buffer empties it, which changes the places where the + ;; markers used by switch-to-buffer-preserve-window-point + ;; point. + (switch-to-buffer-preserve-window-point + (if dired-auto-revert-buffer + nil + switch-to-buffer-preserve-window-point))) (find-file (dired-get-file-for-visit)))) (defun dired-find-alternate-file () commit 39121649bed8c75f84caa5c9ab554f20205b192e Author: Philipp Stephani Date: Fri May 19 10:58:58 2017 +0200 Give test files a -tests.el suffix Rename a couple of test files that have the same name as the library they test. This harmonizes the naming pattern and makes it possible to have the tests directories in the load path. diff --git a/test/lisp/eshell/eshell.el b/test/lisp/eshell/eshell-tests.el similarity index 99% rename from test/lisp/eshell/eshell.el rename to test/lisp/eshell/eshell-tests.el index dee6c17e02..363ef525e1 100644 --- a/test/lisp/eshell/eshell.el +++ b/test/lisp/eshell/eshell-tests.el @@ -1,4 +1,4 @@ -;;; tests/eshell.el --- Eshell test suite +;;; tests/eshell-tests.el --- Eshell test suite ;; Copyright (C) 1999-2017 Free Software Foundation, Inc. @@ -249,4 +249,4 @@ chars" (provide 'esh-test) -;;; tests/eshell.el ends here +;;; tests/eshell-tests.el ends here diff --git a/test/lisp/net/puny.el b/test/lisp/net/puny-tests.el similarity index 92% rename from test/lisp/net/puny.el rename to test/lisp/net/puny-tests.el index b119e45d65..b06364e3b3 100644 --- a/test/lisp/net/puny.el +++ b/test/lisp/net/puny-tests.el @@ -1,4 +1,4 @@ -;;; puny.el --- tests for net/puny.el -*- coding: utf-8; -*- +;;; puny-tests.el --- tests for net/puny.el -*- coding: utf-8; -*- ;; Copyright (C) 2017 Free Software Foundation, Inc. @@ -38,4 +38,4 @@ "Test puny decoding." (should (string= (puny-decode-string "xn--9dbdkw") "חנוך"))) -;;; puny.el ends here +;;; puny-tests.el ends here diff --git a/test/lisp/progmodes/f90.el b/test/lisp/progmodes/f90-tests.el similarity index 98% rename from test/lisp/progmodes/f90.el rename to test/lisp/progmodes/f90-tests.el index cda39eda37..533a67149e 100644 --- a/test/lisp/progmodes/f90.el +++ b/test/lisp/progmodes/f90-tests.el @@ -1,4 +1,4 @@ -;;; f90.el --- tests for progmodes/f90.el +;;; f90-tests.el --- tests for progmodes/f90.el ;; Copyright (C) 2011-2017 Free Software Foundation, Inc. @@ -273,4 +273,4 @@ end program prog") (forward-line -2) (should (= 2 (current-indentation))))) ; class is -;;; f90.el ends here +;;; f90-tests.el ends here diff --git a/test/lisp/vc/vc-hg.el b/test/lisp/vc/vc-hg-tests.el similarity index 96% rename from test/lisp/vc/vc-hg.el rename to test/lisp/vc/vc-hg-tests.el index 8e4c9739e0..284e06a205 100644 --- a/test/lisp/vc/vc-hg.el +++ b/test/lisp/vc/vc-hg-tests.el @@ -1,4 +1,4 @@ -;;; vc-hg.el --- tests for vc/vc-hg.el +;;; vc-hg-tests.el --- tests for vc/vc-hg.el ;; Copyright (C) 2016-2017 Free Software Foundation, Inc. @@ -55,4 +55,4 @@ (save-excursion (insert "philringnalda 218075 2014-11-28 CLOBBER:")) (should (floatp (vc-hg-annotate-time))))) -;;; vc-hg.el ends here +;;; vc-hg-tests.el ends here