summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien <bzg@gnu.org>2018-04-27 01:27:40 +0200
committerBastien <bzg@gnu.org>2018-04-27 01:27:40 +0200
commit67f1a33b4595c7314225bc61223b96be4c64c1f6 (patch)
treeb8f545a413c08bf3ded2807d68c80c2c801d6158
parent8fd176ee767db09ca92d4b8755b692076773071e (diff)
parent60483fbfc3a7c918a9931c77dfafb34d9443e6a2 (diff)
downloadorg-mode-67f1a33b4595c7314225bc61223b96be4c64c1f6.tar.gz
Merge branch 'master' of code.orgmode.org:bzg/org-mode
-rw-r--r--lisp/org.el17
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 0f349e6..ff021fa 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -14212,9 +14212,10 @@ Assume point is on a headline."
(defun org-set-tags-command (&optional arg)
"Set the tags for the current visible entry.
-When called with `\\[universal-argument]' prefix argument ARG,
-realign all tags in headings in the current buffer. If a region
-is active, set tags for all headlines in the region.
+When called with `\\[universal-argument]' prefix argument ARG, \
+realign all tags
+in the current buffer. If a region is active, set tags for
+all headlines in the region.
This function is for interactive use only;
in Lisp code use `org-set-tags' instead."
@@ -14418,10 +14419,12 @@ TODO keywords, should these have keys assigned to them.
If the keys are nil, a-z are automatically assigned.
Returns the new tags string, or nil to not change the current settings."
(let* ((fulltable (append table todo-table))
- (maxlen (apply 'max (mapcar
- (lambda (x)
- (if (stringp (car x)) (string-width (car x)) 0))
- fulltable)))
+ (maxlen (if (null fulltable) 0
+ (apply #'max
+ (mapcar (lambda (x)
+ (if (stringp (car x)) (string-width (car x))
+ 0))
+ fulltable))))
(buf (current-buffer))
(expert (eq org-fast-tag-selection-single-key 'expert))
(buffer-tags nil)