[ESS] fill-paragraph on documentation in ESS/julia
tkp@pp @end|ng |rom gm@||@com
Fri Apr 8 12:19:40 CEST 2016
Thanks. I got this far:
(defun julia-fill-string ()
(let* ((p (point))
(when (fourth s) ; inside a string
(let ((start (ninth s))
(end (MISSING PIECE)))
(ess-blink-region start end)
(fill-region start end nil nil nil)))))
but I don't know what's the simple way of finding the end of a string,
preferably using the syntax table (MISSING PIECE in the code above). I
could, of course, go to the beginning, determine if it is """ or ", then
find it later on, but I am wondering if there is a better way.
On Thu, Apr 07 2016, Lionel Henry wrote:
> Hi Tamas,
> There has been some work to make fill-paragraph work better within
> ROxygen commands and with R code (it can reorganise arguments list of
> function and expressions separated by operators).
> It's currently activated in a dodgy advice. See
> I think we should make a key substitution for "M-q" in ess-mode.el.
> This would call `ess-fill-paragraph`, which would dispatch to a
> `ess-fill-paragraph-function` that could be defined in each language.
> This way you'll be able to implement your own modifications for Julia
> mode. If you manage to write such a function, please send a pull
> request and we'll set up the dispatching mechanism.
More information about the ESS-help