From: Vadim V. Z. <vv...@us...> - 2006-01-03 10:46:40
|
Update of /cvsroot/maxima/maxima/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv649 Modified Files: cl-info.lisp init-cl.lisp Log Message: (1) locale-aware describe. If cl-info::*lang-subdir* is not nil then describe first looks for *.info files in *info-paths* + *lang-subdir* and only if no *.info found in this directory then describe looks in standard *info-paths*. (2) Share subdirs are not nedded in *info-path* since all *.info files go into one directory (translations into subdirectories of this directory). Index: cl-info.lisp =================================================================== RCS file: /cvsroot/maxima/maxima/src/cl-info.lisp,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- cl-info.lisp 17 Dec 2005 21:14:21 -0000 1.28 +++ cl-info.lisp 3 Jan 2006 10:46:29 -0000 1.29 @@ -339,14 +339,28 @@ "search for the first occurrence of a file in the directory list dirs that matches the name name with extention ext" (dolist (dir dirs) - (let ((base-name (make-pathname :device (pathname-device dir) - :directory (pathname-directory dir)))) + (let (base-name base-name-lang) + (setq base-name (make-pathname :device (pathname-device dir) + :directory (pathname-directory dir))) + (when *lang-subdir* + (setq base-name-lang (make-pathname :device (pathname-device dir) + :directory (append (pathname-directory dir) + `(,*lang-subdir*)) ))) (dolist (type extensions) - (let ((pathname (make-pathname :name name + (let (pathname) + (when *lang-subdir* + (setq pathname (make-pathname :name name + :type (if (equalp type "") + nil + type) + :defaults base-name-lang)) + (when (probe-file pathname) + (return-from file-search pathname))) + (setq pathname (make-pathname :name name :type (if (equalp type "") nil type) - :defaults base-name))) + :defaults base-name)) (when (probe-file pathname) (return-from file-search pathname)))))) ;; We couldn't find the file @@ -560,6 +574,7 @@ ) (defvar *default-info-files* '("maxima.info")) +(defvar *lang-subdir* nil) (defun info-aux (x dirs) (loop for v in dirs Index: init-cl.lisp =================================================================== RCS file: /cvsroot/maxima/maxima/src/init-cl.lisp,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- init-cl.lisp 11 Dec 2005 14:21:03 -0000 1.52 +++ init-cl.lisp 3 Jan 2006 10:46:29 -0000 1.53 @@ -219,7 +219,8 @@ ;; subdir = two-char language code ((zl-member language '("es" "pt")) (setq *maxima-lang-subdir* language)) - (t (setq *maxima-lang-subdir* nil))) ))))) + (t (setq *maxima-lang-subdir* nil))))) + (setq cl-info::*lang-subdir* *maxima-lang-subdir*)))) (defun set-pathnames () (let ((maxima-prefix-env (maxima-getenv "MAXIMA_PREFIX")) @@ -302,8 +303,11 @@ (combine-path (list *maxima-symdir* lisp-patterns)) (combine-path (list *maxima-symdir* maxima-patterns)))) (setq cl-info::*info-paths* (list (concatenate 'string *maxima-infodir* "/"))) - (setq L (mapcar #'(lambda (x) (concatenate 'string *maxima-sharedir* "/" x "/")) share-subdirs-list)) - (setq cl-info::*info-paths* (append cl-info::*info-paths* L)) + ;; Share subdirs are not required here since all .info files are installed + ;; in one directory *maxima-infodir* -- there is no info files in share. + ;; vvzhy Jan 2, 2006 + ;(setq L (mapcar #'(lambda (x) (concatenate 'string *maxima-sharedir* "/" x "/")) share-subdirs-list)) + ;(setq cl-info::*info-paths* (append cl-info::*info-paths* L)) ; Look for "foo.info" in share directory "foo". (loop for d in share-subdirs-list do |