From: Katsumi Yamaoka <yamaoka@jpl.org>
Subject: Re: non-ascii chars in the Lisp source files
Date: Fri, 05 Sep 2003 21:26:27 +0900 [thread overview]
Message-ID: <b9yk78nwhe4.fsf@jpl.org> (raw)
In-Reply-To: <b9yk78pl68f.fsf@jpl.org>
>>>>> In <b9yk78pl68f.fsf@jpl.org> Katsumi Yamaoka wrote:
> I've confirmed both the latest XEmacs 21.4 and 21.5 don't handle the
> coding cookie at the end of a file yet.
Here's a quick hack, not tested broadly:
(if (featurep 'xemacs)
(defadvice hack-one-local-variable (around handle-coding-cookie (var val)
activate)
"Handle a coding cookie at the Local Variables section."
(if (eq var 'coding)
(if (and buffer-file-name
(symbolp val)
(find-coding-system val))
(let ((mod (buffer-modified-p))
(coding-system-for-read val)
buffer-read-only)
(insert-file-contents buffer-file-name nil nil nil t)
(setq buffer-file-coding-system val)
(set-buffer-modified-p mod)))
ad-do-it)))
It can also be used in dgnushack.el in order to build correct
elc files even in Japanese language environment. I don't want
to put it into dgnushack.el actually, though.
--
Katsumi Yamaoka <yamaoka@jpl.org>
prev parent reply other threads:[~2003-09-05 12:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-03 6:22 Katsumi Yamaoka
2003-09-03 7:01 ` Daniel Pittman
2003-09-03 9:06 ` Robert Epprecht
2003-09-03 7:38 ` Katsumi Yamaoka
2003-09-03 10:43 ` Reiner Steib
2003-09-03 11:20 ` Katsumi Yamaoka
2003-09-03 12:41 ` Katsumi Yamaoka
2003-09-03 15:10 ` Reiner Steib
2003-09-04 0:58 ` Katsumi Yamaoka
2003-09-04 10:13 ` Juha Autero
2003-09-04 11:09 ` Katsumi Yamaoka
2003-09-05 12:26 ` Katsumi Yamaoka [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=b9yk78nwhe4.fsf@jpl.org \
--to=yamaoka@jpl.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).