Alexander Burger <[email protected]> writes: Hi Alex,
>> > by looking at it with an editor (sorry, only 'vim' at the moment), >> > >> > : (vi 'insert) >> >> that was another question of mine - what would it take to get a >> >> ,---------------- >> | (emacs 'insert) >> `---------------- >> >> function, and a >> >> ,--------------- >> | (edit 'insert) >> `--------------- >> >> that opens an emacs window? > > Yes, this would be nice to have. I don't know enough about emacs, but > it should be surely possible. > > For the first case, the source of 'vi' (lib/debug.l:162) could be taken > as a template. > > The first expression > > (when (pair "X") > (setq C (cdr "X") "X" (car "X")) ) > > occurs in a similar form in most debugging functions, and extracts a > possible class from the argument(s), i.e. calling (vi 'msg> '+Cls) or > (vi '(msg> . +Cls)) is the same. Then the file and line number is > searched in the '*Dbg' property of that symbol or class: > > (if C > (get C '*Dbg -1 "X") > (get "X" '*Dbg 1) ) ) > > and also maintained in a local static variable "*Vi" for later > (repeated) calls and for 'ld'. > > Then there is some "tags" file handling, don't know what makes > sense for emacs here. > > The real call of 'vim' is > > (call 'vim > (pack "+set tags=" (tmp "tags") ",./tags") > "+set isk=33-34,36-38,42-90,92,94-95,97-125" > (pack "+" (car "*Vi")) > (path (cdr "*Vi")) ) > > Again, some tags fiddling, and the charset for symbols is set in 'isk'. > > The most important part is the argument +123 (if the line number in the > file is 123) and the file's path name in the last two arguments to > 'vim'. Ok, let me think about this, when I fully understand the 'vi' function I might be able to produce an 'emacs' function, its a nice exercise. > 'edit' is far more tricky, because it re-opens itself with additional > symbols which were "click"ed on. Perhaps we should think about it once > 'vi' is ported to 'emacs'. agreed. >> > : (doc 'insert) >> >> gives me this output - is that intended for vim too? (sorry for the long >> lines). >> >> : (doc 'insert) >> 1,02kbloaded->(208730594... > > Dunno. This is strange. > > By default, 'doc' simply calls the 'w3m' browser (if neither a browser > is in the environment variable BROWSER, nor one was passed as a second > argument to 'doc'). I do use w3m and w3m-mode for emacs, and now I exported a new environment variable BROWSER=w3m - and w3m seems to be on the path, since I get the expected output when I type 'w3m' in a shell. But nevertheless I get the same strange output in the emacs inferior *picolisp* buffer. >> > A "signature" in the sense of C or Java is perhaps >> > >> > : (car insert) >> > -> (N Lst X) >> >> That probably what I was looking for. >> >> > i.e. the formal parameters of the function. >> >> Is there is similar method to get the formal parameters of a method? >> >> ,----------------------------------------------- >> | :(class +Shape) >> | -> +Shape >> | >> | :(dm T (X Y) >> | (=: x X) >> | (=: y Y)) >> | -> T >> | >> | :(dm move> (DX DY) >> | (inc (:: x) DX) >> | (inc (:: y) DY)) >> | -> move> >> | >> | :(car move>) >> | !? (car move>) 67291568 -- Variable expected ? >> | >> | : (car 'move>) >> | -> 67291568 >> | >> | : (car insert) >> | -> (N Lst X) >> `----------------------------------------------- > > Yes, you could do > > : (car (method 'move> '+Shape)) > -> (DX DY) > > (as you can do (pp 'move> '+Shape) or (vi 'move> '+Shape)). I see, that works, still (very) much to learn ;) Thanks for you help. Cheers, -- Thorsten -- UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe
