From 966e0bff56667e11c9df055d03ae08de6ddcd594 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 5 Oct 2016 11:54:49 +0200 Subject: [PATCH] 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. --- lisp/org.el | 8 ++++---- testing/lisp/test-org.el | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 18b58a4f8..6d5201b1a 100644 --- a/lisp/org.el +++ b/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)) diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el index f697b4286..56ccfd621 100644 --- a/testing/lisp/test-org.el +++ b/testing/lisp/test-org.el @@ -4580,7 +4580,7 @@ Paragraph" '((: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 -- 2.11.4.GIT