While I agree a firearm is the prefered method of defense, the question wasn't a debate of that, it was what to use when you couldn't carry a firearm. As far as moving somewhere where you can carry, sometimes that just isn't practical or possible either. To answer the question ask, the staff/strongly built walking staff in even mildly trained hands is a fierce weapon. Get at least some training and get a good one, the advantage is I don't know of anywhere that a plain old walking stick/cane is against the law. There are numerous accounts of folks with a short staff taking out multiple swordsmen.
As far as pepper spray goes, speaking from experience it either works really well or really poorly, there doesn't seem like there is much middle ground. Avoid the fog/spray kind because, I about guarentee that the wind will be in the wrong direction when you need it Go with the stream or foam type OC spray. There is an argument that with the foam they can rake it off and throw it back at you but as a civilian you are not going to engage the bad guy after you have sprayed them anyway, you are going to create distance.
As far as knives go they are also effective but you must be in closer proximity to use them and many jurisidictions place tough restrictions on carrying knives anyway, the same also applies to stun guns.
So go with the walking stick, get some training on how to use it, practice with it and be aware of your surroundings because obviously the best way to deal with those types of situations is to avoid them but that isn't always possible. If you must use your weapon commit 100% to the use of it. Mindset is a key to combat, there are many people carrying handguns that have a false since of security because they have not made the mental commitment to aggressively respond to an attack. I have had many people say that they could never "hurt" anyone, that they only carry the handgun to scare them away. Newsflash folks, most criminals are not afraid of a gun, they are afraid of someone who has a gun, appears to know how to use it, and most importantly while they may not want to use it are willing to. The point of this is the person who is carrying a walking stick and has made the mental commitment to defend themselves without regard to their attacker is better equiped that the timid soul with the finest defensive firearm ever produced.
Stay safe