unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#53540: 29.0.50; Completion support for the NAME field of cl-defmethod
@ 2022-01-26  3:20 Michael Heerdegen
  2022-01-29  0:17 ` Michael Heerdegen
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Heerdegen @ 2022-01-26  3:20 UTC (permalink / raw)
  To: 53540


Hello,

to illustrate: eval

  (cl-defgeneric foobar (x))

and then, e.g. in *scratch*, insert

  (cl-defmethod foo|

and try completion at point (M-TAB) at the position indicated with the
"|" meta marker.  No completion is performed.  Only completion of
variable names is tried, not the names of generic functions.  Would be
nice to support that.


Regards,

Michael.


In GNU Emacs 29.0.50 (build 46, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
 of 2022-01-26 built on drachen
Repository revision: e82062656f3cb77319457b0dc977949f3e4ca776
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)

Configured using:
 'configure --with-native-compilation --with-xwidgets'






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

* bug#53540: 29.0.50; Completion support for the NAME field of cl-defmethod
  2022-01-26  3:20 bug#53540: 29.0.50; Completion support for the NAME field of cl-defmethod Michael Heerdegen
@ 2022-01-29  0:17 ` Michael Heerdegen
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Heerdegen @ 2022-01-29  0:17 UTC (permalink / raw)
  To: 53540

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

Michael Heerdegen <michael_heerdegen@web.de> writes:


>   (cl-defmethod foo|
>
> and try completion at point (M-TAB) at the position indicated with the
> "|" meta marker.

Is this ok?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Elisp-mode-Fix-completion-of-cl-defmethod-NAME-arg.patch --]
[-- Type: text/x-diff, Size: 1122 bytes --]

From 826cf267ba8d65110ef6d338e30033f6cb79d66f Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen@web.de>
Date: Thu, 27 Jan 2022 02:56:17 +0100
Subject: [PATCH] Elisp-mode: Fix completion of cl-defmethod NAME arg

Fixes Bug#53540.

* lisp/progmodes/elisp-mode.el (elisp--expect-function-p):
Add "defmethod" to recognized parent expression types.
---
 lisp/progmodes/elisp-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 0dfff32f20..914e4e3836 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -449,7 +449,7 @@ elisp--expect-function-p
                               (regexp-opt '("declare-function"
                                             "function" "defadvice"
                                             "callf" "callf2"
-                                            "defsetf"))
+                                            "defsetf" "defmethod"))
                               "[ \t\r\n]+"))
           (eq (match-end 0) pos)))))))

--
2.30.2


[-- Attachment #3: Type: text/plain, Size: 11 bytes --]



Michael.

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

end of thread, other threads:[~2022-01-29  0:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-26  3:20 bug#53540: 29.0.50; Completion support for the NAME field of cl-defmethod Michael Heerdegen
2022-01-29  0:17 ` Michael Heerdegen

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).