aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2018-08-10 13:34:10 +0200
committerMichael Albinus2018-08-10 13:34:10 +0200
commit243b68f73ff7cbb4d89a3f4a15a1cd38cfc14fae (patch)
tree49b89402bdfe549fe0ed64fdfe0c7d30e1fbf1db
parent7fbf1247964cbfbbda207e34bfcd5c1863608e74 (diff)
downloademacs-243b68f73ff7cbb4d89a3f4a15a1cd38cfc14fae.tar.gz
emacs-243b68f73ff7cbb4d89a3f4a15a1cd38cfc14fae.zip
; 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)
-rw-r--r--lisp/files.el3
-rw-r--r--test/lisp/shadowfile-tests.el3
2 files changed, 6 insertions, 0 deletions
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
5091 ;; Otherwise, write it the usual way now. 5091 ;; Otherwise, write it the usual way now.
5092 (let ((dir (file-name-directory 5092 (let ((dir (file-name-directory
5093 (expand-file-name buffer-file-name)))) 5093 (expand-file-name buffer-file-name))))
5094 (if (getenv "BUG_32226") (message "BUG_32226 %s" dir))
5094 (unless (file-exists-p dir) 5095 (unless (file-exists-p dir)
5095 (if (y-or-n-p 5096 (if (y-or-n-p
5096 (format-message 5097 (format-message
5097 "Directory `%s' does not exist; create? " dir)) 5098 "Directory `%s' does not exist; create? " dir))
5098 (make-directory dir t) 5099 (make-directory dir t)
5099 (error "Canceled"))) 5100 (error "Canceled")))
5101 (if (getenv "BUG_32226") (message "BUG_32226 %s" dir))
5100 (setq setmodes (basic-save-buffer-1))))) 5102 (setq setmodes (basic-save-buffer-1)))))
5103 (if (getenv "BUG_32226") (message "BUG_32226"))
5101 ;; Now we have saved the current buffer. Let's make sure 5104 ;; Now we have saved the current buffer. Let's make sure
5102 ;; that buffer-file-coding-system is fixed to what 5105 ;; that buffer-file-coding-system is fixed to what
5103 ;; actually used for saving by binding it locally. 5106 ;; 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."
724 (dolist (elt (all-completions "shadow-" obarray 'functionp)) 724 (dolist (elt (all-completions "shadow-" obarray 'functionp))
725 (trace-function-background (intern elt))) 725 (trace-function-background (intern elt)))
726 (trace-function-background 'save-buffer) 726 (trace-function-background 'save-buffer)
727 (trace-function-background 'basic-save-buffer)
728 (trace-function-background 'basic-save-buffer-1)
729 (trace-function-background 'basic-save-buffer-2)
727 (dolist (elt write-file-functions) 730 (dolist (elt write-file-functions)
728 (trace-function-background elt)) 731 (trace-function-background elt))
729 ;; Cleanup. 732 ;; Cleanup.