changeset 27685:15ad3fb709f8

(shadow-when): Removed.
author Gerd Moellmann <gerd@gnu.org>
date Sat, 12 Feb 2000 19:47:18 +0000
parents db5b16cdb88d
children 888000b8e8b6
files lisp/shadowfile.el
diffstat 1 files changed, 14 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/shadowfile.el	Sat Feb 12 19:46:42 2000 +0000
+++ b/lisp/shadowfile.el	Sat Feb 12 19:47:18 2000 +0000
@@ -168,11 +168,6 @@
 ;;; Syntactic sugar; General list and string manipulation
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(defmacro shadow-when (condition &rest body)
-  ;; From cl.el
-  "(shadow-when CONDITION . BODY) => evaluate BODY if CONDITION is true."
-  (` (if (not (, condition))  ()  (,@ body))))
-  
 (defun shadow-union (a b)
   "Add members of list A to list B
 if they are not equal to items already in B."
@@ -584,7 +579,7 @@
 			      (car s))))
 		 (find-file-noselect (car s)))))
 	 (to (shadow-expand-cluster-in-file-name (cdr s))))
-    (shadow-when buffer
+    (when buffer
       (set-buffer buffer)
       (save-restriction
 	(widen)
@@ -639,10 +634,10 @@
   (let ((shadows (shadow-shadows-of 
 		  (shadow-expand-file-name 
 		   (buffer-file-name (current-buffer))))))
-    (shadow-when shadows
+    (when shadows
       (setq shadow-files-to-copy
 	    (shadow-union shadows shadow-files-to-copy))
-      (shadow-when (not shadow-inhibit-message)
+      (when (not shadow-inhibit-message)
 	(message "%s" (substitute-command-keys
 		       "Use \\[shadow-copy-files] to update shadows."))
 	(sit-for 1))
@@ -670,23 +665,23 @@
 	(sit-for 3)
 	nil)
     (save-excursion
-      (shadow-when shadow-info-file
+      (when shadow-info-file
 	(set-buffer (setq shadow-info-buffer
 			  (find-file-noselect shadow-info-file)))
-	(shadow-when (and (not (buffer-modified-p))
-			  (file-newer-than-file-p (make-auto-save-file-name)
-						  shadow-info-file))
+	(when (and (not (buffer-modified-p))
+		   (file-newer-than-file-p (make-auto-save-file-name)
+					   shadow-info-file))
 	  (erase-buffer)
 	  (message "Data recovered from %s." 
 		   (car (insert-file-contents (make-auto-save-file-name))))
 	  (sit-for 1))
 	(eval-current-buffer))
-      (shadow-when shadow-todo-file
+      (when shadow-todo-file
 	(set-buffer (setq shadow-todo-buffer 
 			  (find-file-noselect shadow-todo-file)))
-	(shadow-when (and (not (buffer-modified-p))
-			  (file-newer-than-file-p (make-auto-save-file-name)
-						  shadow-todo-file))
+	(when (and (not (buffer-modified-p))
+		   (file-newer-than-file-p (make-auto-save-file-name)
+					   shadow-todo-file))
 	  (erase-buffer)
 	  (message "Data recovered from %s." 
 		   (car (insert-file-contents (make-auto-save-file-name))))
@@ -798,7 +793,7 @@
 ;; This is on hold until someone tells me about a working version of
 ;; map-ynp for Lucid Emacs.
 
-;(shadow-when (string-match "Lucid" emacs-version)
+;(when (string-match "Lucid" emacs-version)
 ;  (require 'symlink-fix)
 ;  (require 'ange-ftp)
 ;  (require 'map-ynp)
@@ -832,8 +827,8 @@
 	(message "Shadowfile information files not found - aborting")
 	(beep)
 	(sit-for 3))
-    (shadow-when (and (not shadow-inhibit-overload)
-		      (not (fboundp 'shadow-orig-save-buffers-kill-emacs)))
+    (when (and (not shadow-inhibit-overload)
+	       (not (fboundp 'shadow-orig-save-buffers-kill-emacs)))
       (fset 'shadow-orig-save-buffers-kill-emacs 
 	    (symbol-function 'save-buffers-kill-emacs))
       (fset 'save-buffers-kill-emacs
@@ -841,8 +836,4 @@
     (add-hook 'write-file-hooks 'shadow-add-to-todo)
     (define-key ctl-x-4-map "s" 'shadow-copy-files)))
 
-;;;Local Variables:
-;;;eval:(put 'shadow-when 'lisp-indent-hook 1)
-;;;End:
-
 ;;; shadowfile.el ends here