"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "TeXmacs/progs/part/part-menu.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.

part-menu.scm  (TeXmacs-1.99.4-src):part-menu.scm  (TeXmacs-1.99.5-src)
skipping to change at line 23 skipping to change at line 23
(texmacs-module (part part-menu) (texmacs-module (part part-menu)
(:use (generic document-part) (:use (generic document-part)
(part part-tmfs))) (part part-tmfs)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Useful subroutines ;; Useful subroutines
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define (goto-include buf incl) (define (goto-include buf incl)
(let* ((old (url->unix buf)) (load-buffer (part-url buf (url-relative buf incl))))
(new (string-append "tmfs://part" old "/" incl)))
(load-buffer new)))
(define (drop-tmfs-data u)
(with s (url->string u)
(if (string-starts? s "tmfs://part/")
(unix->url (string-drop s (string-length "tmfs://part")))
u)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; The dynamic document part menu ;; The dynamic document part menu
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(menu-bind document-master-menu (menu-bind document-master-menu
(if (buffer-has-preamble?) (link preamble-menu)
("Show preamble" (buffer-set-part-mode :preamble)))
(if (not (buffer-has-preamble?))
("Create preamble" (buffer-make-preamble)))
("Show main document" (buffer-set-part-mode :all))
--- ---
(for (incl (buffer-get-includes)) (for (incl (buffer-get-includes))
((eval incl) (goto-include (current-buffer) incl)))) ((eval incl) (goto-include (current-buffer) incl))))
(menu-bind document-part-menu (menu-bind document-part-menu
(:require (url-rooted-tmfs-protocol? (current-buffer) "part")) (:require (url-rooted-tmfs-protocol? (current-buffer) "part"))
(let* ((u (drop-tmfs-data (current-buffer))) (let* ((name (part-open-name (current-buffer)))
(m (part-master u)) (m (part-master name))
(f (part-file u)) (f (part-file name))
(t (tree-import m "texmacs")) (t (tree-import m "texmacs"))
(b (tmfile-get t 'body)) (b (tmfile-get t 'body))
(l (tm-get-includes b))) (l (tm-get-includes b)))
((eval (url->string (url-tail m))) (load-buffer m)) ((eval (url->string (url-tail m))) (load-buffer m))
--- ---
(for (incl l) (for (incl l)
((eval incl) (goto-include m incl))))) ((eval incl) (goto-include m incl)))))
 End of changes. 3 change blocks. 
17 lines changed or deleted 5 lines changed or added

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