dieter-wilhelm / apdl-mode

An Emacs mode for investigating and coding APDL (Ansys Parametric Design Language). Its full documentation is on:
http://dieter-wilhelm.github.io/apdl-mode
41 stars 7 forks source link

Newly created parameter color does not update #15

Closed Jonwyck closed 2 years ago

Jonwyck commented 2 years ago

Newly created parameter highlight does not work sometimes.

so the parameter color should change in order to distinguish itself with other words. when I was creating a new parameter, its color changes in its definition line. However, in the next line, I then type the same parameter name again. the color does not change until I reopen this document.

Desktop (please complete the following information): windows 10, Emacs 27.1. I installed APDL-Mode from Melpa.

dieter-wilhelm commented 2 years ago

Thanks for the report. I can't reproduce this with the latest apdl-mode 20211017.1548.

Please type "M-x apdl " and define in this temporary Emacs "buffer" some variables. Normally apdl-mode is telling you "Dynamic highlighting of user variables activated". And then the variables are colourised dynamically, as you type. But for files this is per default only working for file names ending in ".mac" or ".inp"!

You can see it on the values of apdl-dynamic-highlighting-flag (should be t) and apdl-highlighting-level (should be 2). Emacs tells you their values when typing "C-h v" and then typing above names in the minibuffer (you can complete the names with the key).

Jonwyck commented 2 years ago

the version number I am using is 20.7.0. yes, if type "M-x apdl", the dynamic highlighting is working fine. but it does not work when I open and edit my ".inp" file. like abc= 123 ! abc highlighs correctly efg= abc ! abc fails to highlight

I checked the two values, they are correct.

dieter-wilhelm commented 2 years ago

the version number I am using is 20.7.0. yes, if type "M-x apdl", the dynamic highlighting is working fine. but it does not work when I open and edit my ".inp" file. like abc= 123 ! abc highlighs correctly efg= abc ! abc fails to highlight

Ah, now I can reproduce the issue and have already removed this unnecessary restriction in the latest version on Melpa.
Thank you for reporting it and please check if it is now working satisfactory for you!

Jonwyck commented 2 years ago

it is working now. Thank you for the fix!