From: Alan Mackenzie <acm@muc.de>
To: Neal Becker <ndbecker2@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: File local-variables broken?
Date: Tue, 29 Apr 2008 20:44:04 +0000 [thread overview]
Message-ID: <20080429204404.GC1215@muc.de> (raw)
In-Reply-To: <fv4ipb$sid$1@ger.gmane.org>
Hi, Neal!
On Mon, Apr 28, 2008 at 09:17:30AM -0400, Neal Becker wrote:
> Was file local-variables broken by a recent svn?
> File local-variables error: (error "Argument to c-set-style was not a
> string")
> This is the offending code:
> // Local Variables: **
> // mode:c **
> // c-file-style:linux ** <===========
> // c-basic-offset:4 **
> // End: **
There are two bugs here. The first one is in your source, and the error
message tried to point it out. If you change the offending line to:
// c-file-style:"linux" **
it will work.
The second bug is in CC Mode, because it gives an unhelpful error
message. The patch below will give a more helpful message. Please try
it out and confirm it does the right thing.
*** cc-mode.el~ 2008-04-24 17:40:45.000000000 +0000
--- cc-mode.el 2008-04-29 20:40:16.781230872 +0000
***************
*** 713,720 ****
(when c-buffer-is-cc-mode
(if (or c-file-style c-file-offsets)
(c-make-styles-buffer-local t))
! (and c-file-style
! (c-set-style c-file-style))
(and c-file-offsets
(mapc
(lambda (langentry)
--- 713,722 ----
(when c-buffer-is-cc-mode
(if (or c-file-style c-file-offsets)
(c-make-styles-buffer-local t))
! (when c-file-style
! (or (stringp c-file-style)
! (error "c-file-style is not a string"))
! (c-set-style c-file-style))
(and c-file-offsets
(mapc
(lambda (langentry)
--
Alan Mackenzie (Nuremberg, Germany).
prev parent reply other threads:[~2008-04-29 20:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-28 13:17 File local-variables broken? Neal Becker
2008-04-29 3:48 ` Glenn Morris
2008-04-29 11:50 ` Neal Becker
2008-04-29 13:25 ` Juanma Barranquero
2008-04-29 13:25 ` Juanma Barranquero
2008-04-29 20:44 ` Alan Mackenzie [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080429204404.GC1215@muc.de \
--to=acm@muc.de \
--cc=emacs-devel@gnu.org \
--cc=ndbecker2@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.