"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "TeXmacs/progs/prog/scheme-autocomplete.scm" between
TeXmacs-1.99.4-src.tar.gz and TeXmacs-1.99.5-src.tar.gz

About: GNU TeXmacs is a what-you-see-is-what-you-get scientific text editor, which was both inspired by TeX and GNU Emacs.

scheme-autocomplete.scm  (TeXmacs-1.99.4-src):scheme-autocomplete.scm  (TeXmacs-1.99.5-src)
skipping to change at line 25 skipping to change at line 25
;; tree of all publicly defined symbols. Things TO-DO are: ;; tree of all publicly defined symbols. Things TO-DO are:
;; ;;
;; - Truly index all code with an indexer, instead of patching scheme's read. ;; - Truly index all code with an indexer, instead of patching scheme's read.
;; - Be aware of context: create new ptrees on the fly based on the ;; - Be aware of context: create new ptrees on the fly based on the
;; environment. This needs online parsing and will be difficult. ;; environment. This needs online parsing and will be difficult.
;; - Suggest parameters in function calls. ;; - Suggest parameters in function calls.
;; - Provide an alternative interface using (non-modal) popups or greyed out ;; - Provide an alternative interface using (non-modal) popups or greyed out
;; text after the cursor. ;; text after the cursor.
;; - Add a layer decoupling from the specific scheme implementation for ;; - Add a layer decoupling from the specific scheme implementation for
;; better portability. ;; better portability.
;; - During compile time build lists of symbols exported in the glue and
;; add them to the completions tree.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(texmacs-module (prog scheme-autocomplete) (texmacs-module (prog scheme-autocomplete)
(:use (utils library ptrees))) (:use (utils library ptrees) (prog glue-symbols)))
(define completions (make-ptree)) (define completions (make-ptree))
; Subroutine for all-used-symbols ; Subroutine for all-used-symbols
(define (obarray-fold-sub module prev) (define (obarray-fold-sub module prev)
(with mi (module-public-interface module) (with mi (module-public-interface module)
(append (append
(map (map
(lambda (x) (symbol->string (car x))) (lambda (x) (symbol->string (car x)))
(list-filter (list-filter
skipping to change at line 67 skipping to change at line 65
(tm-define (scheme-completions-add str) (tm-define (scheme-completions-add str)
(set! completions (pt-add completions str))) (set! completions (pt-add completions str)))
(tm-define (scheme-completions-add-list lst) (tm-define (scheme-completions-add-list lst)
(set! completions (pt-add-list completions lst))) (set! completions (pt-add-list completions lst)))
(tm-define (scheme-completions-rebuild) (tm-define (scheme-completions-rebuild)
(display "Texmacs] Populating autocompletions tree... ") (display "Texmacs] Populating autocompletions tree... ")
(let ((start (texmacs-time)) (let ((start (texmacs-time))
(symbols (all-used-symbols))) (symbols (append (all-used-symbols) (all-glued-symbols))))
(scheme-completions-add-list symbols) (scheme-completions-add-list symbols)
;(scheme-completions-add-list (all-glued-symbols))
(display* (length symbols) " symbols in " (display* (length symbols) " symbols in "
(- (texmacs-time) start) " msec\n") (- (texmacs-time) start) " msec\n")
(set! scheme-completions-built? #t))) (set! scheme-completions-built? #t)))
(tm-define (scheme-completions-dump) (tm-define (scheme-completions-dump)
(pt-words-below (pt-find completions ""))) (pt-words-below (pt-find completions "")))
(tm-define (scheme-completions root) (tm-define (scheme-completions root)
(:synopsis "Provide the completions for @root as needed by custom-complete") (:synopsis "Provide the completions for @root as needed by custom-complete")
`(tuple ,root `(tuple ,root
 End of changes. 4 change blocks. 
5 lines changed or deleted 2 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS