Coder Social home page Coder Social logo

Comments (5)

agreselin avatar agreselin commented on July 2, 2024

A bit of context: I'm on Emacs 30.0.50 and I've downloaded two-mode-mode from https://www.dedasys.com/freesoftware/files/two-mode-mode.el. I've managed not to get any warnings or errors with

(setq LaTeX-verbatim-regexp nil)
(defalias 'turn-on-font-lock-if-enabled 'ignore)

The second line is for

Error running timer ‘two-mode-mode-update-mode’: (void-function turn-on-font-lock-if-enabled)

which I got after fixing the error about LaTeX-verbatim-regexp. (Maybe turn-on-font-lock-if-desired instead of ignore would be a better choice?)

Still, I don't know if the mode works as intended. Asymptote code is fontified only if lasy-mode is called from within an asy environment, but then the LaTeX code is unfontified. (featurep 'two-mode-mode) returns t, anyway.

from asymptote.

johncbowman avatar johncbowman commented on July 2, 2024

Make sure you are using the latest version (from about 3 years ago) of https://raw.githubusercontent.com/vectorgraphics/asymptote/HEAD/base/asy-mode.el

The symbol LaTeX-verbatim-regexp is defined on line 1066.

from asymptote.

agreselin avatar agreselin commented on July 2, 2024

Hey John, hi! Thanks for Asymptote, I've seen what it can do and I'm very excited to learn it.

I have the version you linked. Now I don't get the void variable error for LaTeX-verbatim-regexp, there must have been something wrong with my config when I opened this issue, sorry. I still get Error running timer ‘two-mode-mode-update-mode’: (void-function turn-on-font-lock-if-enabled). Also, in lasy-mode Asymptote code is syntax-highlighted correctly but LaTeX code is not, I don't know if this is expected.

I get five Warning: ‘defadvice’ is an obsolete macro (as of 30.1); use ‘advice-add’ or ‘define-advice’. I can translate the defadvice's to the constructs in nadvice.el and send a pull request if you're interested.

from asymptote.

johncbowman avatar johncbowman commented on July 2, 2024

I verified that if you open up latexusage.tex with emacs 28.3, execute lasy-mode and scroll down, syntax highlighting of the LaTeX code is suddenly disabled. Perhaps it has always been this way. If you execute lasy-mode again from within an asy block, you get the (void-function turn-on-font-lock-if-enabled) error. Executing lasy-mode repeatedly outside an asy block will give an args out of range error or the LaTeX-verbatim-regexp error. So apparently these issues have nothing to do with changes in Emacs 30. If you manage to fix these issues, a pull request would be welcome. For now, just execute lasy-mode once and all should be well.

from asymptote.

agreselin avatar agreselin commented on July 2, 2024

Fixing the issue is outside of my immediate possibilities. What I can do is translate the old defadvice's which raise the warning.

from asymptote.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.