GNU bug report logs -
#6086
Provide fundamental-mode-syntax-table
Previous Next
Reported by: Jim Meyering <jim <at> meyering.net>
Date: Mon, 3 May 2010 05:59:02 UTC
Severity: wishlist
Tags: wontfix
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Stefan Monnier wrote:
>> (defun my-_-hook (modename)
>> (add-hook
>> (intern (concat modename "-mode-hook"))
>> `(lambda () (modify-syntax-entry ?_ "w"
>> ,(intern (concat modename "-mode-syntax-table"))))))
>
>> ;;; Treat underscores as word-constituent characters in these modes.
>> (mapcar 'my-_-hook '("c" "c++" "perl" "makefile" "text" "fundamental"
>> "m4" "shell-script" "autoconf"))
>
> In prior versions of Emacs, the "fundamental" entry had no effect at
> all: it just added a function to an unused hook. So the fact that the
> function would fail if it were run was not noticed.
>
>> For now, I've simply removed "fundamental" from the list.
>
> Looks right.
>
>> Is there a better way?
>
> I guess we could provide a
> (defconst fundamental-mode-syntax-table (standard-syntax-table)).
Thanks for explaining.
This bug report was last modified 12 years and 241 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.