summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stapelberg <stapelberg@debian.org>2014-07-03 20:03:41 +0200
committerMichael Stapelberg <stapelberg@debian.org>2014-07-03 20:03:41 +0200
commitc25ea5f1defc2d5f734c5d7d56d8a679cfae239d (patch)
tree5c671da2e0665b8a15eda6545ddc4446431c2946
parent60c26d5600a1d471646b851faeaec8d106bd4206 (diff)
downloadgolang-c25ea5f1defc2d5f734c5d7d56d8a679cfae239d.tar.gz
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
-rw-r--r--debian/changelog3
-rw-r--r--debian/patches/0001-backport-delete-whole-line.patch65
-rw-r--r--debian/patches/series1
3 files changed, 69 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 0a49a7023..ae9c3a6cf 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@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 000000000..be68c7f3a
--- /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@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 000000000..411797591
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-backport-delete-whole-line.patch