Dr. Habib above makes two fundamental error : a) He assumes that India much before the British had become a proper country with the Foreign-origin Turks , Persian & later Mughals (people whom in all my posts here I will refer to as supercastes) being the centre of Indian National consciousness. It fails to realize that the importance of these communities had their cultural influences only limited to Delhi & the surrounding areas on Hindus & Muslims living there. They ruled India indirectly through local Kings who were more culturally & linguistically linked to their subjects. This included Rajputs (both Hindus & Muslims) , Jats ( Hindus & Sikhs) ,Pathans in North & similarly Nairs in Kerala , Ahoms in Assam etc They were nevertheless centre to Indian Muslim-nationalism & part of Pan-Indian Muslim identity beginning 1800s but not non-Muslims all over India.
b) He also equates usage of Shivaji by Tilak against British as expression of Hindu nationalism( just bcz Shiv Sena does it today). Shivaji is as integral to Marathi identity as ZainulAbideen of the Kashmiri , Rana Pratap of Rajasthani , Talpur Mirs of Sindhi ,Tipu Sultan of Karnataka, Rajaraja Chola for Tamil identity & henceforth . India became a nation only on 15 August 1947 but Regional nationalities on the basis of common languages & the National Consciousness that pioneers of Indian nationalism like Lal-Bal-Pal had to invoke Regional Folks & Legends to initiate the Nationalism process. The biggest drawback of this process was that only hindu legends were invoked as the trio were hindus (& thus were not much aware about local muslim legends) & much of the Muslim participation to Freedom movement only happened after the Non-Cooperatation - Khilafat Movement of 1921.
Prof. Habib’s writings often end up giving much importance to the Supercaste muslims than the uppercaste muslims (Indian uppercastes like Rajput,Jat,Gujjar) or lower caste muslims (Pasmanda, Kammis ,Momin Ansaris etc) . The Uppercaste muslims ruled parts of India directly like their pre-Islamic ancestors or Hindu counterparts , they spoke the local languages & were indigenous unlike the Supercastes who spoke Farsi & Turki. The dominance of the Foreign-origin Muslim narrative over the Native muslim narrative helped in creating the idea of “the other” between lower caste Hindus & lower caste muslims , upper caste Muslims & Hindus