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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: po-mode.el in 0.11.3-pre2 not working on Debian's emacs21


From: Santiago Vila
Subject: Re: po-mode.el in 0.11.3-pre2 not working on Debian's emacs21
Date: Tue, 28 May 2002 00:46:33 +0200 (CEST)

On Mon, 27 May 2002, Jordi Mallach wrote:
> On Mon, May 27, 2002 at 09:15:01AM +0200, Karl Eichwalder wrote:
> > > Autoloading failed to define function po-find-file-coding-system
> > > and po-mode doesn't start at all.
> > I removed the form from po-mode.el; please, load the separate
> > po-compat.el file.  Example:
> >
> > (autoload 'po-mode "po-mode")
> > (setq auto-mode-alist (cons '("\\.po[tx]?\\'" . po-mode)
> >                             auto-mode-alist))
> >
> > ;; To automatically use proper fonts under Emacs 20/21, also add:
> >
> > (unless (featurep 'po-find-file-coding-system)
> >   (autoload 'po-find-file-coding-system "po-compat"))
> > (modify-coding-system-alist 'file "\\.po[tx]?\\'"
> >                             'po-find-file-coding-system)
> >
> > -=-=-=-=-=-=-=-=-=-=-=-=-=- cut here -=-=-=-=-=-=-=-=-=-=-=-=-=-
>
> Ah, I see. Santiago, I guess this is what you need for the packages
> then.

Yes. Actually, there were two things I did wrong: In the first place,
I forgot to put the po-compat.el in its proper place (this is because
they are copied by hand in the debian/rules). Then, I didn't re-read
the manual to realize the emacs startup file had to be updated.

The current emacs startup file for the Debian package is now similar to this:

(setq auto-mode-alist
(cons '("\\.po[tx]?\\'\\|\\.po\\." . po-mode) auto-mode-alist))
(autoload 'po-mode "gettext/po-mode"
  "Major mode for translators to edit PO files" t)
(autoload 'po-find-file-coding-system "po-mode")
(unless (featurep 'po-find-file-coding-system)
  (autoload 'po-find-file-coding-system "po-compat"))
(if (fboundp 'modify-coding-system-alist)
  (modify-coding-system-alist 'file "\\.po[tx]?\\'\\|\\.po\\."
    'po-find-file-coding-system))

BTW: Is "featurep" the same as "fboundp"? Which one should be used here?

> > Background: Current Emacs CVS version ("21.3.50") and the next Emacs
> > major release will come with `po-find-file-coding-system' on its own to
> > display .po files properly without loading po-mode.el.
>
> Hmm. I don't know what you mean with "properly", po files show ok (like
> a normal file) when I don't have po-mode installed. What will newer
> emacs do then? Probably offtopic, but I'm pretty new to Emacs :)

Try to open a .po file written in korean or japanese using emacs under X,
and I think you will know what he means by "properly" :-)
[ For comparison, try "less file.po" as well ].




reply via email to

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