lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello, all,

I've used Emacs' lua-mode for a long time and often wondered why '_' was
included in the definition of a word. This is unlike the other
programming language modes I've used.

So I looked at the source and found the following lines in
/usr/share/emacs/site-lisp/lua-mode/lua-mode.el (Linux):

    ;; _ needs to be part of a word, or the regular expressions will
    ;; incorrectly regognize end_ to be matched by "\\<end\\>"!
    (modify-syntax-entry ?_ "w")

I commented out the last line just to see what would happen:

;;    (modify-syntax-entry ?_ "w")

It worked perfectly for me. The handling of "end_" seemed to be correct.
It was not highlighted as a keyword.

Perhaps I've missed something, but it seems to be working for me so I
thought I'd share it.

Doug

-- 
Innovative Concepts, Inc. www.innocon.com 703-893-2007 x220