Cannot use "diff" in a function assignment.



Unless you are a good deal more sophisticated, simply do not use define.

Use assignment, for which Maxima uses a colon  (:).

For example,

dm1 :   at( diff(m(x),x), x=1)


although as you have defined m,  diff(m(x),x)  is 0.