[ESS] Fwd: Default for ess-roxy-str
Kevin Wright
kw@@t@t @end|ng |rom gm@||@com
Thu Oct 25 19:00:13 CEST 2018
Digging more, I found this in ess-r-mode.el
(defun ess-calculate-indent--comments ()
(when ess-indent-with-fancy-comments
(cond
;; ### or #!
((or (looking-at "###")
(and (looking-at "#!")
(= 1 (line-number-at-pos))))
0)
;; Single # comment
((looking-at "#[^#']")
comment-column))))
That last "looking-at" does not treat "#'" as a "Single # comment". I
verified this by enabling fancy comments and auto-indenting this code:
# one hash
## two hash
### three hash
#' rox one hash
##' rox two hash
Note the line with one hash is indented, but not the roxygen one-hash line.
So I think Alex is right, that this is historical and it would now be safe
to set ess-roxy-str default to #'
Kevin
On Thu, Oct 25, 2018 at 11:37 AM Alex Branham <alex.branham using gmail.com>
wrote:
>
> On Thu 25 Oct 2018 at 11:33, Kevin Wright via ESS-help <
> ess-help using r-project.org> wrote:
>
> > Is there some reason that the default value of ess-roxy-str is ##'
> instead
> > of the usual #' ? Could the default value be changed?
>
> My guess is for historical reasons. ESS supports fancy comments where
> the number of comments has meaning (i.e. #, ##, and ### signify
> different things).
>
> I think it's safe to change the default to #' though.
>
> Do note that it does auto-detect if you're already using #' and uses that.
>
> Alex
>
--
Kevin Wright
[[alternative HTML version deleted]]
More information about the ESS-help
mailing list