Browse Source

Change `org-align-tags-here' into `org--align-tags-here'

* lisp/org.el (org-align-tags-here): Renamed to...
(org--align-tags-here): ... this.

This change emphasizes the fact that, as an internal function, it
shouldn't be used without special care.  This also prevents confusing
between this function and `org-set-tags' called with a non-nil ALIGN
argument.
Nicolas Goaziou 8 years ago
parent
commit
966e0bff56
2 changed files with 5 additions and 5 deletions
  1. 4 4
      lisp/org.el
  2. 1 1
      testing/lisp/test-org.el

+ 4 - 4
lisp/org.el

@@ -14949,7 +14949,7 @@ If ONOFF is `on' or `off', don't toggle but set to this state."
       (run-hooks 'org-after-tags-change-hook))
     res))
 
-(defun org-align-tags-here (to-col)
+(defun org--align-tags-here (to-col)
   "Align tags on the current headline to TO-COL.
 Assume point is on a headline."
   (let ((pos (point)))
@@ -15133,7 +15133,7 @@ When JUST-ALIGN is non-nil, only align tags."
 		   (tags-column
 		    (+ org-tags-column
 		       (if (> org-tags-column 0) (- offset) offset))))
-	      (org-align-tags-here tags-column))))
+	      (org--align-tags-here tags-column))))
         (unless just-align (run-hooks 'org-after-tags-change-hook))))))
 
 (defun org-change-tag-in-region (beg end tag off)
@@ -21280,7 +21280,7 @@ With a non-nil optional argument, join it to the following one."
 	(cond
 	 ((not tags-column))		;no tags
 	 (org-auto-align-tags (org-set-tags nil t))
-	 (t (org-align-tags-here tags-column)))) ;preserve tags column
+	 (t (org--align-tags-here tags-column)))) ;preserve tags column
     (delete-indentation arg)))
 
 (defun org-open-line (n)
@@ -21345,7 +21345,7 @@ object (e.g., within a comment).  In these case, you need to use
 	(cond
 	 ((not (and tags-column string)))
 	 (org-auto-align-tags (org-set-tags nil t))
-	 (t (org-align-tags-here tags-column)))	;preserve tags column
+	 (t (org--align-tags-here tags-column))) ;preserve tags column
 	(end-of-line)
 	(org-show-entry)
 	(if indent (newline-and-indent) (newline))

+ 1 - 1
testing/lisp/test-org.el

@@ -4580,7 +4580,7 @@ Paragraph<point>"
     '((:startgroup) ("group") ("t1") ("t2") (:endgroup)))))
 
 (ert-deftest test-org/tag-align ()
-  "Test `org-align-tags-here' specifications"
+  "Test tags alignment."
   ;; Test aligning tags with different display width.
   (should
    ;;      12345678901234567890