jed-users mailing list

[2012 Date Index] [2012 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [Jed-users-l] .jedrc woes


Mike McClain <mike.junk@xxxxxxxxxxx> wrote:
>     Thanks for those answers, pardon me if I still have questions.

No problem -- that is what the list is for,

>     I found 'begin_macro' and 'end_macro' assigned to separate keys
> in some of the modes but when I tried to setup a function to toggle as:
>
> define macro_toggle ()
>{   !if (DEFINING_MACRO)
>    {   begin_macro ();
>    {
>     else
>    {   end_macro ();
>    }
>}
>
> I get 'begin_macro is undefined', so what is begin_macro?

It is a so-called internal-function, and must be executed using the
"call" function.  See #5 in the jed_faq.txt file in the distribution.
If jed is properly installed on your system, you can access this
document via the "Help->Browse Docs" menu item.

> I see statements like these and don't understand them:
>
> () = function ();

The above means that "function" returns a value, but you do not care
what the value is.  So you assign it to "nothing"; otherwise it will
be left on the stack.

> variable = ();

This removes a value from the stack and assigns it the the variable.
The thing is remember is that the slang stack is a data-structure that
can be exploited for efficiency.  I always regarded this as a useful
feature, but many people trip on it.  If I were to do it over
again I would eliminate it, or do it differently.  In any case, see
section 9.9 ("Handling Return Values from a Function") of
<http://www.jedsoft.org/slang/doc/html/slang-9.html>.

--John

_______________________________________________
Jed-users-l mailing list
Jed-users-l@xxxxxxxx
http://mailman.jtan.com/mailman/listinfo/jed-users-l


[2012 date index] [2012 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]