branch: externals/ess
commit 5b481260b674766aeb16c5f4aa475e252693e073
Author: Christophe Gouel <[email protected]>
Commit: Martin Mächler <[email protected]>

    Change outline stylr name from stars to Org-like
---
 ChangeLog          |  4 ++--
 doc/ess.texi       |  5 +++--
 lisp/ess-custom.el |  4 ++--
 lisp/ess-r-mode.el | 14 +++++++-------
 4 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index dff57a6227..bb8e3d0edd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,8 @@
-2025-12-23 Christophe Gouel <[email protected]>
+2026-01-04 Christophe Gouel <[email protected]>
 
        * lisp/ess-custom.el (ess-r-outline-style) (ess-r-outline-regexp):
        New user option to pick an outline convention (RStudio rulers vs.
-       stars). Remove option ess-r-outline-regexp.
+       Org-like). Remove option ess-r-outline-regexp.
        * lisp/ess-r-mode.el (ess-r-outline-style-alist)
        (ess-r--outline-style-definition)
        (ess-r--outline-style-value)
diff --git a/doc/ess.texi b/doc/ess.texi
index 677c5288e3..91b1942b6d 100644
--- a/doc/ess.texi
+++ b/doc/ess.texi
@@ -3123,9 +3123,10 @@ mode hook:
 @end example
 
 @defvr {User Option} ess-r-outline-style
-Select which outline convention @code{ess-r-mode} should use.  The
+Select which outline convention @code{ess-r-mode} should use. The
 default @code{RStudio} style recognises the comment rulers shown above.
-Choose @code{stars} to match the @samp{### * Section} pattern:
+Choose @code{Org-like} to match the @samp{### * Section} pattern,
+inspired from org-mode:
 
 @example
 ### * Setup
diff --git a/lisp/ess-custom.el b/lisp/ess-custom.el
index ac8aa63464..36d50f9097 100644
--- a/lisp/ess-custom.el
+++ b/lisp/ess-custom.el
@@ -1574,7 +1574,7 @@ by `ess-function-template'."
 (defcustom ess-r-outline-style 'RStudio
   "Outline convention used by `ess-r-mode'.
 Choose between comment rulers like RStudio (\"### Section title ----\")
-and \"stars\" headings \(\"### *** Section title\").
+and \"Org-like\" headings \(\"### *** Section title\").
 
 When using the RStudio outline style, it is recommended to use \(setq
 ess-indent-with-fancy-comments nil) or \(setq ess-style 'RStudio).
@@ -1582,7 +1582,7 @@ Otherwise, single-hash comments are treated as 
right-margin comments
 with `comment-column' 40."
   :group 'ess-R
   :type '(choice (const :tag "RStudio comment rulers" RStudio)
-                 (const :tag "Stars (### *** headings)" stars))
+                 (const :tag "Org-Like (### *** headings)" Org-like))
   :safe #'symbolp)
 
 
diff --git a/lisp/ess-r-mode.el b/lisp/ess-r-mode.el
index 8e57391d60..2a8a0e2a3f 100644
--- a/lisp/ess-r-mode.el
+++ b/lisp/ess-r-mode.el
@@ -303,9 +303,9 @@ namespace.")
   "^[ \t]*#+ +.*\\(?:----\\|====\\|####\\)\\s-*$"
   "R outline Regexp when `ess-r-outline-style' is `RStudio'.")
 
-(defconst ess-r--outline-stars-regexp
+(defconst ess-r--outline-org-like-regexp
   "^\\(?:> \\)?###\\s-+\\(\\*+\\)\\s-+.*$"
-  "R outline regexp used when `ess-r-outline-style' is `stars'.")
+  "R outline regexp used when `ess-r-outline-style' is `Org-like'.")
 
 (defun ess-r--outline-style-definition (&optional style)
   "Return the style definition for STYLE, defaulting to `ess-r-outline-style'."
@@ -325,8 +325,8 @@ namespace.")
         (length (match-string 1))
       1000)))
 
-(defun ess-r--outline-level-stars ()
-  "Compute outline level for `stars` style headings."
+(defun ess-r--outline-level-org-like ()
+  "Compute outline level for `Org-like` style headings."
   (save-excursion
     (beginning-of-line)
     (if (looking-at "^\\(?:> \\)?###\\s-+\\(\\*+\\)\\s-+")
@@ -337,9 +337,9 @@ namespace.")
   `((RStudio
      (outline-regexp . ,ess-r--outline-rstudio-regexp)
      (outline-level  . ,#'ess-r--outline-level-rstudio))
-    (stars
-     (outline-regexp . ,ess-r--outline-stars-regexp)
-     (outline-level  . ,#'ess-r--outline-level-stars)))
+    (Org-like
+     (outline-regexp . ,ess-r--outline-org-like-regexp)
+     (outline-level  . ,#'ess-r--outline-level-org-like)))
   "Mapping between outline styles and their regexp/level helpers.")
 
 (defun ess-r-outline-level ()

Reply via email to