unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Rustom Mody <rustompmody@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: aplus mode
Date: Thu, 16 Aug 2012 22:55:03 +0530	[thread overview]
Message-ID: <CAJ+Teofy26+tqpv3pGh=AWLMd=keJkQo=udpfYVMmFPN+zyxtw@mail.gmail.com> (raw)
In-Reply-To: <jwv4no51rbu.fsf-monnier+emacs@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1434 bytes --]

On Tue, Aug 14, 2012 at 8:17 PM, Stefan Monnier <monnier@iro.umontreal.ca>wrote:

>
> > Trying to make an 'inside-emacs' version of the same hack I discovered
> that
> > the following does the trick of removing the need for LANG=C.
>
> > (setq coding-system-for-write 'iso-latin-1)
> > (setq coding-system-for-read 'iso-latin-1)
>
> > Obviously this is not a proper solution.
> > Firstly these variables should not be globally assigned.  Whats the best
> > way of scoping these assignments or should some other variables be used I
> > am not sure.
>
> You should let-bind them around the `start-process' call.
>
>
I now have

(defun run-apl()
  "Major mode for running APlus under emacs"
  (interactive)
  (if (not (comint-check-proc "*a+*"))
      (let ((coding-system-for-write 'iso-latin-1)
        (coding-system-for-read 'iso-latin-1))
    (set-buffer (make-comint "a+" "a+"))))
  (setq apl-buffer "*a+*")
  (inferior-apl-mode)
  (pop-to-buffer "*a+*"))

Is this (use of let) the appropriate way?




> > The second point is that iso-latin-1 just works by saying so-to-speak
> > "Not-UTF" but it is obviously wrong.
>
> Yes, if it works, it's probably by accident.  It might be preferable to
> create a proper `apl' coding-system (use define-charset and then
> define-coding-system).
>
>
Thanks. I was looking for such functions.  I will of course have to study
code that uses them.  Any suggestions where to start?

Thanks
Rusi

[-- Attachment #2: Type: text/html, Size: 2218 bytes --]

  reply	other threads:[~2012-08-16 17:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-27  7:48 aplus mode Rustom Mody
2012-07-27 12:38 ` Rustom Mody
2012-08-10 21:57 ` Stefan Monnier
2012-08-14  7:31   ` Rustom Mody
2012-08-14 14:47     ` Stefan Monnier
2012-08-16 17:25       ` Rustom Mody [this message]
2012-08-19 12:27         ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ+Teofy26+tqpv3pGh=AWLMd=keJkQo=udpfYVMmFPN+zyxtw@mail.gmail.com' \
    --to=rustompmody@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).