diff options
author | Bastien Guerry <bzg@altern.org> | 2012-01-20 15:44:16 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-01-20 15:44:16 +0100 |
commit | d447fe879284a40905103fcffde437bb799d27fa (patch) | |
tree | e9f0239259024a420c955c7fc85eb966c94600f4 | |
parent | bded90ba488a723943dc50e777b1e30e648efc11 (diff) | |
download | org-mode-d447fe879284a40905103fcffde437bb799d27fa.tar.gz |
org.el: Make ̀C-u C-c C-q' do the right thing even when point is before the first heading.
* org.el (org-set-tags-command, org-set-tags): Make ̀C-u C-c
C-q' do the right thing even when point is before the first
heading.
Thanks to François Pinard for mentioning this.
-rw-r--r-- | lisp/org.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/org.el b/lisp/org.el index c93b7b2..87b2c3e 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -13273,7 +13273,7 @@ If ONOFF is `on' or `off', don't toggle but set to this state." (defun org-set-tags-command (&optional arg just-align) "Call the set-tags command for the current entry." (interactive "P") - (if (org-at-heading-p) + (if (or (org-at-heading-p) (and arg (org-before-first-heading-p))) (org-set-tags arg just-align) (save-excursion (org-back-to-heading t) @@ -13327,7 +13327,7 @@ If DATA is nil or the empty string, any tags will be removed." With prefix ARG, realign all tags in headings in the current buffer." (interactive "P") (let* ((re org-outline-regexp-bol) - (current (org-get-tags-string)) + (current (unless arg (org-get-tags-string))) (col (current-column)) (org-setting-tags t) table current-tags inherited-tags ; computed below when needed |