]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Autoload definitions for viewing and editing PO files.
authorBruno Haible <bruno@clisp.org>
Mon, 14 Mar 2005 11:19:03 +0000 (11:19 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:12:25 +0000 (12:12 +0200)
PACKAGING
gettext-tools/misc/ChangeLog
gettext-tools/misc/Makefile.am
gettext-tools/misc/start-po.el [new file with mode: 0644]

index 9a43fd6246121d208f253df58fdf1078da86c030..904debfcd2560a949274d415ddc45ae62d41ede9 100644 (file)
--- 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:
index d76eab0244d18089cfc746562def9015b8fb0c85..a0b462e3d2d3b0c62513edd50517f48e1d542a9d 100644 (file)
@@ -2,6 +2,11 @@
 
        * gettext-0.14.3 released.
 
+2004-10-23  Bruno Haible  <bruno@clisp.org>
+
+       * start-po-el: New file.
+       * Makefile.am (lisp_LISP): Add it.
+
 2005-03-08  Bruno Haible  <bruno@clisp.org>
 
        * autopoint.in: Update for 0.14.3.
index 5a5d329028f56640cf362129caaa87e5d4e53ca7..7dce584519967e1a44f0800d5d05c6c2f5c4eabb 100644 (file)
@@ -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 (file)
index 0000000..54831be
--- /dev/null
@@ -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)