[Pkg-golang-commits] [golang] 03/07: Add debian/patches/0001-backport-delete-whole-line.patch

Michael Stapelberg michael at stapelberg.de
Mon Jul 7 06:52:00 UTC 2014


This is an automated email from the git hooks/post-receive script.

stapelberg pushed a commit to branch debian-sid
in repository golang.

commit c25ea5f1defc2d5f734c5d7d56d8a679cfae239d
Author: Michael Stapelberg <stapelberg at debian.org>
Date:   Thu Jul 3 20:03:41 2014 +0200

    Add debian/patches/0001-backport-delete-whole-line.patch
    
    …to fix a deprecation warning about flet in the emacs part of
    golang-mode.
    
    Closes: #753607
---
 debian/changelog                                   |  3 +
 .../patches/0001-backport-delete-whole-line.patch  | 65 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 69 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 0a49a70..ae9c3a6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,9 @@ golang (2:1.3-2) unstable; urgency=medium
   * Add /usr/lib/go/test symlink
   * Build with GO386=387 to favor the 387 floating point unit over sse2
     instructions (Closes: #753160)
+  * Add debian/patches/0001-backport-delete-whole-line.patch to fix a
+    deprecation warning about flet in the emacs part of golang-mode
+    (Closes: #753607)
 
  -- Michael Stapelberg <stapelberg at debian.org>  Thu, 03 Jul 2014 19:08:34 +0200
 
diff --git a/debian/patches/0001-backport-delete-whole-line.patch b/debian/patches/0001-backport-delete-whole-line.patch
new file mode 100644
index 0000000..be68c7f
--- /dev/null
+++ b/debian/patches/0001-backport-delete-whole-line.patch
@@ -0,0 +1,65 @@
+Description: flet is obsolete as of emacs 24.3
+Author: Dominik Honnef <dominikh at fork-bomb.org>
+Last-Update: 2014-07-03
+Forwarded: not-needed
+Origin: vendor, https://github.com/dominikh/go-mode.el/commit/6b5fe38
+
+---
+
+diff --git i/misc/emacs/go-mode.el w/misc/emacs/go-mode.el
+index 6333ff9..6a2fcc0 100644
+--- i/misc/emacs/go-mode.el
++++ w/misc/emacs/go-mode.el
+@@ -33,29 +33,35 @@
+ ;; - Use go--old-completion-list-style when using a plain list as the
+ ;;   collection for completing-read
+ ;;
+-;; - Use go--kill-whole-line instead of kill-whole-line (called
+-;;   kill-entire-line in XEmacs)
+-;;
+ ;; - Use go--position-bytes instead of position-bytes
+ (defmacro go--xemacs-p ()
+   `(featurep 'xemacs))
+ 
+-(defalias 'go--kill-whole-line
+-  (if (fboundp 'kill-whole-line)
+-      #'kill-whole-line
+-    #'kill-entire-line))
+-
+ ;; Delete the current line without putting it in the kill-ring.
+ (defun go--delete-whole-line (&optional arg)
+-  ;; Emacs uses both kill-region and kill-new, Xemacs only uses
+-  ;; kill-region. In both cases we turn them into operations that do
+-  ;; not modify the kill ring. This solution does depend on the
+-  ;; implementation of kill-line, but it's the only viable solution
+-  ;; that does not require to write kill-line from scratch.
+-  (flet ((kill-region (beg end)
+-                      (delete-region beg end))
+-         (kill-new (s) ()))
+-    (go--kill-whole-line arg)))
++  ;; Derived from `kill-whole-line'.
++  ;; ARG is defined as for that function.
++  (setq arg (or arg 1))
++  (if (and (> arg 0)
++           (eobp)
++           (save-excursion (forward-visible-line 0) (eobp)))
++      (signal 'end-of-buffer nil))
++  (if (and (< arg 0)
++           (bobp)
++           (save-excursion (end-of-visible-line) (bobp)))
++      (signal 'beginning-of-buffer nil))
++  (cond ((zerop arg)
++         (delete-region (progn (forward-visible-line 0) (point))
++                        (progn (end-of-visible-line) (point))))
++        ((< arg 0)
++         (delete-region (progn (end-of-visible-line) (point))
++                        (progn (forward-visible-line (1+ arg))
++                               (unless (bobp)
++                                 (backward-char))
++                               (point))))
++        (t
++         (delete-region (progn (forward-visible-line 0) (point))
++                        (progn (forward-visible-line arg) (point))))))
+ 
+ ;; declare-function is an empty macro that only byte-compile cares
+ ;; about. Wrap in always false if to satisfy Emacsen without that
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..4117975
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-backport-delete-whole-line.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-golang/golang.git



More information about the pkg-golang-commits mailing list