From 0121068dd29661688a58d9e3107d98354e575b3d Mon Sep 17 00:00:00 2001 From: slava Date: Mon, 27 Nov 2006 03:04:08 +0000 Subject: [PATCH] Tiny source file handling cleanup --- TODO.FACTOR.txt | 2 -- contrib/jedit/jedit.factor | 3 --- contrib/vim/vim.factor | 3 --- library/definitions.factor | 2 +- library/generic/methods.factor | 2 +- library/help/topics.factor | 4 ++-- library/modules.factor | 2 +- library/tools/definitions.factor | 4 +--- library/words.factor | 2 +- 9 files changed, 7 insertions(+), 17 deletions(-) diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index 1b2ad4102a..431df4bc55 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -2,8 +2,6 @@ - module operations on module-links, etc - empty search list, handle -- change file, reload it manually, then reload modules; shouldn't this - work? - variable width word wrap - graphical crossref tool - http://paste.lisp.org/display/30426 diff --git a/contrib/jedit/jedit.factor b/contrib/jedit/jedit.factor index d9b61fde06..aee9d116fb 100644 --- a/contrib/jedit/jedit.factor +++ b/contrib/jedit/jedit.factor @@ -35,7 +35,4 @@ namespaces parser prettyprint sequences strings words shells ; : jedit-file ( file -- ) 1array make-jedit-request send-jedit-request ; -: jedit ( defspec -- ) - where first2 jedit-location ; - [ jedit-location ] edit-hook set-global diff --git a/contrib/vim/vim.factor b/contrib/vim/vim.factor index c49e2fa829..ee65a0bee3 100644 --- a/contrib/vim/vim.factor +++ b/contrib/vim/vim.factor @@ -15,7 +15,4 @@ SYMBOL: vim-detach vim-detach get-global [ run-detached ] [ run-process ] if ; -: vim ( spec -- ) - where first2 vim-location ; - [ vim-location ] edit-hook set-global diff --git a/library/definitions.factor b/library/definitions.factor index c12bafa6ef..023904b84d 100644 --- a/library/definitions.factor +++ b/library/definitions.factor @@ -5,7 +5,7 @@ USING: kernel sequences namespaces errors ; GENERIC: see ( defspec -- ) -GENERIC: where* ( defspec -- loc ) +GENERIC: where ( defspec -- loc ) GENERIC: subdefs ( defspec -- seq ) diff --git a/library/generic/methods.factor b/library/generic/methods.factor index f521256e40..7c25018193 100644 --- a/library/generic/methods.factor +++ b/library/generic/methods.factor @@ -46,7 +46,7 @@ TUPLE: check-method class generic ; : implementors ( class -- seq ) [ "methods" word-prop ?hash* nip ] word-subset-with ; -M: method-spec where* +M: method-spec where dup first2 method method-loc [ ] [ second where* ] ?if ; M: method-spec subdefs drop f ; diff --git a/library/help/topics.factor b/library/help/topics.factor index 5691ee28da..4aa621261c 100644 --- a/library/help/topics.factor +++ b/library/help/topics.factor @@ -75,7 +75,7 @@ DEFER: $subsection all-articles [ children ] parent-graph get build-graph ; ! Definition protocol -M: link where* link-name article article-loc ; +M: link where link-name article article-loc ; M: link synopsis* \ ARTICLE: pprint-word @@ -88,7 +88,7 @@ M: link see (see) ; PREDICATE: link word-link link-name word? ; -M: word-link where* link-name "help-loc" word-prop ; +M: word-link where link-name "help-loc" word-prop ; M: word-link synopsis* \ HELP: pprint-word diff --git a/library/modules.factor b/library/modules.factor index 5d8178e2a3..1413f07803 100644 --- a/library/modules.factor +++ b/library/modules.factor @@ -103,7 +103,7 @@ M: module synopsis* M: module definition module>alist t ; -M: module where* module-loc ; +M: module where module-loc ; : module-dir? ( path -- ? ) "load.factor" path+ resource-path exists? ; diff --git a/library/tools/definitions.factor b/library/tools/definitions.factor index a524fcdb00..1ad37b2d58 100644 --- a/library/tools/definitions.factor +++ b/library/tools/definitions.factor @@ -5,9 +5,6 @@ USING: arrays errors generic hashtables io kernel math namespaces parser prettyprint prettyprint-internals sequences styles words ; -: where ( defspec -- loc ) - where* dup [ first2 >r ?resource-path r> 2array ] when ; - : reload ( defspec -- ) where first [ run-file ] when* ; @@ -16,6 +13,7 @@ TUPLE: no-edit-hook ; SYMBOL: edit-hook : edit-location ( file line -- ) + >r ?resource-path r> edit-hook get [ call ] [ throw ] if* ; : edit-file ( file -- ) ?resource-path 0 edit-location ; diff --git a/library/words.factor b/library/words.factor index 4a6493b9d7..b2086a49dc 100644 --- a/library/words.factor +++ b/library/words.factor @@ -188,7 +188,7 @@ TUPLE: check-create name vocab ; all-words [ word-name = ] subset-with ; ! Definition protocol -M: word where* "loc" word-prop ; +M: word where "loc" word-prop ; M: word subdefs drop f ;