 	(require-file-path path #'file-regular-p 'file parent) )
 (defun require-dir (path &optional parent)
 	(require-file-path path #'file-directory-p 'directory parent) )
-
-(defun ngender-a-string (x)
-	"given a string, a symbol or a quoted string or symbol, just provide a string - handy for macros"
-	(cond
-		( (stringp x) x )
-		( (symbolp x) (symbol-name x) )
-		( (and (consp x) (eq 'quote (car x)))
-			(ngender-a-string (cadr x)) ) ) )
 
 ;; (mapcar #'ngender-a-string
 ;;  '("foo" foo 'foo) )


(defun ngender-emacs-path-add (dir-path)
	"ensure directory path is on emacs load-path"
	(if (eq symbol 'load-path) (message "load-path += %S" dir-path))
	(if (numberp (car load-path)) (message "loadpath.0 = %d" (car load-path)))
	(when (ngender-validate dir-path #'file-directory-p "directory")
		(ngender-update-union-with-bags 'load-path dir-path) ) )

(defmacro ngender-emacs-path (dir-name parent-path-symbol)
	`(ngender-emacs-path-add (expand-file-name ,(ngender-a-string dir-name) ,parent-path-symbol)) )

"*ngender-load-path* will be reconstructed from these sublists, deduped, left-to-right" )

(defun ngender-rebuild-load-path ()
  "rebuild *ngender-load-path* with elements of lists named in *ngender-path-lists* appearing in front in order"
	(let* ( (new-list (apply #'append (mapcar #'symbol-value *ngender-path-lists*)) )
		( new-path (delete-dups new-list) ) )
	(ngender-debug-warn t "*ngender-load-path* = %S" new-path)
	(setq *ngender-load-path* new-path) ) )

;; (ngender-rebuild-load-path)

(defun ngender-path-dirs (symbol paths)
	"add directory paths to the front of the list named by
symbol and rebuild *ngender--load-path-"
	(ngender-debug-warn t "%s += %S" symbol paths)
	(set symbol (ngender-filter-dirs paths))
	(ngender-rebuild-load-path) )

