emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: antlr-mode.el - need some support by python.el


From: Wedler, Christoph
Subject: RE: antlr-mode.el - need some support by python.el
Date: Wed, 18 Feb 2015 15:41:47 +0000

>> Narrowing sucks, so no it's not a viable alternative.

> Do you suppose the submodes will implement prog-indentation-context 
> support using something other than narrowing? It's a powerful approach.

Indeed, in my proposed patch for python.el (1st version), I changed the
call of `widen' by `python-widen' which is defined as follows

(defun python-widen ()
  (widen)
  (when (car python-submode-indentation-context)
    (narrow-to-region (caar python-submode-indentation-context)
                      (or (cdar python-submode-indentation-context)
                          (point-max)))))

> I think I'd rather change the indent-line-function API, to return the 
> column offset. Or add a new one, like `line-indentation-function'.

This would be useful, yes.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]