jed-users mailing list

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

Re: [jed-users] No tabs in python mode


IIRC the variable name changed at some point. Diff from old and new jed.rc
files...

88c88
< USE_TABS        = 0;    % 0 means always use spaces
---
> TAB             = 0;    % 0 means always use spaces

On Thu, Jan 4, 2024 at 5:52 AM Bernhard Seckinger <
bernhard.seckinger@xxxxxxxxxx> wrote:

> Hi,
>
> I had my jed configured to never ever write a tab-character (at least I
> hoped
> so). Now, recently I had to write a program in python and unfortunately
> python-mode adds tabs. This regularly cobbles up the code (as usual when I
> get
> in touch with a tab character) and the python program cannot be executed
> anymore, due to a mix of tabs and space characters.
>
> Does anyone know a way to make python mode enter 4 spaces instead of a tab
> character? Or is there any other idea, what I can do?
>
> Last resort would be to add an "untab" to the
> "jed_save_buffer_before_hooks",
> but I hope for something better, that avoids the tabs from the very
> beginning.
>
> Yours, Berni
>
> My .jedrc:
>
> define ins_char_for_keycode ()
> {
>     variable code = read_mini ("key code:", "", "");
>
>     insert_char (integer (code));
> }
>
> define keybindings_hook (name)
> {
>     if (name == "emacs")
>     {
>     setkey_reserved("ins_char_for_keycode", "c");
>     }
> }
>
> () = evalfile("emacs");
> enable_menu_keys ();
>
> () = evalfile("regexp");
>
> enable_top_status_line(0);
>
> No_Backups = 0;
> Startup_With_File = -1;
> DISPLAY_TIME = -1;
> HIGHLIGHT = 1;
> WANT_SYNTAX_HIGHLIGHT = 1;
> HORIZONTAL_PAN = -1;
> LINENUMBERS = 2;
> BLINK = 1;
> TAB_DEFAULT = 4;
> USE_TABS = 0;
> Tab_Always_Inserts_Tab = 0;
> WRAP = 78;
> ADD_NEWLINE = 1;
> IGNORE_BEEP = 0;
> WRAP_INDENTS = 0;
> CASE_SEARCH = 1;
> KILL_LINE_FEATURE = 0;
>
> c_set_style("bsd");
> (C_INDENT, C_BRACE, C_BRA_NEWLINE, C_CONTINUED_OFFSET, C_Colon_Offset) =
> (4,4,0,4,2); mute_set_mute_keys("`");
>
> add_mode_for_extension ("java","js");
> add_mode_for_extension ("ps","eps");
> add_mode_for_extension ("c","d");
>
> define my_trim_buffer()
> {
>     push_spot();
>     while (up_1()) { eol_trim(); bol(); }
>     pop_spot();
>     push_spot();
>     while (down_1()) { eol_trim(); bol(); }
>     pop_spot();
> }
>
> add_to_hook("_jed_save_buffer_before_hooks",&my_trim_buffer());
>
> --
> Bernhard Seckinger <bernhard.seckinger@xxxxxxxxxx>
> _______________________________________________
> For list information, visit <http://jedsoft.org/jed/mailinglists.html>.
>
>

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