bug-gnu-emacs
[Top][All Lists]
Advanced

[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: Stefan Monnier
Subject: bug#6086: Symbol's value as variable is void: fundamental-mode-syntax-table
Date: Mon, 03 May 2010 13:34:05 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]