[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6086: Symbol's value as variable is void: fundamental-mode-syntax-ta
From: |
Jim Meyering |
Subject: |
bug#6086: Symbol's value as variable is void: fundamental-mode-syntax-table |
Date: |
Mon, 03 May 2010 19:44:03 +0200 |
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.