I'm trying to modify how
asm-mode does its automatic indentation.
I thought I would use the following:
(defun yasm-calculate-indentation (oldfun) "Add the formatting for a few other keywords I like." (cond ((looking-at-p "section") 0) ; section ((looking-at-p "global") 0) ; global ((looking-at-p "extern") 0) ; extern (:default (oldfun)))) (add-hook 'asm-mode-hook (lambda () (advice-add :around #'asm-calculate-indentation #'yasm-calculate-indentation)))
However I'm getting the error:
Unknown add-function location ‘asm-calculate-indentation’
Leaving me rather confused.
Am I adding the hook in the wrong location to be able to access that name?
I tried adding the advice from the minibuffer when editing an assembly file but it gave me the same error.
This is my first time trying to use advice so maybe that's where I'm going wrong... How can I get this to work?