From: Tom Breton (Tehom) Date: Fri, 24 Dec 2010 21:10:15 +0000 (-0500) Subject: Removed all the `force' parameters X-Git-Url: https://repo.or.cz/w/elinstall.git/commitdiff_plain/afa5792c263ff725fe8f5a21f6331d7dd2bd0da0 Removed all the `force' parameters --- diff --git a/elinstall.el b/elinstall.el index 1075ae9..299b5c4 100644 --- a/elinstall.el +++ b/elinstall.el @@ -29,11 +29,14 @@ ;; Entry points: ;; elinstall Use this for overall loading ;; -;; elinstall-arrange-preload - Use this for non-autogenerated -;; files that need to be linked in. - ;; elinstall-update-directory-autoloads ;; elinstall-update-file-autoloads +;; elinstall-update-directory +;; elinstall-update-file + +;; elinstall-arrange-preload - Use this for non-autogenerated files +;; that need to be linked in. Packages are advised to write a spec +;; instead of calling this directly. ;;;_ , Requires @@ -748,7 +751,7 @@ of a single directory." (save-buffer)))) ;;;_ . elinstall-stage-update-deffiles -(defun elinstall-stage-update-deffiles (segment-list force use-load-path) +(defun elinstall-stage-update-deffiles (segment-list use-load-path) "Update any deffiles mentioned in SEGMENT-LIST. FORCE and USE-LOAD-PATH have the same meaning as in `elinstall-update-deffile'. @@ -767,14 +770,12 @@ FORCE and USE-LOAD-PATH have the same meaning as in ;;;_ , Doing actions to arrange preloads ;;;_ . elinstall-symlink-on-emacs-start (defun elinstall-symlink-on-emacs-start - (filename target-basename target-dir &optional priority force) + (filename target-basename target-dir &optional priority) "Symlink to TARGET-BASENAME.el in TARGET-DIR If PRIORITY is given, it will be used as the priority prefix, otherwise elinstall-default-priority will be. -PRIORITY must be an integer or nil. -If FORCE is `t', do it regardless of timestamps etc. -Other non-nil cases of FORCE are reserved for future development." +PRIORITY must be an integer or nil." (let* ( (priority (or priority elinstall-default-priority)) @@ -792,9 +793,6 @@ Other non-nil cases of FORCE are reserved for future development." ((not (file-exists-p target-dir)) (message "The target directory doesn't exist.")) - ;;Target shouldn't already exist, but if force is given, let - ;;user override. - ;;$$IMPROVE ME If it is a symlink pointing to the same place, ;;do nothing. @@ -814,7 +812,7 @@ Other non-nil cases of FORCE are reserved for future development." nil))))) ;;;_ . elinstall-add-to-dot-emacs -(defun elinstall-add-to-dot-emacs (dot-emacs-name filename force &rest r) +(defun elinstall-add-to-dot-emacs (dot-emacs-name filename &rest r) "Add code to load FILENAME to .emacs. FILENAME should not have an extension" @@ -831,9 +829,8 @@ FILENAME should not have an extension" ;;;_ . elinstall-arrange-preload ;;;###autoload -(defun elinstall-arrange-preload (force filename basename &optional priority) +(defun elinstall-arrange-preload (filename basename &optional priority) "Arrange for FILENAME to be loaded on emacs start. -FORCE has its usual meaning. BASENAME and PRIORITY are used as arguments to `elinstall-symlink-on-emacs-start'. " @@ -844,16 +841,16 @@ BASENAME and PRIORITY are used as arguments to ;;Dispatch the possibilities. (cond ((eq preload-target 'dot-emacs) - (elinstall-add-to-dot-emacs "~/.emacs" filename force)) + (elinstall-add-to-dot-emacs "~/.emacs" filename)) ((stringp preload-target) (elinstall-symlink-on-emacs-start - filename basename preload-target priority force)) + filename basename preload-target priority)) ((null preload-target) (message "Not arranging for preloads")) (t (message "I don't recognize that"))))) ;;;_ . elinstall-stage-arrange-preloads -(defun elinstall-stage-arrange-preloads (actions deffiles-used force) +(defun elinstall-stage-arrange-preloads (actions deffiles-used) "Arrange any preloads mentioned in ACTIONS." (mapcar @@ -873,7 +870,6 @@ BASENAME and PRIORITY are used as arguments to (when proceed-p (apply #'elinstall-arrange-preload - force (cddr act))))) (t (error @@ -1343,7 +1339,7 @@ Recurse just if RECURSE-DIRS-P" ;;;_ . elinstall-find-actions-by-spec (defun elinstall-find-actions-by-spec - (spec load-path-element dir def-file redo-old) + (spec load-path-element dir def-file) "Find the list of actions to do according to SPEC." (let @@ -1384,7 +1380,7 @@ Recurse just if RECURSE-DIRS-P" #'car (elinstall-stages->build-deffiles stages))) ;;;_ , elinstall-x -(defun elinstall-x (dir spec &optional force) +(defun elinstall-x (dir spec) "High-level worker function to install elisp files." (let* ( @@ -1396,8 +1392,7 @@ Recurse just if RECURSE-DIRS-P" spec nil dir - def-file - (eq force 'redo-old))) + def-file)) (stages (elinstall-segregate-actions actions)) (use-load-path (elinstall-get-relevant-load-path @@ -1405,12 +1400,10 @@ Recurse just if RECURSE-DIRS-P" (elinstall-stage-update-deffiles (elinstall-stages->build-deffiles stages) - force use-load-path) (elinstall-stage-arrange-preloads (elinstall-stages->arrange-preloads stages) - (elinstall-get-deffile-list stages) - force) + (elinstall-get-deffile-list stages)) (elinstall-stage-byte-compile (elinstall-stages->byte-compile stages)) t)) @@ -1427,8 +1420,7 @@ Recurse just if RECURSE-DIRS-P" (elinstall-already-installed project-name)) (elinstall-x path - `(def-file "loaddefs.el" (if-used ,project-name) ,spec) - force) + `(def-file "loaddefs.el" (if-used ,project-name) ,spec)) (elinstall-record-installed project-name version-string))) ;;;_ , Entry points