summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2018-04-26 14:16:17 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2018-04-26 14:16:17 +0200
commite2e5495239833034c27de6f21c496fa1b05f5d85 (patch)
tree30161875ce21efa26f929940c4966f8bb15949cb
parent4323db60c5786d708f7dac69a257c0340b372500 (diff)
downloadorg-mode-e2e5495239833034c27de6f21c496fa1b05f5d85.tar.gz
Fix "(wrong-number-of-arguments max 0)" with fast tag selection
* lisp/org.el (org-fast-tag-selection): Fix "(wrong-number-of-arguments max 0)" error when setting tag and no tag is defined.
-rw-r--r--lisp/org.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 600693b..7ed65a6 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -15090,10 +15090,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)