aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMichael Albinus2019-09-07 12:31:31 +0200
committerMichael Albinus2019-09-07 12:31:31 +0200
commit01a04880ca7469626a03ea10481d60c5ddec4663 (patch)
tree171e9538fc8e870bb046053946ff0490ef95dd11 /lisp
parent52f83af1f3975130b6bd035166780c2c2dde778c (diff)
downloademacs-01a04880ca7469626a03ea10481d60c5ddec4663.tar.gz
emacs-01a04880ca7469626a03ea10481d60c5ddec4663.zip
Add traces in shadowfile
* lisp/shadowfile.el (shadow-add-to-todo) (shadow-remove-from-todo, shadow-save-todo-file): * test/lisp/shadowfile-tests.el (shadow-test08-shadow-todo): Add traces.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/shadowfile.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/shadowfile.el b/lisp/shadowfile.el
index 4566ea19f8d..2778e583674 100644
--- a/lisp/shadowfile.el
+++ b/lisp/shadowfile.el
@@ -634,6 +634,10 @@ Consider them as regular expressions if third arg REGEXP is true."
634 (let ((shadows (shadow-shadows-of 634 (let ((shadows (shadow-shadows-of
635 (shadow-expand-file-name 635 (shadow-expand-file-name
636 (buffer-file-name (current-buffer)))))) 636 (buffer-file-name (current-buffer))))))
637 (when shadow-debug
638 (message
639 "shadow-add-to-todo: %s %s\n%s"
640 shadows shadow-files-to-copy (with-output-to-string (backtrace))))
637 (when shadows 641 (when shadows
638 (setq shadow-files-to-copy 642 (setq shadow-files-to-copy
639 (shadow-union shadows shadow-files-to-copy)) 643 (shadow-union shadows shadow-files-to-copy))
@@ -647,6 +651,10 @@ Consider them as regular expressions if third arg REGEXP is true."
647(defun shadow-remove-from-todo (pair) 651(defun shadow-remove-from-todo (pair)
648 "Remove PAIR from `shadow-files-to-copy'. 652 "Remove PAIR from `shadow-files-to-copy'.
649PAIR must be `eq' to one of the elements of that list." 653PAIR must be `eq' to one of the elements of that list."
654 (when shadow-debug
655 (message
656 "shadow-remove-from-todo: %s %s\n%s"
657 pair shadow-files-to-copy (with-output-to-string (backtrace))))
650 (setq shadow-files-to-copy 658 (setq shadow-files-to-copy
651 (cl-remove-if (lambda (s) (eq s pair)) shadow-files-to-copy))) 659 (cl-remove-if (lambda (s) (eq s pair)) shadow-files-to-copy)))
652 660
@@ -717,6 +725,8 @@ With non-nil argument also saves the buffer."
717 (if save (shadow-save-todo-file)))) 725 (if save (shadow-save-todo-file))))
718 726
719(defun shadow-save-todo-file () 727(defun shadow-save-todo-file ()
728 (when shadow-debug
729 (message "shadow-save-todo-file:\n%s" (with-output-to-string (backtrace))))
720 (if (and shadow-todo-buffer (buffer-modified-p shadow-todo-buffer)) 730 (if (and shadow-todo-buffer (buffer-modified-p shadow-todo-buffer))
721 (with-current-buffer shadow-todo-buffer 731 (with-current-buffer shadow-todo-buffer
722 (condition-case nil ; have to continue even in case of 732 (condition-case nil ; have to continue even in case of
@@ -772,7 +782,7 @@ look for files that have been changed and need to be copied to other systems."
772 (buffer-list)))) 782 (buffer-list))))
773 (yes-or-no-p "Modified buffers exist; exit anyway? ")) 783 (yes-or-no-p "Modified buffers exist; exit anyway? "))
774 (or (not (fboundp 'process-list)) 784 (or (not (fboundp 'process-list))
775 ;; process-list is not defined on MSDOS. 785 ;; `process-list' is not defined on MSDOS.
776 (let ((processes (process-list)) 786 (let ((processes (process-list))
777 active) 787 active)
778 (while processes 788 (while processes