GNU bug report logs - #49561
28.0.50; (declare (modes ...)) does not have an effect

Previous Next

Package: emacs;

Reported by: Daniel Mendler <mail <at> daniel-mendler.de>

Date: Wed, 14 Jul 2021 17:14:01 UTC

Severity: normal

Found in version 28.0.50

Done: Daniel Mendler <mail <at> daniel-mendler.de>

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 49561 in the body.
You can then email your comments to 49561 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#49561; Package emacs. (Wed, 14 Jul 2021 17:14:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Mendler <mail <at> daniel-mendler.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 14 Jul 2021 17:14:01 GMT) Full text and rfc822 format available.

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

From: Daniel Mendler <mail <at> daniel-mendler.de>
To: bug-gnu-emacs <at> gnu.org
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: 28.0.50; (declare (modes ...)) does not have an effect
Date: Wed, 14 Jul 2021 19:13:46 +0200
Has this feature already been implemented?

Test case:

(defun test-cmd1 () ; works
  (interactive nil test-mode))
(command-modes #'test-cmd1) ; evaluates to (test-mode)

(defun test-cmd2 () ; does not work
  (interactive)
  (declare (modes test-mode)))
(command-modes #'test-cmd2) ; evaluates to nil

In GNU Emacs 28.0.50 (build 28, x86_64-pc-linux-gnu, GTK+ Version
3.24.5, cairo version 1.16.0)
 of 2021-07-14 built on projects
Repository revision: 42b8edfdb9096af7010609fd8890c76bc3918873
Repository branch: HEAD
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux 10 (buster)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49561; Package emacs. (Wed, 14 Jul 2021 17:40:01 GMT) Full text and rfc822 format available.

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

From: Daniel Mendler <mail <at> daniel-mendler.de>
To: 49561 <at> debbugs.gnu.org
Subject: Re: bug#49561: 28.0.50; (declare (modes ...)) does not have an effect
Date: Wed, 14 Jul 2021 19:39:07 +0200
On 7/14/21 7:13 PM, Daniel Mendler wrote:
> (defun test-cmd2 () ; does not work
>   (interactive)
>   (declare (modes test-mode)))
> (command-modes #'test-cmd2) ; evaluates to nil

Disregard, this works.

(defun test-cmd2 ()
  (declare (modes test-mode))
  (interactive))

For some reason I had assumed that the order of the declarations in the
beginning of the `defun` does not matter.

Daniel




Reply sent to Daniel Mendler <mail <at> daniel-mendler.de>:
You have taken responsibility. (Wed, 14 Jul 2021 17:42:01 GMT) Full text and rfc822 format available.

Notification sent to Daniel Mendler <mail <at> daniel-mendler.de>:
bug acknowledged by developer. (Wed, 14 Jul 2021 17:42:02 GMT) Full text and rfc822 format available.

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

From: Daniel Mendler <mail <at> daniel-mendler.de>
To: 49561-done <at> debbugs.gnu.org
Subject: Re: bug#49561: 28.0.50; (declare (modes ...)) does not have an effect
Date: Wed, 14 Jul 2021 19:41:50 +0200
Closing.




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

This bug report was last modified 2 years and 251 days ago.

Previous Next


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