]> gitweb.factorcode.org Git - factor.git/commitdiff
editors.textadept: use "-e goto_line(n-1)".
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 1 Apr 2013 21:56:24 +0000 (14:56 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 1 Apr 2013 21:56:24 +0000 (14:56 -0700)
(as suggested by Mitchell@foicica.com on the textadept mailing list)

basis/editors/textadept/textadept.factor
misc/textadept/init.lua [deleted file]

index 122c66a1ec5b4e15af12cc0b0abdcc79117ba776..3bf8b232616db1f7837d7e68a42a26f94dee0980 100644 (file)
@@ -7,14 +7,6 @@
 ! published by Sam Hocevar.  Consult http://www.wtfpl.net/txt/copying for full
 ! legal details.
 !
-! For this code to work, the following code needs to be added to the textadept
-! "init.lua" file:
-!
-! function my_goto_line(line)
-!     _G.buffer:goto_line(line - 1)
-! end
-! args.register('-J', '--JUMP', 1, my_goto_line, 'Jump to line')
-!
 ! For more information about Textadept, consult http://foicica.com/textadept/
 
 USING: editors io.launcher io.pathnames io.standard-paths kernel
@@ -47,5 +39,6 @@ M: macosx find-textadept-path
 
 M: textadept editor-command ( file line -- command )
     swap [
-        textadept-path , "-f" , , "-J" , number>string ,
+        textadept-path , "-f" , , "-e" ,
+        1 - number>string "goto_line(" ")" surround ,
     ] { } make ;
diff --git a/misc/textadept/init.lua b/misc/textadept/init.lua
deleted file mode 100644 (file)
index d38e4d4..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
---[[
-Sample init.lua for Textadept with the required "Jump to line" command line
-option for the Textadept support in the Factor distribution.
-
-This program is free software and comes without any warranty, express nor
-implied.  It is, in short, warranted to do absolutely nothing but (possibly)
-occupy storage space.  You can redistribute it and/or modify it under the terms
-of the Do What The Fuck You Want To Public License, Version 2, as published by
-Sam Hocevar.  Consult http://www.wtfpl.net/txt/copying for full legal details.
-]]
-
-_M.textadept = require 'textadept'
-
--- Add a "Jump to line" command line option.
-function my_goto_line(line)
-    _G.buffer:goto_line(line - 1)
-end
-args.register('-J', '--JUMP', 1, my_goto_line, 'Jump to line')