Couldn't you make specific commands for each type of line you're using?? say something like this:
(defun C:AL ()
(command "ORTHO" "ON" "" "SNAP" ".25" "-LAYER" "M" "A-WIRING" "C" "RED" "" "" "" "LINE" "")
)
and then:
(defun C:VL ()
(command "ORTHO" "ON" "" "SNAP" ".25" "-LAYER" "M" "V-WIRING" "C" "RED" "" "" "" "LINE" "")
)
This way, you type either AL or VL and you're on the correct layer and everything. Then, we can step a little farther and do something along these lines:
(defun C:VL ()
(setq cl (getvar "clayer") ;current layer
cc (getvar "cecolor") ;current color
)
(command "ORTHO" "ON" "" "SNAP" ".25" "-LAYER" "M" "V-WIRING" "C" "RED" "" "" "" "LINE" "")
(if (/= cl)(command "LAYER" "S" cl ""))
(if (/= cc)(command "COLOR" cc))
(princ)
)
where in this one will remember the layer you were on before you started the VL command and switch back to it when you complete the command. The same thing can be done for the ortho and snap settings if you want.
This is the neat thing about Lisp.. You can ask 10 different programmers and they'll come up with 12 different ways (We ALL know Keith and CAD will both submit at least 2 different ways
)
Hope this gives you inspiration.