New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
verilog-sk-* skeletons activated automatically as I type #1102
Comments
Original Redmine Comment +After some investigation:+ Tried to do something like that:
Where @inside-comment-q@ is (seems to work fine):
Didn't work... It's still evoking the skeleton. |
Original Redmine Comment I can see how this would be useful. Alas the skeletons use the standard Emacs packages, rather than code in verilog-mode itself. I looked at a few modes and none seem to stop expansion on comments, nor could I find an easy way to provide this; all I could find was one forum post which showed a very complicated way which wouldn't be maintainable. If you find a way to cleanly solve this please let us know and we'll look at adding the code to verilog-mode. Sorry. |
Original Redmine Comment Wilson Snyder wrote:
Hi. I had some time to play a bit with the conditional skeleton expansion and I think that there is a reasonble solution:
What do you think? |
Original Redmine Comment Seems a reasonable track. Functions in verilog-mode have to start with verilog, so e.g. instead of context-abbrev-verilog-sk-if use verilog-context-abbrev-sk-if You can try using verilog-inside-comment-or-string-p instead of the other functions, which should not move the point. Please also make a new defvar, e.g. verilog-sk-inside-comments which is used inside your function to select if the function simply behaves as before (t), or checks for comments (nil). That way if something breaks it can be easily disabled. If you get it all working, please put it into a patch file and I'll review and we can get it merged upstream, thanks for experimenting. |
Original Redmine Comment Hi. Here is my "primitive" version of the skeleton wrapper function, which works fine:
Few points:
|
Original Redmine Comment If you'd like your patch merged in, could you please make your patch relative to the latest verilog-mode.el (from git or download here) and I'll try to merge it in. |
Original Redmine Comment Wilson Snyder wrote:
Here is the latest verilog-mode.el with the aforementioned additions |
Original Redmine Comment Fixed in git and verilog-mode-2017-02-12-224d7a2-vpo Attached is the patch I cleaned up if it's historically valuable. But then I found out there was a global way to suppress expansion starting in Emacs 23.1 which is what it now calls. Sorry I didn't know about this earlier. |
Author Name: Slava Yuzhaninov
Original Redmine Issue: 1102 from https://www.veripool.org
Original Assignee: Slava Yuzhaninov
Hi.
When I code in verilog in Emacs, the verilog-mode +automatically+ expands various skeletons like loops, condition statements, etc. (part of Statements menu tab). The skeletons are great of course, but the problem is that they are expanded even if I'm in the middle of a comment. For example writing "for", "if", "case", "task" words leads to activation of the skeleton, breaking the typing process.
I didn't find a way to disable this automatic behaviour in the "Customise Verilog-mode" nor inside the verilog-mode.el itself. Any suggestions?
The text was updated successfully, but these errors were encountered: