Browse Source

org-agenda.el (org-agenda-dim-blocked-tasks): Only throw a message when called interactively

* org-agenda.el (org-agenda-dim-blocked-tasks): Only throw a
message when called interactively.  Fix docstring position in
the defun.
Bastien Guerry 12 years ago
parent
commit
5127f56790
1 changed files with 3 additions and 2 deletions
  1. 3 2
      lisp/org-agenda.el

+ 3 - 2
lisp/org-agenda.el

@@ -3792,9 +3792,10 @@ generating a new one."
 	(overlay-put ov 'org-type 'org-priority)))))
 
 (defun org-agenda-dim-blocked-tasks (&optional invisible)
-  (interactive "P")
   "Dim currently blocked TODO's in the agenda display."
-  (message "Dim or hide blocked tasks...")
+  (interactive "P")
+  (when (org-called-interactively-p 'any)
+    (message "Dim or hide blocked tasks..."))
   (mapc (lambda (o) (if (eq (overlay-get o 'org-type) 'org-blocked-todo)
 			(delete-overlay o)))
 	(overlays-in (point-min) (point-max)))