Don't fail in magit-describe-item when item is nil.

This commit is contained in:
Marius Vollmer 2008-08-31 00:34:03 +03:00
parent 864248a582
commit 7ad6d4dd55

View file

@ -1305,11 +1305,12 @@ Please see the manual for a complete description of Magit.
(defun magit-describe-item ()
(interactive)
(let ((item (magit-get-item)))
(message "Item: %s %s-%s %S"
(magit-item-type item)
(magit-item-beginning item)
(magit-item-ending item)
(magit-item-info item))))
(if item
(message "Item: %s %s-%s %S"
(magit-item-type item)
(magit-item-beginning item)
(magit-item-ending item)
(magit-item-info item))
(message "No item here"))))
(provide 'magit)