diff options
author | memeplex <carlosjosepita@gmail.com> | 2019-02-22 00:32:58 -0300 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2019-02-22 19:54:58 +0100 |
commit | 029cf66f01b0bf6eb868a1f33d1e1279f2d250bb (patch) | |
tree | a2ca5cc257023c89d3da28e63f1e94b70eb9e2b0 | |
parent | b0932f703e949fc458d8f106ceff0041d6d7ddb8 (diff) | |
download | org-mode-029cf66f01b0bf6eb868a1f33d1e1279f2d250bb.tar.gz |
org-agenda: don't show trailing color if no matcher
* lisp/org-agenda.el (org-agenda-get-restriction-and-command):
when no matcher was specified there is no point in showing
a trailing colon (and space).
-rw-r--r-- | lisp/org-agenda.el | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 0e7ce1d..c5669c8 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -3026,19 +3026,18 @@ s Search for keywords M Like m, but only TODO entries (symbol-name type) "Lambda expression")) (t "???")))) - (if org-agenda-menu-show-matcher - (setq line - (concat line ": " - (cond - ((stringp match) - (setq match (copy-sequence match)) - (org-add-props match nil 'face 'org-warning)) - ((listp type) - (format "set of %d commands" (length type)))))) - (when (org-string-nw-p match) - (add-text-properties - 0 (length line) (list 'help-echo - (concat "Matcher: " match)) line))) + (cond + ((not (org-string-nw-p match)) nil) + (org-agenda-menu-show-matcher + (setq line + (concat line ": " + (cond + ((stringp match) + (propertize match nil 'face 'org-warning)) + ((listp type) + (format "set of %d commands" (length type))))))) + (t + (org-add-props line nil 'help-echo (concat "Matcher: " match)))) (push line lines))) (setq lines (nreverse lines)) (when prefixes |