Has the gin when putting the sword away (9)
I believe the answer is:
sheathing
'putting the sword away' is the definition.
I can't tell whether this definition defines the answer.
'has the gin' is the wordplay.
'has the gin' can be anagrammed to 'SHEATHING'.
But, I am not sure how the anagram is indicated.
'when' acts as a link.
Can you help me to learn more?
(Other definitions for sheathing that I've seen before include "putting it in a case" , "protective covering" .)