The answer to your question would take a pretty good crysal ball to determine. This is a market driven dynamic. As long as it is financially attractive to manufacture these and any other devices, the maker will keep producing them.
It will not be sudden, but it will occur in dribs and drabs over the next two decades. What will be the most popular parts is hard to say but if I had to guess it will be octal buffers and octal flip-flops and latches.
Looking into my Crystal Ball I predict we will be able to make our own simple (under 1000 transistors) chips or equivalents in 20 years, similar to how we make home made PCBs now. There is a lot of experimentation using inkjets to make circuits using organic dyes (organic LEDs and transistors).
Even if it isn't practical for home use, there is a very good chance small houses will spring up that will make small custom runs on demand.
If you go wikipedia for the 7400,when you scroll down to
the breadboard curcuit,click your mouse over the board
and an over lay will appear showing how the curcuits are
arranged with names.
The availability of inexpensive uC's will eventually cause most (if not all) of these 4000/74xx series IC's to go away.
Some of the more useful ones will hang around for quite a while though, particularly items like Schmitt-trigger NANDS and the like. Shift registers will hang on too, as that's an easy way to multiply I/O pins of uC's.
It is interesting to note that many common functions are available in CPLD devices, but parts with 4000 series electrical characteristics are not very popular with the programmable device crowd. In fact I don't think I've ever seen one.