emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#63343: closed (30.0.50; generated mode function will error if mode n


From: GNU bug Tracking System
Subject: bug#63343: closed (30.0.50; generated mode function will error if mode name contains '%')
Date: Sun, 07 May 2023 13:39:01 +0000

Your message dated Sun, 07 May 2023 16:39:06 +0300
with message-id <83bkiwdzwl.fsf@gnu.org>
and subject line Re: bug#63343: 30.0.50; generated mode function will error if 
mode name contains '%'
has caused the debbugs.gnu.org bug report #63343,
regarding 30.0.50; generated mode function will error if mode name contains '%'
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
63343: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63343
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 30.0.50; generated mode function will error if mode name contains '%' Date: Sat, 06 May 2023 23:46:10 -0400 User-agent: mu4e 1.11.4; emacs 30.0.50


Mode functions generated via `define-minor-mode' will signal an error when messaging a mode's "pretty" name contains "%".

To reproduce:

1. eval: (define-minor-mode 100%-failure-mode "oops")
2. enable or disable the mode.

The line responsible for the error is:

(message ,(format "%s %%sabled%%s" pretty-name) (if ,getter "en" "dis") local)))))

The attached patch fixes the issue for me.

Attachment: 0001-define-minor-mode-sanitize-mode-function-messages.patch
Description: Text Data



In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.37, cairo version 1.17.8) of 2023-04-14 built on nbook
Repository revision: dc842a71ed035dab1115f2e67d35dd07410e18be
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101008
System Description: Arch Linux


--- End Message ---
--- Begin Message --- Subject: Re: bug#63343: 30.0.50; generated mode function will error if mode name contains '%' Date: Sun, 07 May 2023 16:39:06 +0300
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: No Wayman <iarchivedmywholelife@gmail.com>,  63343@debbugs.gnu.org
> Date: Sun, 07 May 2023 09:30:57 -0400
> 
> >> -                  (message ,(format "%s %%sabled%%s" pretty-name)
> >> +                  (message "%s %sabled%s" ,pretty-name
> 
> Ugh!
> 
> > Stefan, any objections to installing this on the release branch?
> 
> Not at all.

Thanks, installed on emacs-29, and closing the bug.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]