GNU bug report logs - #23994
25.1.50; cl-defmethod with qualifier indented incorrectly

Previous Next

Package: emacs;

Reported by: Eric Abrahamsen <eric <at> ericabrahamsen.net>

Date: Fri, 15 Jul 2016 15:56:01 UTC

Severity: minor

Found in version 25.1.50

Fixed in version 26.1

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 23994 in the body.
You can then email your comments to 23994 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#23994; Package emacs. (Fri, 15 Jul 2016 15:56:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eric Abrahamsen <eric <at> ericabrahamsen.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 15 Jul 2016 15:56:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1.50; cl-defmethod with qualifier indented incorrectly
Date: Fri, 15 Jul 2016 08:55:03 -0700
cl-defmethod forms with a qualifier are indented incorrectly, ie:

(cl-defmethod base ((str string))
  "This one's okay"
  (message str))

(cl-defmethod base :extra "ext" ((str string))
	      "This one isn't"
	      (message "extra method")
	      (cl-call-next-method))

The incorrect indentation happens both for "single tag" qualifiers (ie
:before), and the tag-plus-string :extra qualifier.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23994; Package emacs. (Tue, 25 Jul 2017 15:08:01 GMT) Full text and rfc822 format available.

Message #8 received at 23994 <at> debbugs.gnu.org (full text, mbox):

From: daimrod <at> omecha.info (Grégoire Jadi)
To: 23994 <at> debbugs.gnu.org
Subject: [PATCH] Fix cl-defmethod indent with qualifier (Bug##23994) (Was:
 25.1.50; cl-defmethod with qualifier indented incorrectly)
Date: Tue, 25 Jul 2017 10:00:37 +0200
[Message part 1 (text/plain, inline)]
Hello,

I've been bitten by this bug as well on 25.2.1.
I've attached a patch to fix it.

Best,

PS: I've FSF copyright assignment number #793656

[0001-Fix-cl-defmethod-indent-with-qualifier.patch (text/x-patch, inline)]
From 7aed0320d9471138c9ad6652c37fe05c563f9af8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=A9goire=20Jadi?= <gjadi <at> omecha.info>
Date: Tue, 25 Jul 2017 09:46:32 +0200
Subject: [PATCH] Fix cl-defmethod indent with qualifier (Bug##23994)

lisp/emacs-lisp/cl-generic.el(cl-defmethod): Indent `cl-defmethod'
like a def construct.
---
 lisp/emacs-lisp/cl-generic.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el
index 6a4ee47ac2..1d29082c62 100644
--- a/lisp/emacs-lisp/cl-generic.el
+++ b/lisp/emacs-lisp/cl-generic.el
@@ -409,7 +409,7 @@ cl-defmethod
 \(and can be extended) by the various methods of `cl-generic-generalizers'.
 
 \(fn NAME [QUALIFIER] ARGS &rest [DOCSTRING] BODY)"
-  (declare (doc-string 3) (indent 2)
+  (declare (doc-string 3) (indent defun)
            (debug
             (&define                    ; this means we are defining something
              [&or name ("setf" name :name setf)]
-- 
2.13.3


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23994; Package emacs. (Tue, 25 Jul 2017 15:08:02 GMT) Full text and rfc822 format available.

Message #11 received at 23994 <at> debbugs.gnu.org (full text, mbox):

From: daimrod <at> omecha.info (Grégoire Jadi)
To: 23994 <at> debbugs.gnu.org
Subject: Re: [PATCH] Fix cl-defmethod indent with qualifier (Bug##23994)
Date: Tue, 25 Jul 2017 10:02:18 +0200
I forgot to mention that #23994 is a duplicate of #26067.




Reply sent to Dmitry Gutov <dgutov <at> yandex.ru>:
You have taken responsibility. (Wed, 26 Jul 2017 15:55:02 GMT) Full text and rfc822 format available.

Notification sent to Eric Abrahamsen <eric <at> ericabrahamsen.net>:
bug acknowledged by developer. (Wed, 26 Jul 2017 15:55:02 GMT) Full text and rfc822 format available.

Message #16 received at 23994-done <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Grégoire Jadi <daimrod <at> omecha.info>,
 23994-done <at> debbugs.gnu.org
Subject: Re: bug#23994: [PATCH] Fix cl-defmethod indent with qualifier
 (Bug##23994) (Was: 25.1.50; cl-defmethod with qualifier indented incorrectly)
Date: Wed, 26 Jul 2017 18:53:54 +0300
Version: 26.1

On 7/25/17 11:00 AM, Grégoire Jadi wrote:

> I've been bitten by this bug as well on 25.2.1.
> I've attached a patch to fix it.

Pushed, thanks!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 24 Aug 2017 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 361 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.