From 243b68f73ff7cbb4d89a3f4a15a1cd38cfc14fae Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Fri, 10 Aug 2018 13:34:10 +0200 Subject: [PATCH] ; More instrumentation for shadowfile-tests.el and files.el * test/lisp/shadowfile-tests.el (shadow-test06-literal-groups) (shadow-test07-regexp-groups, shadow-test08-shadow-todo) (shadow-test09-shadow-copy-files): Use `set-visited-file-name' instead of setting the value in `buffer-file-name' directly. (Bug#32226) --- lisp/files.el | 3 +++ test/lisp/shadowfile-tests.el | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lisp/files.el b/lisp/files.el index 7f193a78b35..dac2ef75dc5 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -5091,13 +5091,16 @@ Before and after saving the buffer, this function runs ;; Otherwise, write it the usual way now. (let ((dir (file-name-directory (expand-file-name buffer-file-name)))) + (if (getenv "BUG_32226") (message "BUG_32226 %s" dir)) (unless (file-exists-p dir) (if (y-or-n-p (format-message "Directory `%s' does not exist; create? " dir)) (make-directory dir t) (error "Canceled"))) + (if (getenv "BUG_32226") (message "BUG_32226 %s" dir)) (setq setmodes (basic-save-buffer-1))))) + (if (getenv "BUG_32226") (message "BUG_32226")) ;; Now we have saved the current buffer. Let's make sure ;; that buffer-file-coding-system is fixed to what ;; actually used for saving by binding it locally. diff --git a/test/lisp/shadowfile-tests.el b/test/lisp/shadowfile-tests.el index c549ad79a4c..f93845da61e 100644 --- a/test/lisp/shadowfile-tests.el +++ b/test/lisp/shadowfile-tests.el @@ -724,6 +724,9 @@ guaranteed by the originator of a cluster definition." (dolist (elt (all-completions "shadow-" obarray 'functionp)) (trace-function-background (intern elt))) (trace-function-background 'save-buffer) + (trace-function-background 'basic-save-buffer) + (trace-function-background 'basic-save-buffer-1) + (trace-function-background 'basic-save-buffer-2) (dolist (elt write-file-functions) (trace-function-background elt)) ;; Cleanup.