aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2000-02-12 19:47:18 +0000
committerGerd Moellmann2000-02-12 19:47:18 +0000
commit5a7b902473ff325cd04cec0f3b755c986c4207fa (patch)
tree8c67ad51a0228d4c47267362dcb000fd79141875
parent2b706b50d04c5bcc3807d1bf1f8b307afd0799d5 (diff)
downloademacs-5a7b902473ff325cd04cec0f3b755c986c4207fa.tar.gz
emacs-5a7b902473ff325cd04cec0f3b755c986c4207fa.zip
(shadow-when): Removed.
-rw-r--r--lisp/shadowfile.el37
1 files changed, 14 insertions, 23 deletions
diff --git a/lisp/shadowfile.el b/lisp/shadowfile.el
index 2c61de1f03b..1cc343672c8 100644
--- a/lisp/shadowfile.el
+++ b/lisp/shadowfile.el
@@ -168,11 +168,6 @@ created by shadow-define-regexp-group.")
168;;; Syntactic sugar; General list and string manipulation 168;;; Syntactic sugar; General list and string manipulation
169;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 169;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
170 170
171(defmacro shadow-when (condition &rest body)
172 ;; From cl.el
173 "(shadow-when CONDITION . BODY) => evaluate BODY if CONDITION is true."
174 (` (if (not (, condition)) () (,@ body))))
175
176(defun shadow-union (a b) 171(defun shadow-union (a b)
177 "Add members of list A to list B 172 "Add members of list A to list B
178if they are not equal to items already in B." 173if they are not equal to items already in B."
@@ -584,7 +579,7 @@ site."
584 (car s)))) 579 (car s))))
585 (find-file-noselect (car s))))) 580 (find-file-noselect (car s)))))
586 (to (shadow-expand-cluster-in-file-name (cdr s)))) 581 (to (shadow-expand-cluster-in-file-name (cdr s))))
587 (shadow-when buffer 582 (when buffer
588 (set-buffer buffer) 583 (set-buffer buffer)
589 (save-restriction 584 (save-restriction
590 (widen) 585 (widen)
@@ -639,10 +634,10 @@ of files needing to be copied."
639 (let ((shadows (shadow-shadows-of 634 (let ((shadows (shadow-shadows-of
640 (shadow-expand-file-name 635 (shadow-expand-file-name
641 (buffer-file-name (current-buffer)))))) 636 (buffer-file-name (current-buffer))))))
642 (shadow-when shadows 637 (when shadows
643 (setq shadow-files-to-copy 638 (setq shadow-files-to-copy
644 (shadow-union shadows shadow-files-to-copy)) 639 (shadow-union shadows shadow-files-to-copy))
645 (shadow-when (not shadow-inhibit-message) 640 (when (not shadow-inhibit-message)
646 (message "%s" (substitute-command-keys 641 (message "%s" (substitute-command-keys
647 "Use \\[shadow-copy-files] to update shadows.")) 642 "Use \\[shadow-copy-files] to update shadows."))
648 (sit-for 1)) 643 (sit-for 1))
@@ -670,23 +665,23 @@ Returns t unless files were locked; then returns nil."
670 (sit-for 3) 665 (sit-for 3)
671 nil) 666 nil)
672 (save-excursion 667 (save-excursion
673 (shadow-when shadow-info-file 668 (when shadow-info-file
674 (set-buffer (setq shadow-info-buffer 669 (set-buffer (setq shadow-info-buffer
675 (find-file-noselect shadow-info-file))) 670 (find-file-noselect shadow-info-file)))
676 (shadow-when (and (not (buffer-modified-p)) 671 (when (and (not (buffer-modified-p))
677 (file-newer-than-file-p (make-auto-save-file-name) 672 (file-newer-than-file-p (make-auto-save-file-name)
678 shadow-info-file)) 673 shadow-info-file))
679 (erase-buffer) 674 (erase-buffer)
680 (message "Data recovered from %s." 675 (message "Data recovered from %s."
681 (car (insert-file-contents (make-auto-save-file-name)))) 676 (car (insert-file-contents (make-auto-save-file-name))))
682 (sit-for 1)) 677 (sit-for 1))
683 (eval-current-buffer)) 678 (eval-current-buffer))
684 (shadow-when shadow-todo-file 679 (when shadow-todo-file
685 (set-buffer (setq shadow-todo-buffer 680 (set-buffer (setq shadow-todo-buffer
686 (find-file-noselect shadow-todo-file))) 681 (find-file-noselect shadow-todo-file)))
687 (shadow-when (and (not (buffer-modified-p)) 682 (when (and (not (buffer-modified-p))
688 (file-newer-than-file-p (make-auto-save-file-name) 683 (file-newer-than-file-p (make-auto-save-file-name)
689 shadow-todo-file)) 684 shadow-todo-file))
690 (erase-buffer) 685 (erase-buffer)
691 (message "Data recovered from %s." 686 (message "Data recovered from %s."
692 (car (insert-file-contents (make-auto-save-file-name)))) 687 (car (insert-file-contents (make-auto-save-file-name))))
@@ -798,7 +793,7 @@ look for files that have been changed and need to be copied to other systems."
798;; This is on hold until someone tells me about a working version of 793;; This is on hold until someone tells me about a working version of
799;; map-ynp for Lucid Emacs. 794;; map-ynp for Lucid Emacs.
800 795
801;(shadow-when (string-match "Lucid" emacs-version) 796;(when (string-match "Lucid" emacs-version)
802; (require 'symlink-fix) 797; (require 'symlink-fix)
803; (require 'ange-ftp) 798; (require 'ange-ftp)
804; (require 'map-ynp) 799; (require 'map-ynp)
@@ -832,8 +827,8 @@ look for files that have been changed and need to be copied to other systems."
832 (message "Shadowfile information files not found - aborting") 827 (message "Shadowfile information files not found - aborting")
833 (beep) 828 (beep)
834 (sit-for 3)) 829 (sit-for 3))
835 (shadow-when (and (not shadow-inhibit-overload) 830 (when (and (not shadow-inhibit-overload)
836 (not (fboundp 'shadow-orig-save-buffers-kill-emacs))) 831 (not (fboundp 'shadow-orig-save-buffers-kill-emacs)))
837 (fset 'shadow-orig-save-buffers-kill-emacs 832 (fset 'shadow-orig-save-buffers-kill-emacs
838 (symbol-function 'save-buffers-kill-emacs)) 833 (symbol-function 'save-buffers-kill-emacs))
839 (fset 'save-buffers-kill-emacs 834 (fset 'save-buffers-kill-emacs
@@ -841,8 +836,4 @@ look for files that have been changed and need to be copied to other systems."
841 (add-hook 'write-file-hooks 'shadow-add-to-todo) 836 (add-hook 'write-file-hooks 'shadow-add-to-todo)
842 (define-key ctl-x-4-map "s" 'shadow-copy-files))) 837 (define-key ctl-x-4-map "s" 'shadow-copy-files)))
843 838
844;;;Local Variables:
845;;;eval:(put 'shadow-when 'lisp-indent-hook 1)
846;;;End:
847
848;;; shadowfile.el ends here 839;;; shadowfile.el ends here