Save and restore the current package for -le and -lel.
This commit is contained in:
		
							parent
							
								
									8b334402ae
								
							
						
					
					
						commit
						05e38a42da
					
				
							
								
								
									
										14
									
								
								scsh/top.scm
								
								
								
								
							
							
						
						
									
										14
									
								
								scsh/top.scm
								
								
								
								
							|  | @ -247,8 +247,10 @@ | ||||||
| 
 | 
 | ||||||
| 	    ((string=? (car switch) "-le") | 	    ((string=? (car switch) "-le") | ||||||
| ;	     (format #t "loading exec file ~s~%" (cdr switch)) | ;	     (format #t "loading exec file ~s~%" (cdr switch)) | ||||||
| 	     (load-quietly (cdr switch) (user-command-environment)) |              (let ((current-package (interaction-environment))) | ||||||
| 	     (lp switches script-loaded?)) |                (load-quietly (cdr switch) (user-command-environment)) | ||||||
|  |                (set-interaction-environment! current-package) | ||||||
|  |                (lp switches script-loaded?))) | ||||||
| 
 | 
 | ||||||
| 	    ((string=? (car switch) "-ll") | 	    ((string=? (car switch) "-ll") | ||||||
| 	     (load-library-file (cdr switch) (lib-dirs) script-file  | 	     (load-library-file (cdr switch) (lib-dirs) script-file  | ||||||
|  | @ -256,9 +258,11 @@ | ||||||
| 	     (lp switches script-loaded?)) | 	     (lp switches script-loaded?)) | ||||||
| 
 | 
 | ||||||
| 	    ((string=? (car switch) "-lel") | 	    ((string=? (car switch) "-lel") | ||||||
| 	     (load-library-file (cdr switch) (lib-dirs) script-file  |              (let ((current-package (interaction-environment))) | ||||||
|                                 (user-command-environment)) |                (load-library-file (cdr switch) (lib-dirs) script-file  | ||||||
| 	     (lp switches script-loaded?)) |                                   (user-command-environment)) | ||||||
|  |                (set-interaction-environment! current-package) | ||||||
|  |                (lp switches script-loaded?))) | ||||||
| 
 | 
 | ||||||
| 	    ((string=? (car switch) "+lp") | 	    ((string=? (car switch) "+lp") | ||||||
|              (lib-dirs-prepend! (cdr switch)) |              (lib-dirs-prepend! (cdr switch)) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 mainzelm
						mainzelm