summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2005-03-14 11:19:03 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:12:25 +0200
commitfccf3de47fef1aa224f7cc8c126e83f1ba38a50e (patch)
tree082ce6bfeb6e4ba8ddb7944b5aa64abb285866fb
parent610afdc4c034ebbaac0e51c37ffc228fc127ec9c (diff)
downloadexternal_gettext-fccf3de47fef1aa224f7cc8c126e83f1ba38a50e.zip
external_gettext-fccf3de47fef1aa224f7cc8c126e83f1ba38a50e.tar.gz
external_gettext-fccf3de47fef1aa224f7cc8c126e83f1ba38a50e.tar.bz2
Autoload definitions for viewing and editing PO files.
-rw-r--r--PACKAGING2
-rw-r--r--gettext-tools/misc/ChangeLog5
-rw-r--r--gettext-tools/misc/Makefile.am2
-rw-r--r--gettext-tools/misc/start-po.el55
4 files changed, 63 insertions, 1 deletions
diff --git a/PACKAGING b/PACKAGING
index 9a43fd6..904debf 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 d76eab0..a0b462e 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 <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.
diff --git a/gettext-tools/misc/Makefile.am b/gettext-tools/misc/Makefile.am
index 5a5d329..7dce584 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 0000000..54831be
--- /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)