aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2018-07-29 23:10:21 +0200
committerMichael Albinus2018-07-29 23:10:21 +0200
commitc71eeb8d4dd443232e2416f4e4dde19ed0b6da4d (patch)
treeb317c1d0125a2f2a96d9d05f9738a65bed7caffd
parent414a4969b98fabd1598933d48aea4c5f19db7a7f (diff)
downloademacs-c71eeb8d4dd443232e2416f4e4dde19ed0b6da4d.tar.gz
emacs-c71eeb8d4dd443232e2416f4e4dde19ed0b6da4d.zip
; Instrumentation for shadowfile.el
-rw-r--r--lisp/shadowfile.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/shadowfile.el b/lisp/shadowfile.el
index dc7c1b8c1a9..1e680770ece 100644
--- a/lisp/shadowfile.el
+++ b/lisp/shadowfile.el
@@ -713,18 +713,25 @@ defined, the old hashtable info is invalid."
713 "Write out information to `shadow-todo-file'. 713 "Write out information to `shadow-todo-file'.
714With non-nil argument also saves the buffer." 714With non-nil argument also saves the buffer."
715 (save-excursion 715 (save-excursion
716 (message "shadow-write-todo-file 1 %s" shadow-todo-buffer)
716 (if (not shadow-todo-buffer) 717 (if (not shadow-todo-buffer)
717 (setq shadow-todo-buffer (find-file-noselect shadow-todo-file))) 718 (setq shadow-todo-buffer (find-file-noselect shadow-todo-file)))
719 (message "shadow-write-todo-file 2 %s" shadow-todo-buffer)
718 (set-buffer shadow-todo-buffer) 720 (set-buffer shadow-todo-buffer)
721 (message "shadow-write-todo-file 3 %s" shadow-todo-buffer)
719 (setq buffer-read-only nil) 722 (setq buffer-read-only nil)
720 (delete-region (point-min) (point-max)) 723 (delete-region (point-min) (point-max))
724 (message "shadow-write-todo-file 4 %s" shadow-todo-buffer)
721 (shadow-insert-var 'shadow-files-to-copy) 725 (shadow-insert-var 'shadow-files-to-copy)
726 (message "shadow-write-todo-file 5 %s" shadow-todo-buffer)
722 (if save (shadow-save-todo-file)))) 727 (if save (shadow-save-todo-file))))
723 728
724(defun shadow-save-todo-file () 729(defun shadow-save-todo-file ()
730 (message "shadow-save-todo-file 1 %s" shadow-todo-buffer)
725 (if (and shadow-todo-buffer (buffer-modified-p shadow-todo-buffer)) 731 (if (and shadow-todo-buffer (buffer-modified-p shadow-todo-buffer))
726 (with-current-buffer shadow-todo-buffer 732 (with-current-buffer shadow-todo-buffer
727 (condition-case nil ; have to continue even in case of 733 (message "shadow-save-todo-file 2 %s" shadow-todo-buffer)
734 (condition-case nil ; have to continue even in case of
728 (basic-save-buffer) ; error, otherwise kill-emacs might 735 (basic-save-buffer) ; error, otherwise kill-emacs might
729 (error ; not work! 736 (error ; not work!
730 (message "WARNING: Can't save shadow todo file; it is locked!") 737 (message "WARNING: Can't save shadow todo file; it is locked!")