commit adc7d9e89c8fc3bda483b2b543d7774e8fde1bac (HEAD, refs/remotes/origin/master) Author: Paul Eggert Date: Wed Jun 3 17:18:59 2015 -0700 Don't pass raw directory name to 'error' * lisp/files.el (basic-save-buffer-2): Avoid format error if a directory name contains a string like "%s". diff --git a/lisp/files.el b/lisp/files.el index 6939f2b..26f9f70 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -4844,9 +4844,9 @@ Before and after saving the buffer, this function runs (file-exists-p buffer-file-name) (> (file-nlinks buffer-file-name) 1) (or dir-writable - (error (concat (format - "Directory %s write-protected; " dir) - "cannot break hardlink when saving"))))) + (error (concat "Directory %s write-protected; " + "cannot break hardlink when saving") + dir)))) ;; Write temp name, then rename it. ;; This requires write access to the containing dir, ;; which is why we don't try it if we don't have that access. commit 6d020ecd8951244296ebefc04d15eb10781bb846 Author: Dmitry Gutov Date: Thu Jun 4 02:46:16 2015 +0300 Override 'grep --color=always' * lisp/progmodes/xref.el (xref-collect-matches): Override --color=always in grep-find-template. diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index f786d4e..89a9cf5 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -749,8 +749,13 @@ tools are used, and when." (require 'semantic/fw) (grep-compute-defaults) (defvar grep-find-template) - (let* ((grep-find-template (replace-regexp-in-string "-e " "-E " - grep-find-template t t)) + (let* ((grep-find-template + (replace-regexp-in-string + ;; Override the use ot '--color=always' on MS-Windows. + "--color=always" "" + (replace-regexp-in-string "-e " "-E " + grep-find-template t t) + t t)) (command (rgrep-default-command (xref--regexp-to-extended regexp) "*.*" dir)) (orig-buffers (buffer-list)) commit 0c182b332d455b19c72e4bdd77bc7a728ac1e380 Author: Michael Albinus Date: Wed Jun 3 20:03:42 2015 +0200 Fix error introduced recently in file-notify-tests.el * test/automated/file-notify-tests.el (file-notify--test-remote-enabled): Do not use `file-notify--test-desc'. (file-notify--deftest-remote): Revert previous patch, not necessary anymore. diff --git a/test/automated/file-notify-tests.el b/test/automated/file-notify-tests.el index 806bdd7..11589b9 100644 --- a/test/automated/file-notify-tests.el +++ b/test/automated/file-notify-tests.el @@ -85,21 +85,18 @@ being the result.") (defun file-notify--test-remote-enabled () "Whether remote file notification is enabled." (unless (consp file-notify--test-remote-enabled-checked) - (unwind-protect - (ignore-errors - (and - (file-remote-p file-notify-test-remote-temporary-file-directory) - (file-directory-p file-notify-test-remote-temporary-file-directory) - (file-writable-p file-notify-test-remote-temporary-file-directory) - (setq file-notify--test-desc - (file-notify-add-watch - file-notify-test-remote-temporary-file-directory - '(change) 'ignore)))) - ;; Unwind forms. - (setq file-notify--test-remote-enabled-checked - (cons t file-notify--test-desc)) - (when file-notify--test-desc - (file-notify-rm-watch file-notify--test-desc)))) + (let (desc) + (ignore-errors + (and + (file-remote-p file-notify-test-remote-temporary-file-directory) + (file-directory-p file-notify-test-remote-temporary-file-directory) + (file-writable-p file-notify-test-remote-temporary-file-directory) + (setq desc + (file-notify-add-watch + file-notify-test-remote-temporary-file-directory + '(change) 'ignore)))) + (setq file-notify--test-remote-enabled-checked (cons t desc)) + (when desc (file-notify-rm-watch desc)))) ;; Return result. (cdr file-notify--test-remote-enabled-checked)) @@ -108,21 +105,17 @@ being the result.") (declare (indent 1)) `(ert-deftest ,(intern (concat (symbol-name test) "-remote")) () ,docstring - (condition-case err - (let* ((temporary-file-directory - file-notify-test-remote-temporary-file-directory) - (ert-test (ert-get-test ',test))) - (skip-unless (file-notify--test-remote-enabled)) - (tramp-cleanup-connection - (tramp-dissect-file-name temporary-file-directory) - nil 'keep-password) - (funcall (ert-test-body ert-test))) - ((error quit) (ert-fail err))))) + (let* ((temporary-file-directory + file-notify-test-remote-temporary-file-directory) + (ert-test (ert-get-test ',test))) + (skip-unless (file-notify--test-remote-enabled)) + (tramp-cleanup-connection + (tramp-dissect-file-name temporary-file-directory) nil 'keep-password) + (funcall (ert-test-body ert-test))))) (ert-deftest file-notify-test00-availability () "Test availability of `file-notify'." (skip-unless (file-notify--test-local-enabled)) - ;; Check, that different valid parameters are accepted. (should (setq file-notify--test-desc (file-notify-add-watch temporary-file-directory '(change) 'ignore))) commit 68529c89faf04a638ddea5e910d0684effa1d7c5 Author: Wolfgang Jenkner Date: Wed Jun 3 15:29:24 2015 +0200 * src/indent.c (Fvertical_motion): Amend motion by 0 lines. Starting from a display string after a newline, point went to the previous line. Also, fix an inadvertent use of a buffer position with FETCH_BYTE. (Bug#20701) diff --git a/src/indent.c b/src/indent.c index ce78308..b4e6d74 100644 --- a/src/indent.c +++ b/src/indent.c @@ -2134,17 +2134,20 @@ whether or not it is currently displayed in some window. */) overshoot_handled = 1; } else if (IT_CHARPOS (it) == PT - 1 - && FETCH_BYTE (PT - 1) == '\n' - && nlines < 0) + && FETCH_BYTE (PT_BYTE - 1) == '\n' + && nlines <= 0) { /* The position we started from was covered by a display property, so we moved to position before the string, and - backed up one line, because the character at PT - 1 is a - newline. So we need one less line to go up. */ + backed up one line, because the character at PT - 1 is + a newline. So we need one less line to go up (or exactly + one line to go down if nlines == 0). */ nlines++; /* But we still need to record that one line, in order to return the correct value to the caller. */ vpos_init = -1; + + overshoot_handled = 1; } if (lcols_given) to_x = window_column_x (w, window, extract_float (lcols), lcols); @@ -2159,7 +2162,7 @@ whether or not it is currently displayed in some window. */) } else if (overshoot_handled) { - it.vpos = 0; + it.vpos = vpos_init; move_it_by_lines (&it, min (PTRDIFF_MAX, nlines)); } else commit a62306bbcbd1c0c9c047c62be6ead34cd7be75df Author: Michael Albinus Date: Wed Jun 3 14:07:06 2015 +0200 Instrument file-notify-test.el in order to catch hydra error. * test/automated/file-notify-tests.el (file-notify--deftest-remote): Wrap body by `ignore-case', in order to trap non-local errors. diff --git a/test/automated/file-notify-tests.el b/test/automated/file-notify-tests.el index a45eff7..806bdd7 100644 --- a/test/automated/file-notify-tests.el +++ b/test/automated/file-notify-tests.el @@ -105,15 +105,19 @@ being the result.") (defmacro file-notify--deftest-remote (test docstring) "Define ert `TEST-remote' for remote files." + (declare (indent 1)) `(ert-deftest ,(intern (concat (symbol-name test) "-remote")) () ,docstring - (let* ((temporary-file-directory - file-notify-test-remote-temporary-file-directory) - (ert-test (ert-get-test ',test))) - (skip-unless (file-notify--test-remote-enabled)) - (tramp-cleanup-connection - (tramp-dissect-file-name temporary-file-directory) nil 'keep-password) - (funcall (ert-test-body ert-test))))) + (condition-case err + (let* ((temporary-file-directory + file-notify-test-remote-temporary-file-directory) + (ert-test (ert-get-test ',test))) + (skip-unless (file-notify--test-remote-enabled)) + (tramp-cleanup-connection + (tramp-dissect-file-name temporary-file-directory) + nil 'keep-password) + (funcall (ert-test-body ert-test))) + ((error quit) (ert-fail err))))) (ert-deftest file-notify-test00-availability () "Test availability of `file-notify'."