dylan-lang / dylan-emacs-support

Emacs mode for indenting and highlighting Dylan code
GNU General Public License v2.0
27 stars 8 forks source link

When a region is active indent-region should be called to indent the whole region #6

Closed abeaumont closed 11 years ago

cgay commented 11 years ago

What user action should cause this behavior? Based on the doc for indent-region:

indent-region is an interactive compiled Lisp function in `indent.el'.

It is bound to C-M-\.

(indent-region START END &optional COLUMN)

Indent each nonblank line in the region.
A numeric prefix argument specifies a column: indent each line to that column.

With no prefix argument, the command chooses one of these methods and
indents all the lines with it:

  1) If `fill-prefix' is non-nil, insert `fill-prefix' at the
     beginning of each line in the region that does not already begin
     with it.
  2) If `indent-region-function' is non-nil, call that function
     to indent the region.
  3) Indent each line via `indent-according-to-mode'.

Called from a program, START and END specify the region to indent.
If the third argument COLUMN is an integer, it specifies the
column to indent to; if it is nil, use one of the three methods above.

I'm guessing you mean dylan-mode should set indent-regioun-function?

abeaumont commented 11 years ago

Sorry that issue description is crap. What I mean is that when you select a region and hit TAB, the whole region should be indented through indent-region. Currently when you select a region and hit TAB, only current line is indented.

abeaumont commented 11 years ago

Fixed by #8