]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
po-mode: Fix po-send-mail behaviour on Emacs 25
authorDaiki Ueno <ueno@gnu.org>
Wed, 3 Aug 2016 12:10:13 +0000 (14:10 +0200)
committerDaiki Ueno <ueno@gnu.org>
Wed, 3 Aug 2016 12:10:13 +0000 (14:10 +0200)
* gettext-tools/misc/po-mode.el (po-send-mail): Don't rely on
region markers.
Reported by Göran Uddeborg in:
http://lists.gnu.org/archive/html/bug-gettext/2016-07/msg00027.html

gettext-tools/misc/po-mode.el

index 9189cb3b87ca1b6a3d3b974154330c9d7d43458b..b0eed21259d483a218119e1d88ce349cccd44801 100644 (file)
@@ -3518,10 +3518,12 @@ 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-substring buffer)
-              (shell-command-on-region
-               (region-beginning) (region-end)
-               (concat po-gzip-uuencode-command " " name ".gz") t t))))))
+              (save-restriction
+                (narrow-to-region (point) (point))
+                (insert-buffer-substring buffer)
+                (shell-command-on-region
+                 (point-min) (point-max)
+                 (concat po-gzip-uuencode-command " " name ".gz") t t)))))))
   (message ""))
 
 (defun po-confirm-and-quit ()