Yes, provided the lock and closer are compatible. A self-latching lock can be particularly useful because it allows the lock to engage as the closer brings the gate into the closed position. Correct alignment between the lock, keep and gate is important for reliable operation.