> > (modify-syntax-entry ?\_ "w" st)
>
> Great, that works.
> Since I didn't know what to put in for st, I defined
>
> (defun syntax-table-for-fnord() (modify-syntax-entry ?\_ "w"))
>
I believe that you would use this to modify a modes table
from a mode hook.
(modify-syntax-entry ?\_ "w" (syntax-table))
When writing a mode I usually see it done like this:
(defvar tal-mode-syntax-table
(let ((st (make-syntax-table)))
(modify-syntax-entry ?\n ">" st)
... <zillion other lines snipped>
(modify-syntax-entry ?\_ "w" st)
(modify-syntax-entry ?\{ "." st)
(modify-syntax-entry ?\| "." st)
(modify-syntax-entry ?\} "." st)
st)
"Syntax table for `tal-mode'.")
Then this is in the tal-mode function:
(set-syntax-table tal-mode-syntax-table)
> However, I'd rather have this fix globally. Is there
> a global syntax table that I can use for st in my .emacs?
>
I've never tried to modify the global map so I'm not
sure this is correct but looks to me like it should be.
(modify-syntax-entry ?\_ "w" (standard-syntax-table))
_______________________________________________
Help-gnu-emacs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs