Subject: Re: bug#6086: Symbol's value as variable is void: fundamental-mode-syntax-table

From: Stefan Monnier <[email-masked]>
Date: Mon, 03 May 2010 13:34:05 -0400

>     (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)).

        Stefan