Changeset 7060 for lang/elisp
- Timestamp:
- 02/23/08 12:14:15 (9 months ago)
- Files:
-
- 1 modified
-
lang/elisp/set-perl5lib/set-perl5lib.el (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/elisp/set-perl5lib/set-perl5lib.el
r7047 r7060 36 36 37 37 (defun perllib-check-path (lst lib-path) 38 (let ((dir (car lst)) (lst (cdr lst))) 39 (let ((set-lib-path (concat lib-path "/lib"))) 40 (if lst 41 (if (string= dir "lib") 42 set-lib-path 43 (if (and (string= dir "t") 44 (file-readable-p set-lib-path)) 45 set-lib-path 46 (perllib-check-path lst (concat lib-path "/" dir)))))))) 38 (let ((dir (car lst)) 39 (set-lib-path (concat lib-path "/lib"))) 40 (if (setf stock-lst (cdr lst)) 41 (cond ((string= dir "lib") set-lib-path) 42 ((and (string= dir "t") 43 (file-readable-p set-lib-path)) set-lib-path) 44 (t (perllib-check-path stock-lst (concat lib-path "/" dir))))))) 47 45 48 46 (defun set-perl5lib () 49 47 "set path into PERL5LIB if its file path includes 'lib' directory" 50 48 (interactive) 51 (setf path-list (cdr (split-string buffer-file-name "/")) 52 lib-path (perllib-check-path path-list "")) 53 (if lib-path 54 (let () 55 (setenv "PERL5LIB" lib-path) 56 (message (concat "PERL5LIB=" lib-path))))) 49 (let ((path-list (cdr (split-string buffer-file-name "/")))) 50 (if (setf lib-path (perllib-check-path path-list "")) 51 (let () 52 (setenv "PERL5LIB" lib-path) 53 (message (concat "PERL5LIB=" lib-path)))))) 57 54 58 55 (provide 'set-perl5lib)
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)