all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: phillip.lord@russet.org.uk (Phillip Lord)
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 23625@debbugs.gnu.org, monnier@iro.umontreal.ca
Subject: bug#23625: viper-tests.el fails in master
Date: Thu, 26 May 2016 22:38:23 +0100	[thread overview]
Message-ID: <871t4oijow.fsf@russet.org.uk> (raw)
In-Reply-To: <aa6c1248-d545-3663-6de9-27add720a9f0@cs.ucla.edu> (Paul Eggert's message of "Thu, 26 May 2016 13:33:53 -0700")

[-- Attachment #1: Type: text/plain, Size: 994 bytes --]


Paul Eggert <eggert@cs.ucla.edu> writes:

> Phillip, I just now merged emacs-25 into master and fixed all the merge
> conflicts that were easy, but one problem remains: viper-tests, which you
> recently introduced to emacs-25, fails in the new master. Could you please
> look into this? I don't offhand know what viper-tests is supposed to do and
> don't know how to interpret the test failures. Thanks.

They are "do this, do that" keyboard macros. Hard to explain what they
do other than "this is how viper is supposed to behave".

Anyway, I think that the tests are working -- that is, they are picking
up a real bug, caused independently by 088acab3 which was from Stefan.
I've attached a fix. Stefan, can you check I have this right?

> (Is there any way to fix the test so that it outputs ordinary text when it
> fails?)

>   #[nil "\301 \210\30!\207" [before-buffer toggle-viper-mode switch-

You mean this bit? To be honest I am not sure where that bit of trace is
coming from.

Phil


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-broken-viper-deactivation.patch --]
[-- Type: text/x-diff, Size: 1123 bytes --]

From 76409ca9daf72b697db9c1983aa322a365bfc066 Mon Sep 17 00:00:00 2001
From: Phillip Lord <phillip.lord@russet.org.uk>
Date: Thu, 26 May 2016 22:18:32 +0100
Subject: [PATCH] Fix broken viper deactivation

* lisp/emulation/viper.el (viper--deactivate-advice-list): Destructure
  args to advice-remove.
  (viper--advice-add): Use cons not list.
Addresses bug#23625
---
 lisp/emulation/viper.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el
index a0bba9a..1ee1464 100644
--- a/lisp/emulation/viper.el
+++ b/lisp/emulation/viper.el
@@ -647,10 +647,14 @@ viper--advice-list
 
 (defun viper--advice-add (function where advice)
   (advice-add function where advice)
-  (push (list function advice) viper--advice-list))
+  (push (cons function advice) viper--advice-list))
 
 (defun viper--deactivate-advice-list ()
-  (mapc #'advice-remove viper--advice-list)
+  (mapc (lambda (n)
+          (advice-remove
+           (car n)
+           (cdr n)))
+        viper--advice-list)
   (setq viper--advice-list nil))
 
 (defun viper-go-away ()
-- 
2.8.3


  reply	other threads:[~2016-05-26 21:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-26 20:33 bug#23625: viper-tests.el fails in master Paul Eggert
2016-05-26 21:38 ` Phillip Lord [this message]
2016-05-27 14:56   ` Stefan Monnier
2016-05-27 13:14 ` Andy Moreton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871t4oijow.fsf@russet.org.uk \
    --to=phillip.lord@russet.org.uk \
    --cc=23625@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.