patchGNU Octave - Patches: patch #9026, Automatically close if, for, while...


patch #9026: Automatically close if, for, while etc.

Submitter:  Lachlan Andrew <lachlan>
Submitted:  Fri 10 Jun 2016 10:06:23 AM UTC
Category:  Core : new feature Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  lachlan Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup

Sun 25 Jun 2017 07:35:55 AM UTC, comment #3: 

I have pushed this changeset with

Thanks for the new feature.

Torsten Lilge <ttl>
Group Member
Wed 15 Jun 2016 02:09:54 AM UTC, comment #2: 

Oops!  Here it is.

(file #37481)

Lachlan Andrew <lachlan>
Mon 13 Jun 2016 07:15:26 PM UTC, comment #1: 

Lachlan, I see no attachment :-)

Philip Nienhuis <philipnienhuis>
Group Member
Fri 10 Jun 2016 10:06:23 AM UTC, original submission:  

This patch causes the GUI editor to insert "endif" or "end" after the user types a line starting with "if", if its indent-based heuristics suggest that there isn't already one there.

The choice between "end" and "endif" is configurable, and this feature can be disabled through the Edit->Preferences menu.

Closings are provided for:
if for while function try unwind_protect classdef methods.

This doesn't check that they user typed the "if" (etc) recently. Whenever ENTER is pressed, it checks the start of the line. Normally, the heuristics stop this from producing too many closings.

Lachlan Andrew <lachlan>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #37481:  patch_auto_endif.cset added by lachlan (13KiB - text/x-diff)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by lachlan (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-06-25 ttl StatusNone Done
        Open/ClosedOpen Closed
    2016-07-07 lachlan CategoryNone Core : new feature
    2016-06-15 lachlan Attached File- Added patch_auto_endif.cset, #37481

    Back to the top

    Powered by Savane 3.12