commit 9ec81c5a6e12d9fec56767307d6072546b5a4dc2 (HEAD, refs/remotes/origin/master) Author: Lars Ingebrigtsen Date: Wed May 4 01:37:01 2016 +0200 Add an animation sanity check * lisp/image.el (image-multi-frame-p): Give up on animations if it seems like they are too slow (bug#23431). diff --git a/lisp/image.el b/lisp/image.el index 2ae642a..57cfc4e 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -731,7 +731,7 @@ number, play until that number of seconds has elapsed." (plist-put (cdr image) :animate-buffer (current-buffer)) (run-with-timer 0.2 nil 'image-animate-timeout image (or index 0) (car animation) - 0 limit)))) + 0 limit (+ (float-time) 0.2))))) (defun image-animate-timer (image) "Return the animation timer for image IMAGE." @@ -780,7 +780,7 @@ multiplication factor for the current value." ;; hence we need to call image-multi-frame-p to return it. ;; But it also returns count, so why do we bother passing that as an ;; argument? -(defun image-animate-timeout (image n count time-elapsed limit) +(defun image-animate-timeout (image n count time-elapsed limit target-time) "Display animation frame N of IMAGE. N=0 refers to the initial animation frame. COUNT is the total number of frames in the animation. @@ -793,7 +793,11 @@ The minimum delay between successive frames is `image-minimum-frame-delay'. If the image has a non-nil :speed property, it acts as a multiplier for the animation speed. A negative value means to animate in reverse." - (when (buffer-live-p (plist-get (cdr image) :animate-buffer)) + (when (and (buffer-live-p (plist-get (cdr image) :animate-buffer)) + ;; Delayed more than two seconds more than expected. + (when (> (- (float-time) target-time) 2) + (message "Stopping animation; animation possibly too big") + nil)) (image-show-frame image n t) (let* ((speed (image-animate-get-speed image)) (time (float-time)) @@ -817,7 +821,8 @@ for the animation speed. A negative value means to animate in reverse." (setq done (>= time-elapsed limit))) (unless done (run-with-timer delay nil 'image-animate-timeout - image n count time-elapsed limit))))) + image n count time-elapsed limit + (+ (float-time) delay)))))) (defvar imagemagick-types-inhibit) commit 3a788d7a4126e9b7038140ee95fe7b5b9d8fe65c Author: Lars Ingebrigtsen Date: Tue May 3 19:21:47 2016 +0200 abbrev-tests.el fix * test/lisp/abbrev-tests.el (abbrev-table-p-test): Don't check internal implementation detail. diff --git a/test/lisp/abbrev-tests.el b/test/lisp/abbrev-tests.el index 3c34521..c747e19 100644 --- a/test/lisp/abbrev-tests.el +++ b/test/lisp/abbrev-tests.el @@ -46,8 +46,7 @@ ;; Missing :abbrev-table-modiff counter: (should-not (abbrev-table-p (obarray-make))) (let* ((table (obarray-make))) - (abbrev-table-put table :abbrev-table-modiff 42) - (should (abbrev-table-p table)))) + (should (abbrev-table-empty-p (make-abbrev-table))))) (ert-deftest abbrev-make-abbrev-table-test () ;; Table without properties: commit 43bb4305c5fc4caf15b075631874a4aac0611cc0 Author: Lars Ingebrigtsen Date: Tue May 3 17:26:54 2016 +0200 (shr-rescale-image): Clarify logic slightly * lisp/net/shr.el (shr-rescale-image): Clarify logic slightly. diff --git a/lisp/net/shr.el b/lisp/net/shr.el index bf05fe9..1bc9105 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -1008,8 +1008,8 @@ element is the data blob and the second element is the content-type." (defun shr-rescale-image (data content-type width height) "Rescale DATA, if too big, to fit the current buffer. WIDTH and HEIGHT are the sizes given in the HTML data, if any." - (if (not (and (fboundp 'imagemagick-types) - (get-buffer-window (current-buffer)))) + (if (or (not (fboundp 'imagemagick-types)) + (not (get-buffer-window (current-buffer)))) (create-image data nil t :ascent 100) (let* ((edges (window-inside-pixel-edges (get-buffer-window (current-buffer)))) commit 72166f2f3dba18f1217c666574032f5a0351ed65 Author: Martin Rudalics Date: Tue May 3 08:38:49 2016 +0200 Bind `widget-button-click' to mouse-1/-2 instead of down-mouse-1/-2 * lisp/wid-edit.el (widget-keymap): Bind `widget-button-click' to mouse-1/-2 instead of down-mouse-1/-2. Suggested by Stefan Monnier. (Bug#19185, Bug#20398) diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index f0054be..0a0f458 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -852,8 +852,8 @@ button end points." (define-key map [(shift tab)] 'widget-backward) (put 'widget-backward :advertised-binding [(shift tab)]) (define-key map [backtab] 'widget-backward) - (define-key map [down-mouse-2] 'widget-button-click) - (define-key map [down-mouse-1] 'widget-button-click) + (define-key map [mouse-2] 'widget-button-click) + (define-key map [mouse-1] 'widget-button-click) ;; The following definition needs to avoid using escape sequences that ;; might get converted to ^M when building loaddefs.el (define-key map [(control ?m)] 'widget-button-press) commit 3a21ea15aecf7af8237c53dfafdc07650a09be3f Author: Lee Bochicchio Date: Tue May 3 00:12:53 2016 +0200 Add more abbrev tests * test/lisp/abbrev-tests.el (clear-abbrev-table-test): Use `abbrev-expansion' (abbrev-table-empty-p-test, list-abbrevs-test) (prepare-abbrev-list-buffer-test, insert-abbrevs-test) (edit-abbrevs-test, define-abbrevs-test) (read-write-abbrev-file-test) (abbrev-edit-save-to-file-test): New tests (bug#23139). diff --git a/test/lisp/abbrev-tests.el b/test/lisp/abbrev-tests.el index 0d93e26..3c34521 100644 --- a/test/lisp/abbrev-tests.el +++ b/test/lisp/abbrev-tests.el @@ -81,6 +81,17 @@ (should (abbrev-table-p new-foo-abbrev-table))) (should-not (string-equal (buffer-name) "*Backtrace*"))) +(ert-deftest abbrev-table-empty-p-test () + (should-error (abbrev-table-empty-p 42)) + (should-error (abbrev-table-empty-p "aoeu")) + (should-error (abbrev-table-empty-p '())) + (should-error (abbrev-table-empty-p [])) + ;; Missing :abbrev-table-modiff counter: + (should-error (abbrev-table-empty-p (obarray-make))) + (let* ((table (obarray-make))) + (abbrev-table-put table :abbrev-table-modiff 42) + (should (abbrev-table-empty-p table)))) + (ert-deftest kill-all-abbrevs-test () "Test undefining all defined abbrevs" (unless noninteractive @@ -110,18 +121,136 @@ (ert-deftest clear-abbrev-table-test () "Test clearing single abbrev table" (let ((ert-test-abbrevs (setup-test-abbrev-table))) - (should (equal "a-e-t" (symbol-name - (abbrev-symbol "a-e-t" ert-test-abbrevs)))) - (should (equal "abbrev-ert-test" (symbol-value - (abbrev-symbol "a-e-t" ert-test-abbrevs)))) + (should (equal "abbrev-ert-test" (abbrev-expansion "a-e-t" ert-test-abbrevs))) + (clear-abbrev-table ert-test-abbrevs) + (should (equal nil (abbrev-expansion "a-e-t" ert-test-abbrevs))) + (should (equal t (abbrev-table-empty-p ert-test-abbrevs))))) + +(ert-deftest list-abbrevs-test () + "Test generation of abbrev list buffer" + ;; Somewhat redundant as prepare-abbrev-list-buffer is also tested. + ;; all abbrevs + (let ((abbrev-buffer (prepare-abbrev-list-buffer))) + (should (equal "*Abbrevs*" (buffer-name abbrev-buffer))) + (kill-buffer abbrev-buffer)) + ;; mode-specific abbrevs + (let ((abbrev-buffer (prepare-abbrev-list-buffer t))) + (should (equal "*Abbrevs*" (buffer-name abbrev-buffer))) + (kill-buffer abbrev-buffer))) + +(ert-deftest prepare-abbrev-list-buffer-test () + "Test generation of abbrev list buffer" + ;; all abbrevs + (let ((ert-test-abbrevs (setup-test-abbrev-table))) + (with-current-buffer (prepare-abbrev-list-buffer) + ;; Check for a couple of abbrev-table names in buffer. + (should (and (progn + (goto-char (point-min)) + (search-forward (symbol-name (abbrev-table-name ert-test-abbrevs)))) + (progn + (goto-char (point-min)) + (search-forward "global-abbrev-table")))) + (should (equal 'edit-abbrevs-mode major-mode)) + (kill-buffer "*Abbrevs*"))) + + ;; mode-specific abbrevs (temp buffer uses fundamental-mode) + (with-temp-buffer + (prepare-abbrev-list-buffer t) + (with-current-buffer "*Abbrevs*" + (should (progn + (goto-char (point-min)) + (search-forward "fundamental-mode-abbrev-table"))) + (should-error (progn + (goto-char (point-min)) + (search-forward "global-abbrev-table"))) + (should-not (equal 'edit-abbrevs-mode major-mode)) + (kill-buffer "*Abbrevs*")))) + +(ert-deftest insert-abbrevs-test () + "Test inserting abbrev definitions into buffer" + (with-temp-buffer + (insert-abbrevs) + (should (progn + (goto-char (point-min)) + (search-forward "global-abbrev-table"))))) + +(ert-deftest edit-abbrevs-test () + "Test editing abbrevs from buffer" + (defvar ert-edit-abbrevs-test-table nil) + (let ((ert-test-abbrevs (setup-test-abbrev-table))) + (with-temp-buffer + ;; insert test table and new abbrev, redefine, check definition + (goto-char (point-min)) + (insert "(ert-edit-abbrevs-test-table)\n") + (insert "\n" "\"e-a-t\"\t" "0\t" "\"edit-abbrevs-test\"\n") + ;; check test table before redefine + (should (equal "abbrev-ert-test" + (abbrev-expansion "a-e-t" ert-test-abbrevs))) + (edit-abbrevs-redefine) + (should-not (abbrev-expansion "a-e-t" ert-test-abbrevs)) + (should (equal "edit-abbrevs-test" + (abbrev-expansion "e-a-t" ert-edit-abbrevs-test-table)))))) + +(ert-deftest define-abbrevs-test () + "Test defining abbrevs from buffer" + (defvar ert-bad-abbrev-table nil) + (defvar ert-good-abbrev-table nil) + (defvar ert-redefine-abbrev-table nil) + (with-temp-buffer + ;; insert bad abbrev data and attempt define + (goto-char (point-min)) + (insert "ert-bad-abbrev-table\n") + (insert "\n" "\"b-a-t\"\t" "0\t" "\n") + (should-not (define-abbrevs)) + (should (equal nil (abbrev-expansion "b-a-t" ert-bad-abbrev-table))) + (delete-region (point-min) (point-max)) + ;; try with valid abbrev data + (goto-char (point-min)) + (insert "(ert-good-abbrev-table)\n") + (insert "\n" "\"g-a-t\"\t" "0\t" "\"good-abbrev-table\"\n") + (define-abbrevs) + (should (equal "good-abbrev-table" + (abbrev-expansion "g-a-t" ert-good-abbrev-table))) + ;; redefine from buffer + (delete-region (point-min) (point-max)) + (insert "(ert-redefine-abbrev-table)\n") + (insert "\n" "\"r-a-t\"\t" "0\t" "\"redefine-abbrev-table\"\n") + ;; arg = kill-all-abbrevs + (define-abbrevs t) + (should (equal "redefine-abbrev-table" + (abbrev-expansion "r-a-t" ert-redefine-abbrev-table))) + (should (equal nil (abbrev-expansion "g-a-t" ert-good-abbrev-table))))) +(ert-deftest read-write-abbrev-file-test () + "Test reading and writing abbrevs from file" + (let ((temp-test-file (make-temp-file "ert-abbrev-test")) + (ert-test-abbrevs (setup-test-abbrev-table))) + (write-abbrev-file temp-test-file) (clear-abbrev-table ert-test-abbrevs) + (should (abbrev-table-empty-p ert-test-abbrevs)) + (read-abbrev-file temp-test-file) + (should (equal "abbrev-ert-test" (abbrev-expansion "a-e-t" ert-test-abbrevs))) + (delete-file temp-test-file))) - (should (equal "nil" (symbol-name - (abbrev-symbol "a-e-t" ert-test-abbrevs)))) - (should (equal nil (symbol-value - (abbrev-symbol "a-e-t" ert-test-abbrevs)))) - (should (equal t (abbrev-table-empty-p ert-test-abbrevs))))) +(ert-deftest abbrev-edit-save-to-file-test () + "Test saving abbrev definitions in buffer to file" + (defvar ert-save-test-table nil) + (let ((temp-test-file (make-temp-file "ert-abbrev-test")) + (ert-test-abbrevs (setup-test-abbrev-table))) + (with-temp-buffer + (goto-char (point-min)) + (insert "(ert-save-test-table)\n") + (insert "\n" "\"s-a-t\"\t" "0\t" "\"save-abbrevs-test\"\n") + (should (equal "abbrev-ert-test" + (abbrev-expansion "a-e-t" ert-test-abbrevs))) + ;; clears abbrev tables + (abbrev-edit-save-to-file temp-test-file) + (should-not (abbrev-expansion "a-e-t" ert-test-abbrevs)) + (read-abbrev-file temp-test-file) + (should (equal "save-abbrevs-test" + (abbrev-expansion "s-a-t" ert-save-test-table))) + (delete-file temp-test-file)))) (provide 'abbrev-tests) + ;;; abbrev-tests.el ends here commit 1331467910537f4d85fa842c993ef2c48ebbf749 Author: Philipp Stephani Date: Mon May 2 23:58:15 2016 +0200 Allow eval-ing named character literals * lisp/progmodes/elisp-mode.el (elisp--preceding-sexp): Skip over named character literals. * test/lisp/progmodes/elisp-mode-tests.el (elisp--preceding-sexp--char-name): Add test for skipping over named character literals (bug#23354). Copyright-paperwork-exempt: yes diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index ca85980..1c72848 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -1051,6 +1051,17 @@ If CHAR is not a character, return nil." ((or (eq (following-char) ?\') (eq (preceding-char) ?\')) (setq left-quote ?\`))) + + ;; When after a named character literal, skip over the entire + ;; literal, not only its last word. + (when (= (preceding-char) ?}) + (let ((begin (save-excursion + (backward-char) + (skip-syntax-backward "w-") + (backward-char 3) + (when (looking-at-p "\\\\N{") (point))))) + (when begin (goto-char begin)))) + (forward-sexp -1) ;; If we were after `?\e' (or similar case), ;; use the whole thing, not just the `e'. diff --git a/test/lisp/progmodes/elisp-mode-tests.el b/test/lisp/progmodes/elisp-mode-tests.el index 1679af3..a7562a0 100644 --- a/test/lisp/progmodes/elisp-mode-tests.el +++ b/test/lisp/progmodes/elisp-mode-tests.el @@ -641,5 +641,11 @@ to (xref-elisp-test-descr-to-target xref)." (elisp--xref-find-definitions (eval '(provide 'stephe-leake-feature))) nil) +(ert-deftest elisp--preceding-sexp--char-name () + (with-temp-buffer + (emacs-lisp-mode) + (insert "?\\N{HEAVY CHECK MARK}") + (should (equal (elisp--preceding-sexp) ?\N{HEAVY CHECK MARK})))) + (provide 'elisp-mode-tests) ;;; elisp-mode-tests.el ends here commit 33d6250a9384e33531d6ec30f29613eb789c57b4 Author: Aaron Conole Date: Mon May 2 23:42:10 2016 +0200 Call va_end in boot_error * src/gnutls.c (boot_error): A recent change added a function to signal an error or return an error code. That function uses a variadic argument list to populate an error message string. However, it missed calling va_end after using the variadic argument list. Copyright-paperwork-exempt: yes diff --git a/src/gnutls.c b/src/gnutls.c index 57b164a..c7efbcc 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -1181,6 +1181,7 @@ boot_error (struct Lisp_Process *p, const char *m, ...) pset_status (p, list2 (Qfailed, vformat_string (m, ap))); else verror (m, ap); + va_end (ap); } Lisp_Object commit 4639bc99d677aef2583200c4aa8e4cf53a29ecb9 Author: Aaron Conole Date: Mon May 2 23:40:14 2016 +0200 Fix the call to set_network_coding_system * src/process.c (Fmake_network_process): A recent commit modified the set_network_socket_coding_system function to take arguments host, service, and name. However, those arguments appear to be swapped. Copyright-paperwork-exempt: yes diff --git a/src/process.c b/src/process.c index 9f2d379..2d0fb56 100644 --- a/src/process.c +++ b/src/process.c @@ -3910,7 +3910,7 @@ usage: (make-network-process &rest ARGS) */) p->gnutls_boot_parameters = tem; #endif - set_network_socket_coding_system (proc, service, host, name); + set_network_socket_coding_system (proc, host, service, name); unbind_to (count, Qnil); commit 6b3d64854f6a7b0c8365b600704f0087b15b5720 Author: Lars Ingebrigtsen Date: Mon May 2 20:08:48 2016 +0200 Revert "alas, a map can have only one parent" This reverts commit d05806fda1cbba2db112bc783597fbe9d27175b2. This had already been fixed by using `make-composed-map'. And we don't want image-map to inherit from special-mode-map, anyway. diff --git a/lisp/image-mode.el b/lisp/image-mode.el index a5cfc7a..a18b07e 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -372,7 +372,6 @@ call." (defvar image-mode-map (let ((map (make-sparse-keymap))) - (set-keymap-parent map image-map) (define-key map "\C-c\C-c" 'image-toggle-display) (define-key map "\C-c\C-x" 'image-toggle-hex-display) (define-key map (kbd "SPC") 'image-scroll-up) diff --git a/lisp/image.el b/lisp/image.el index d9f58e5..2ae642a 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -142,7 +142,6 @@ based on the font pixel size." ;; Map put into text properties on images. (defvar image-map (let ((map (make-sparse-keymap))) - (set-keymap-parent map special-mode-map) (define-key map "-" 'image-decrease-size) (define-key map "+" 'image-increase-size) (define-key map "r" 'image-rotate) commit 2bf7bc4161a3b3e1eceaf8422773de87ae233ea3 Merge: d05806f bf21c84 Author: Paul Eggert Date: Mon May 2 10:46:53 2016 -0700 Merge from origin/emacs-25 bf21c84 Fix quoting problem in cc-engine debug message 8f36614 Add electric-quote-string unit test 6280531 Don’t electrically quote ‘'’ in Python fd7b430 `nreverse' Grep hits before passing them to xref--convert-hits commit bf21c84f0d3dab33b4836098b789eaddf9492b2a Author: Paul Eggert Date: Mon May 2 10:06:04 2016 -0700 Fix quoting problem in cc-engine debug message * lisp/progmodes/cc-engine.el (c-replay-parse-state-state): Use "%s" format to pass through ‘'’ unscathed (Bug#23425), and likewise for ‘`’, and ‘%’. diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 2010515..eb015ac 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -3498,7 +3498,7 @@ comment at the start of cc-engine.el for more info." c-state-old-cpp-end c-parse-state-point)))) (defun c-replay-parse-state-state () - (message + (message "%s" (concat "(setq " (mapconcat (lambda (arg) commit 8f36614512d479fb76764bf013ad23550696c5a6 Author: Philipp Stephani Date: Mon May 2 08:57:30 2016 -0700 Add electric-quote-string unit test * test/automated/electric-tests.el (electric-quote-string): New test. diff --git a/test/automated/electric-tests.el b/test/automated/electric-tests.el index 107b2e7..afd7076 100644 --- a/test/automated/electric-tests.el +++ b/test/automated/electric-tests.el @@ -584,5 +584,13 @@ baz\"\"" (skip-chars-backward "\"") (mark-sexp -1))) + +;;; Electric quotes +(define-electric-pair-test electric-quote-string + "" "'" :expected-string "'" :expected-point 2 + :fixture-fn #'electric-quote-local-mode + :bindings '((electric-quote-string . t)) + :test-in-comments nil :test-in-strings nil) + (provide 'electric-tests) ;;; electric-tests.el ends here commit 628053101d65749aecad5cc59d4dc0d0e7a8098d Author: Paul Eggert Date: Mon May 2 08:56:02 2016 -0700 Don’t electrically quote ‘'’ in Python Problem reported by Philipp Stephani (Bug#23387). * lisp/electric.el (electric-quote-post-self-insert-function): Do not requote a string starter or ender. diff --git a/lisp/electric.el b/lisp/electric.el index ab79943..e289601 100644 --- a/lisp/electric.el +++ b/lisp/electric.el @@ -444,10 +444,15 @@ This requotes when a quoting key is typed." (let ((start (if (and comment-start comment-use-syntax) (when (or electric-quote-comment electric-quote-string) - (let ((syntax (syntax-ppss))) - (and (or (and electric-quote-comment (nth 4 syntax)) + (let* ((syntax (syntax-ppss)) + (beg (nth 8 syntax))) + (and beg + (or (and electric-quote-comment (nth 4 syntax)) (and electric-quote-string (nth 3 syntax))) - (nth 8 syntax)))) + ;; Do not requote a quote that starts or ends + ;; a comment or string. + (eq beg (nth 8 (save-excursion + (syntax-ppss (1- (point))))))))) (and electric-quote-paragraph (derived-mode-p 'text-mode) (or (eq last-command-event ?\`) commit d05806fda1cbba2db112bc783597fbe9d27175b2 Author: Sam Steingold Date: Fri Apr 22 14:52:37 2016 -0400 alas, a map can have only one parent * lisp/image-mode.el (image-model-map): Cannot have two parents. * lisp/image.el (image-map): Inherit from `special-mode-map'. diff --git a/lisp/image-mode.el b/lisp/image-mode.el index a18b07e..a5cfc7a 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -372,6 +372,7 @@ call." (defvar image-mode-map (let ((map (make-sparse-keymap))) + (set-keymap-parent map image-map) (define-key map "\C-c\C-c" 'image-toggle-display) (define-key map "\C-c\C-x" 'image-toggle-hex-display) (define-key map (kbd "SPC") 'image-scroll-up) diff --git a/lisp/image.el b/lisp/image.el index 2ae642a..d9f58e5 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -142,6 +142,7 @@ based on the font pixel size." ;; Map put into text properties on images. (defvar image-map (let ((map (make-sparse-keymap))) + (set-keymap-parent map special-mode-map) (define-key map "-" 'image-decrease-size) (define-key map "+" 'image-increase-size) (define-key map "r" 'image-rotate) commit 1d287665dc93c97a1c55606b394bd3e05e6e2e04 Author: Michael Albinus Date: Mon May 2 11:45:16 2016 +0200 ; Fix last commit in tramp-tests.el diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 5090a5b..efb19e9 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -645,11 +645,13 @@ This checks also `file-name-as-directory', `file-name-directory', (dolist (file `(,(file-remote-p tramp-test-temporary-file-directory 'method) ,(file-remote-p tramp-test-temporary-file-directory 'host))) - (setq file (format "/%s:" file)) - (should (string-equal (directory-file-name file) file)) - (should (string-equal (file-name-as-directory file) (concat file "./"))) - (should (string-equal (file-name-directory file) file)) - (should (string-equal (file-name-nondirectory file) "")))))) + (unless (zerop (length file)) + (setq file (format "/%s:" file)) + (should (string-equal (directory-file-name file) file)) + (should + (string-equal (file-name-as-directory file) (concat file "./"))) + (should (string-equal (file-name-directory file) file)) + (should (string-equal (file-name-nondirectory file) ""))))))) (ert-deftest tramp-test07-file-exists-p () "Check `file-exist-p', `write-region' and `delete-file'." commit fd7b430afdd7ddea40cad7d231f634ff8bd536d8 Author: Dmitry Gutov Date: Mon May 2 02:38:01 2016 +0300 `nreverse' Grep hits before passing them to xref--convert-hits * lisp/progmodes/xref.el (xref-collect-matches): `nreverse' hits before passing them to xref--convert-hits. Fixes a regression from cc0b7132. diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index f674c70..b5632af 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -902,7 +902,7 @@ IGNORES is a list of glob patterns." (match-string 1) (buffer-substring-no-properties (point) (line-end-position))) hits))) - (xref--convert-hits hits regexp))) + (xref--convert-hits (nreverse hits) regexp))) (defun xref--rgrep-command (regexp files dir ignores) (require 'find-dired) ; for `find-name-arg'