陈泼杨 <chenpoy...@163.com> writes:

> --------------------------------------------------------------------------------
> (add-to-list 'magic-mode-alist
>                 `(,(lambda ()
>                      (and (equal (file-name-extension buffer-file-name) "h")
>                           (re-search-forward "@\\<interface\\>" 
>                                            magic-mode-regexp-match-limit t)))
>                   . objc-mode))
> --------------------------------------------------------------------------------
>
> still unable to export org file to html:

Your function doesn't handle buffers not associated to a file. You may
want to try

  (and (stringp buffer-file-name)
       (equal "h" (file-name-extension buffer-file-name))
       ...)

Regards,

Reply via email to