My Octave scripts start with descriptions, like
## -*- texinfo -*-
## @deftypefn {} {} @var{planesource}
##
## This class implements an abstract planar structure
## that functions as a source of waves.
##
## @end deftypefn
If the description is omitted, Emacs uses Octave mode automatically, because I have this code in my ~/.emacs.d/init.el
:
(add-to-list 'auto-mode-alist '("\\.m" . octave-mode))
However, with the TexInfo description, TexInfo mode seems to override Octave mode, even when my Emacs is configured to treat .m
files as Octave files.
How can I make Emacs automatically use Octave mode even in those cases where the description exists and is written in the TexInfo format?