Since shocking grasp is such a staple for the Magus, the magical lineage trait seems like a no-brainer for that spell. Then just take the elemental spell metamagic feat to adjust your damage type, keeping a couple of copies around of each type (in this case shocking / acid?). Later you can pick up preferred spell (shocking grasp) at 5 (with heighten spell as a pre-req) to then be able to instantly drop a 1st level spell for shocking (and/or acid) grasp or intensified shocking grasp or a second level spell slot for both on the fly. More elemental spell feats nets you more damage types, all using that ubiquitous spell slot. Kind of feat intensive but it may be worth it for the versatility.

So build wise you are looking at this (as an example):

Human Magus:
Magical Lineage (Shocking Grasp)
1st: Heighten spell, elemental spell (acid)
3rd: Elemental spell (frost or whatever)
5th: Preferred spell (Shocking grasp), Intensified Spell

This way you're never out of your favorite combat spell (which is now the much more versitile acid/frost/shocking grasp) but can still memorize other spells in those slots to drop if necessary.

If you **REALLY** want to specialize, pick up a couple more metamagics (empower, maximize etc.) to keep filling those higher level slots since with preferred spell you can add metamagic on the fly. Fighting a red dragon, then drop any fifth level spell for a maximized intensified frost grasp.

*Edit to add intensified spell as 5th level bonus magus feat.