From: Bruno Haible Date: Mon, 30 Aug 2010 15:54:58 +0000 (+0200) Subject: Improve interopability with Emacs 23. X-Git-Tag: v0.18.2~134 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=119da9329dbc9e14f5891431bf6bb15b1a77b1a3;p=thirdparty%2Fgettext.git Improve interopability with Emacs 23. --- diff --git a/gettext-tools/misc/ChangeLog b/gettext-tools/misc/ChangeLog index 1aeaeb3b9..850229587 100644 --- a/gettext-tools/misc/ChangeLog +++ b/gettext-tools/misc/ChangeLog @@ -1,3 +1,12 @@ +2010-08-30 Bruno Haible + + Improve interopability with Emacs 23. + * po-compat.el (po-find-file-coding-system-guts): Don't use codepages + API in Emacs >= 23. + * po-mode.el (po-mode-version-string): Bump to 2.21. + (po-ediff-buffers-exit-recursive, po-send-mail): Use + insert-buffer-substring instead of insert-buffer. + 2010-06-06 Bruno Haible New options --with-xz and --with-bzip2 for compressing the archive. diff --git a/gettext-tools/misc/po-compat.el b/gettext-tools/misc/po-compat.el index 02feafdbc..64701ba8a 100644 --- a/gettext-tools/misc/po-compat.el +++ b/gettext-tools/misc/po-compat.el @@ -1,6 +1,6 @@ ;;; po-compat.el --- basic support of PO translation files -*- coding: latin-1; -*- -;; Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc. +;; Copyright (C) 1995-1999, 2000-2002, 2010 Free Software Foundation, Inc. ;; Authors: François Pinard , ;; Greg McGary , @@ -201,6 +201,7 @@ Called through file-coding-system-alist, before the file is visited for real." (list (cond ((and try-symbol (coding-system-p try-symbol)) try-symbol) ((and po-EMACS20 + (not (string-lessp "23" emacs-version)) (string-match "\\`cp[1-9][0-9][0-9]?\\'" try-string) (assoc (substring try-string 2) diff --git a/gettext-tools/misc/po-mode.el b/gettext-tools/misc/po-mode.el index a95644b91..0e6ef99bd 100644 --- a/gettext-tools/misc/po-mode.el +++ b/gettext-tools/misc/po-mode.el @@ -62,7 +62,7 @@ ;;; Code: -(defconst po-mode-version-string "2.2" "\ +(defconst po-mode-version-string "2.21" "\ Version number of this version of po-mode.el.") ;;; Emacs portability matters - part I. @@ -2275,7 +2275,7 @@ For more info cf. `po-subedit-ediff'." (recursive-edit) (pop-to-buffer oldbuf) (delete-region (point-min) end) - (insert-buffer b2) + (insert-buffer-substring b2) (mapc 'kill-buffer `(,b1 ,b2)) (display-buffer entry-buffer t)) @@ -3494,7 +3494,7 @@ Write to your team? ('n' if writing to the Translation Project robot) "))) (re-search-forward (concat "^" (regexp-quote mail-header-separator) "\n")) (save-excursion - (insert-buffer buffer) + (insert-buffer-substring buffer) (shell-command-on-region (region-beginning) (region-end) (concat po-gzip-uuencode-command " " name ".gz") t))))))