;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Code:
You can use following PATH styles:
load-path relative: \"PATH/\"
- (it is searched from `defaul-load-path')
+ (it is searched from `default-load-path')
home directory relative: \"~/PATH/\" \"~USER/PATH/\"
absolute path: \"/HOO/BAR/BAZ/\"
(while rest
(setq p (expand-file-name path (car rest)))
(if (file-directory-p p)
- (throw 'tag p)
- )
- (setq rest (cdr rest))
- ))
- (not (member p load-path))
- )
+ (throw 'tag p))
+ (setq rest (cdr rest))))
+ (not (or (member p load-path)
+ (if (string-match "/$" p)
+ (member (substring p 0 (1- (length p))) load-path)
+ (member (file-name-as-directory p) load-path)))))
(setq load-path
(if (memq 'append options)
(append load-path (list p))
- (cons p load-path)
- ))
- )))
+ (cons p load-path))))))
;;;###autoload
(defun add-latest-path (pattern &optional all-paths)
(let (files)
(catch 'tag
(while suffixes
- (let (suf (car suffixes))
+ (let ((suf (car suffixes)))
(if (and (not (string= suf ""))
(string-match (concat (regexp-quote suf) "$") file))
(progn
;;; @ end
;;;
-(provide 'path-util)
+(require 'product)
+(product-provide (provide 'path-util) (require 'apel-ver))
;;; path-util.el ends here