[26985] in Athena Bugs
emacs clu-mode auto-mode-alist buglet
daemon@ATHENA.MIT.EDU (John Hawkinson)
Sat Oct 14 14:07:19 2006
Date: Sat, 14 Oct 2006 14:05:53 -0400 (EDT)
Message-Id: <200610141805.k9EI5rKj017842@bart-savagewood.mit.edu>
To: bugs@mit.edu
From: John Hawkinson <jhawk@mit.edu>
X-Spam-Score: 1.217
X-Spam-Level: * (1.217)
X-Spam-Flag: NO
Errors-To: bugs-bounces@mit.edu
I noticed recently that Athena's customizations to
the auto-mode-alist (for clu-mode) use $ instead of
\\' for checking for the end of the string. This means
it matches on any newline, rather than the end of the
filename. (It's the only instance of $-matching in
the alist.)
So if one runs
emacs 'foo.clu
bar'
(with appropriate shell-quoting. tcsh needs a backslash, bash does not)
Then it mistakenly registers as clu-mode instead of fundamental-mode.
I'm sure this has been troubling people for Ages :)
--jhawk
--- third/emacs/lisp/site-start.el Wed Jul 14 02:07:35 2004
+++ /tmp/site-start.el Sat Oct 14 14:01:10 2006
@@ -86,8 +86,8 @@
(autoload 'clu-mode "clu-mode"
"Load CLU mode."
t)
-(setq auto-mode-alist (append auto-mode-alist '(("\\.clu$" . clu-mode)
- ("\\.equ$" . clu-mode))))
+(setq auto-mode-alist (append auto-mode-alist '(("\\.clu\\'" . clu-mode)
+ ("\\.equ\\'" . clu-mode))))
(autoload 'ispell-word "ispell"
"Check the spelling of a word in the buffer."