all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#23994: 25.1.50; cl-defmethod with qualifier indented incorrectly
@ 2016-07-15 15:55 Eric Abrahamsen
  2017-07-25  8:00 ` bug#23994: [PATCH] Fix cl-defmethod indent with qualifier (Bug##23994) (Was: 25.1.50; cl-defmethod with qualifier indented incorrectly) Grégoire Jadi
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Abrahamsen @ 2016-07-15 15:55 UTC (permalink / raw)
  To: 23994


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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#23994: [PATCH] Fix cl-defmethod indent with qualifier (Bug##23994) (Was: 25.1.50; cl-defmethod with qualifier indented incorrectly)
  2016-07-15 15:55 bug#23994: 25.1.50; cl-defmethod with qualifier indented incorrectly Eric Abrahamsen
@ 2017-07-25  8:00 ` Grégoire Jadi
  2017-07-25  8:02   ` bug#23994: [PATCH] Fix cl-defmethod indent with qualifier (Bug##23994) Grégoire Jadi
  2017-07-26 15:53   ` bug#23994: [PATCH] Fix cl-defmethod indent with qualifier (Bug##23994) (Was: 25.1.50; cl-defmethod with qualifier indented incorrectly) Dmitry Gutov
  0 siblings, 2 replies; 4+ messages in thread
From: Grégoire Jadi @ 2017-07-25  8:00 UTC (permalink / raw)
  To: 23994

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

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-cl-defmethod-indent-with-qualifier.patch --]
[-- Type: text/x-patch, Size: 1006 bytes --]

From 7aed0320d9471138c9ad6652c37fe05c563f9af8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=A9goire=20Jadi?= <gjadi@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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#23994: [PATCH] Fix cl-defmethod indent with qualifier (Bug##23994)
  2017-07-25  8:00 ` bug#23994: [PATCH] Fix cl-defmethod indent with qualifier (Bug##23994) (Was: 25.1.50; cl-defmethod with qualifier indented incorrectly) Grégoire Jadi
@ 2017-07-25  8:02   ` Grégoire Jadi
  2017-07-26 15:53   ` bug#23994: [PATCH] Fix cl-defmethod indent with qualifier (Bug##23994) (Was: 25.1.50; cl-defmethod with qualifier indented incorrectly) Dmitry Gutov
  1 sibling, 0 replies; 4+ messages in thread
From: Grégoire Jadi @ 2017-07-25  8:02 UTC (permalink / raw)
  To: 23994

I forgot to mention that #23994 is a duplicate of #26067.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#23994: [PATCH] Fix cl-defmethod indent with qualifier (Bug##23994) (Was: 25.1.50; cl-defmethod with qualifier indented incorrectly)
  2017-07-25  8:00 ` bug#23994: [PATCH] Fix cl-defmethod indent with qualifier (Bug##23994) (Was: 25.1.50; cl-defmethod with qualifier indented incorrectly) Grégoire Jadi
  2017-07-25  8:02   ` bug#23994: [PATCH] Fix cl-defmethod indent with qualifier (Bug##23994) Grégoire Jadi
@ 2017-07-26 15:53   ` Dmitry Gutov
  1 sibling, 0 replies; 4+ messages in thread
From: Dmitry Gutov @ 2017-07-26 15:53 UTC (permalink / raw)
  To: Grégoire Jadi, 23994-done

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!





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-07-26 15:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-15 15:55 bug#23994: 25.1.50; cl-defmethod with qualifier indented incorrectly Eric Abrahamsen
2017-07-25  8:00 ` bug#23994: [PATCH] Fix cl-defmethod indent with qualifier (Bug##23994) (Was: 25.1.50; cl-defmethod with qualifier indented incorrectly) Grégoire Jadi
2017-07-25  8:02   ` bug#23994: [PATCH] Fix cl-defmethod indent with qualifier (Bug##23994) Grégoire Jadi
2017-07-26 15:53   ` bug#23994: [PATCH] Fix cl-defmethod indent with qualifier (Bug##23994) (Was: 25.1.50; cl-defmethod with qualifier indented incorrectly) Dmitry Gutov

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.