From fccf3de47fef1aa224f7cc8c126e83f1ba38a50e Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 14 Mar 2005 11:19:03 +0000 Subject: [PATCH] Autoload definitions for viewing and editing PO files. --- PACKAGING | 2 ++ gettext-tools/misc/ChangeLog | 5 ++++ gettext-tools/misc/Makefile.am | 2 +- gettext-tools/misc/start-po.el | 55 ++++++++++++++++++++++++++++++++++ 4 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 gettext-tools/misc/start-po.el diff --git a/PACKAGING b/PACKAGING index 9a43fd624..904debfcd 100644 --- a/PACKAGING +++ b/PACKAGING @@ -148,6 +148,8 @@ following file list. $prefix/share/emacs/site-lisp/po-compat.elc $prefix/share/emacs/site-lisp/po-mode.el $prefix/share/emacs/site-lisp/po-mode.elc + $prefix/share/emacs/site-lisp/start-po.el + $prefix/share/emacs/site-lisp/start-po.elc Java support: diff --git a/gettext-tools/misc/ChangeLog b/gettext-tools/misc/ChangeLog index d76eab024..a0b462e3d 100644 --- a/gettext-tools/misc/ChangeLog +++ b/gettext-tools/misc/ChangeLog @@ -2,6 +2,11 @@ * gettext-0.14.3 released. +2004-10-23 Bruno Haible + + * start-po-el: New file. + * Makefile.am (lisp_LISP): Add it. + 2005-03-08 Bruno Haible * autopoint.in: Update for 0.14.3. diff --git a/gettext-tools/misc/Makefile.am b/gettext-tools/misc/Makefile.am index 5a5d32902..7dce58451 100644 --- a/gettext-tools/misc/Makefile.am +++ b/gettext-tools/misc/Makefile.am @@ -41,7 +41,7 @@ archive.tar.gz: # Emacs Lisp code. -lisp_LISP = po-mode.el po-compat.el +lisp_LISP = start-po.el po-mode.el po-compat.el EXTRA_DIST += $(lisp_LISP) diff --git a/gettext-tools/misc/start-po.el b/gettext-tools/misc/start-po.el new file mode 100644 index 000000000..54831bef1 --- /dev/null +++ b/gettext-tools/misc/start-po.el @@ -0,0 +1,55 @@ +;;; start-po.el -- autoload definitions for viewing and editing PO files + +;; Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc. +;; +;; This file is part of GNU gettext. +;; +;; GNU gettext is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. +;; +;; GNU gettext is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, 59 Temple Place - Suite 330, Boston, +;; MA 02111-1307, USA. + +;;; Commentary: + +;; This file provides a minimal amount of definitions that will autoload +;; the complete support for viewing and editing PO files when necessary. +;; It is meant to be installed in such a way that it will be part of the +;; dumped Emacs image, or loaded automatically when Emacs is started, +;; regardless how the user's .emacs looks like. + +;;; Code: + +;; For editing PO files. + +(autoload 'po-mode "po-mode" + "Major mode for translators when they edit PO files. + +Special commands: +\\{po-mode-map} +Turning on PO mode calls the value of the variable 'po-mode-hook', +if that value is non-nil. Behaviour may be adjusted through some variables, +all reachable through 'M-x customize', in group 'Emacs.Editing.I18n.Po'." + t) +(setq auto-mode-alist + (cons '("\\.po\\'\\|\\.po\\." . po-mode) auto-mode-alist)) + +;; For viewing PO and POT files. + +;; To use the right coding system automatically under Emacs 20 or newer. +(unless (fboundp 'po-find-file-coding-system) + (autoload 'po-find-file-coding-system "po-compat" + "\ +Return a Mule (DECODING . ENCODING) pair, according to PO file charset. +Called through file-coding-system-alist, before the file is visited for real.")) +(modify-coding-system-alist 'file "\\.po[t]?\\'\\|\\.po\\." + 'po-find-file-coding-system) -- 2.47.2