Well I was wrong… if (0) { … } blocks are ignored, but if (1){ … }  blocks are 
parsed, so this trick cannot be used for tqe compatibility.

I am going to write a patch tonight to fix this: 

- I shall add a variable that can be tested such as if (full) { … }
- and tqe will accept and ignore functions and variables it does not know, only 
generating messages in the *messages* buffer but ignoring the errors instead of 
showing the popup.

tqe needs work: it is not as small as I would like and should still support 
syntax colorization and some other features currently disabled.

Thanks for your feedback.

Chqrlie.

> On 26 Aug 2022, at 21:57, Marc Wilson <posgu...@gmail.com> wrote:
> 
> tqe still bombs on the if () {} block.  It complains about a missing open 
> paren on the variable set line.
> 
> I have:
> 
> if (1) {
>     dired_show_dot_files = 0;
> }
> 
> In there.
> 
> -- 
> Marc Wilson
> posgu...@gmail.com <mailto:posgu...@gmail.com>
> 
> 
> On Fri, Aug 26, 2022, at 12:13 PM, Charlie Gordon wrote:
>> Hello Marc,
>> 
>> Sorry about this inconvenience, tqe should probably use its own 
>> configuration file.
>> The parser used in tqe is very primitive and does not support variables nor 
>> the variable=value syntax
>> it ignores all code in `if (test) { …}` blocks, so you wrap the last line in 
>> a block like this:
>> 
>> if (1) {
>>     dired_show_dot_files = 0;
>> }
>> 
>> and use commands to set the tab-width and the indent-tabs-mode:
>> 
>> set_tab_width(4);
>> set_indent_tabs_mode(0);
>> 
>> I shall modify the default config file to avoid this confusion.
>> 
>> Thanks for your feedback
>> 
>> Best regards
>> 
>> Chqrlie.
>> 
>>> On 26 Aug 2022, at 21:02, Marc Wilson <posgu...@gmail.com 
>>> <mailto:posgu...@gmail.com>> wrote:
>>> 
>>> I have in ~/.qe/config the following:
>>> 
>>> // qemacs config file
>>> 
>>> // simple key definition
>>> // C-key : Control + key
>>> // M-key : Meta + key
>>> // Read util.c to get all the key names
>>> 
>>> global_set_key("C-x s", "set-style");
>>> 
>>> // set colors
>>> 
>>> set_style("mode-line", "background-color", "grey");
>>> set_style("mode-line", "color", "black");
>>> set_style("minibuf","background-color","black");
>>> set_style("minibuf","color","grey");
>>> set_style("status","background-color","black");
>>> set_style("status","color","black");
>>> set_style("default","background-color","262626");
>>> set_style("default","color","grey");
>>> set_style("status","color","white");
>>> set_style("string","color","73f7d7");
>>> set_style("string-q", "color", "73f7d7");
>>> set_style("number", "color", "white");
>>> set_style("keyword","color","ab8bce");
>>> set_style("tag","color","red");
>>> set_style("function","color","8faff2");
>>> set_style("comment", "color", "625e7f");
>>> set_style("variable", "color", "ed92ce");
>>> set_style("type", "color", "a78abf");
>>> set_style("preprocess", "color", "f5b26d");
>>> set_style("error", "color", "red");
>>> 
>>> // set text styling
>>> 
>>> set_style("comment", "font-family", "sans");
>>> set_style("comment", "font-size", "12");
>>> set_style("comment", "font-style", "italic");
>>> set_style("keyword", "font-family", "serif");
>>> set_style("keyword", "font-size", "18");
>>> set_style("function", "font-family", "serif");
>>> set_style("function", "font-size", "18");
>>> set_style("function", "font-weight", "bold");
>>> 
>>> // a post on qemacs-devel says these are defaults, I don't care, make sure
>>> // they are set
>>> 
>>> tab-width = 4;
>>> indent-tabs-mode = 0;
>>> 
>>> // hide dot files by default in dired
>>> dired_show_dot_files = 0;
>>> 
>>> This works fine with qe (big qe? ^_^), but tqe fails out with an error 
>>> message 47, 48, and 51.
>>> 
>>> /Users/mwilson/.qe/config:47: '(' expected
>>> /Users/mwilson/.qe/config:48: '(' expected
>>> /Users/mwilson/.qe/config:51: '(' expected
>>> 
>>> How do I avoid the error?
>>> 
>>> -- 
>>> Marc Wilson
>>> posgu...@gmail.com <mailto:posgu...@gmail.com>

Reply via email to