From dc27c21ab0d4ad65b64c65bcd46c217718b9930a Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Mon, 1 Apr 2013 14:56:24 -0700 Subject: [PATCH] editors.textadept: use "-e goto_line(n-1)". (as suggested by Mitchell@foicica.com on the textadept mailing list) --- basis/editors/textadept/textadept.factor | 11 ++--------- misc/textadept/init.lua | 18 ------------------ 2 files changed, 2 insertions(+), 27 deletions(-) delete mode 100644 misc/textadept/init.lua diff --git a/basis/editors/textadept/textadept.factor b/basis/editors/textadept/textadept.factor index 122c66a1ec..3bf8b23261 100644 --- a/basis/editors/textadept/textadept.factor +++ b/basis/editors/textadept/textadept.factor @@ -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 index d38e4d467e..0000000000 --- a/misc/textadept/init.lua +++ /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')