Hi all, I have come across this rather strange variable in org-indent, and was wondering if someone could add a bit of documentation to clarify what it actually does.
Currently, the variable org-hide-leading-stars-before-indent-mode is only documented as "used locally". However, upon closer inspection, the first thing I noticed was that it is actually declared using "defvar" instead of "defvar-local", which in turn would render the docstring redundant as it would automatically append the message "this variable becomes buffer local when set". Is this intentional? Looking at the code it seems to be a throwaway variable remembering the initial value of org-hide-leading-stars, restoring it buffer-locally when indent-mode is turned off. This leaves two questions for me: 1) Wouldn't it be clearer to use defvar-local for org-hide-leading-stars-before-indent-mode and replace the docstring with something like "Holds the original value of `org-hide-leading-stars' before Org indent." 2) Considering that org-hide-leading-stars is global by default, wouldn't it be even better to dispose of the temp variable entirely? One could either use (kill-local-variable 'org-hide-leading-stars) or (setq-local org-hide-leading-stars (default-value 'org-hide-leading-stars)) for the same effect. Cheers, D.