]> code.delx.au - gnu-emacs/commitdiff
Improved previous change.
authorCarsten Dominik <dominik@science.uva.nl>
Sat, 3 Mar 2007 11:17:49 +0000 (11:17 +0000)
committerCarsten Dominik <dominik@science.uva.nl>
Sat, 3 Mar 2007 11:17:49 +0000 (11:17 +0000)
lisp/textmodes/org.el

index 5cab0fd8f01ba3ec5365acec2c3d454ce4f9ea92..bba5832b0e6804252135af873e3b7c351c880f28 100644 (file)
@@ -11614,20 +11614,20 @@ With prefix ARG, realign all tags in headings in the current buffer."
       (if just-align
          (setq tags current)
        ;; Get a new set of tags from the user
-       (setq table (or org-tag-alist (org-get-buffer-tags))
-             org-last-tags-completion-table table
-             current-tags (org-split-string current ":")
-             inherited-tags (nreverse
-                             (nthcdr (length current-tags)
-                                     (nreverse (org-get-tags-at))))
-             tags
-             (if (or (eq t org-use-fast-tag-selection)
-                     (and org-use-fast-tag-selection
-                          (delq nil (mapcar 'cdr table))))
-                 (org-fast-tag-selection current-tags inherited-tags table)
-               (let ((org-add-colon-after-tag-completion t))
-                 (org-trim
-                  (save-excursion
+       (save-excursion
+         (setq table (or org-tag-alist (org-get-buffer-tags))
+               org-last-tags-completion-table table
+               current-tags (org-split-string current ":")
+               inherited-tags (nreverse
+                               (nthcdr (length current-tags)
+                                       (nreverse (org-get-tags-at))))
+               tags
+               (if (or (eq t org-use-fast-tag-selection)
+                       (and org-use-fast-tag-selection
+                            (delq nil (mapcar 'cdr table))))
+                   (org-fast-tag-selection current-tags inherited-tags table)
+                 (let ((org-add-colon-after-tag-completion t))
+                   (org-trim
                     (completing-read "Tags: " 'org-tags-completion-function
                                      nil nil current 'org-tags-history))))))
        (while (string-match "[-+&]+" tags)