unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: p.stephani2@gmail.com, pipcet@gmail.com, 33414@debbugs.gnu.org
Subject: bug#33414: 27.0.50; inhibit-changing-match-data can be t in syntax-propertize functions, breaking backtrace and looking-at
Date: Sun, 05 Sep 2021 12:40:25 +0300	[thread overview]
Message-ID: <83v93ftl6e.fsf@gnu.org> (raw)
In-Reply-To: <87eea3nzel.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun,  05 Sep 2021 11:29:38 +0200)

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Eli Zaretskii <eliz@gnu.org>,  Pip Cet <pipcet@gmail.com>,
>   33414@debbugs.gnu.org
> Date: Sun, 05 Sep 2021 11:29:38 +0200
> 
> Philipp <p.stephani2@gmail.com> writes:
> 
> >> `inhibit-changing-match-data' just seems like a bad interface to me.
> >
> > Yes, using a public dynamic variable (i.e., public global mutable
> > state) to influence the behavior of a function is normally a bad idea.

FWIW, I don't share the above view.  We bind variables to affect
behavior of functions all over the place, and that is perfectly okay,
IMO.

> -@defun looking-at regexp
> +@defun looking-at regexp &optional inhibit-save
                                      ^^^^^^^^^^^^
A typo?

> --- a/lisp/auth-source.el
> +++ b/lisp/auth-source.el
> @@ -1447,12 +1447,13 @@ auth-source-netrc-saver
>  `auth-source-netrc-cache' to avoid prompting more than once."
>    (let* ((key (format "%s %s" file (rfc2104-hash 'md5 64 16 file add)))
>           (cached (assoc key auth-source-netrc-cache)))
> -
> +    (message "hello 2 %s" cached)
>      (if cached
>          (auth-source-do-trivia
>           "auth-source-netrc-saver: found previous run for key %s, returning"
>           key)
>        (with-temp-buffer
> +        (message "hello 3 %s" file)
>          (when (file-exists-p file)
>            (insert-file-contents file))
>          (when auth-source-gpg-encrypt-to
> @@ -1472,8 +1473,11 @@ auth-source-netrc-saver
>                (done (not (eq auth-source-save-behavior 'ask)))
>                (bufname "*auth-source Help*")
>                k)
> +          (message "hello 3 %s %s" auth-source-save-behavior done)
>            (while (not done)
> +            (message "hello 3.5")
>              (setq k (auth-source-read-char-choice prompt '(?y ?n ?N ?e ??)))
> +            (message "hello 4 %s" k)
>              (cl-case k
>                (?y (setq done t))
>                (?? (save-excursion

Debugging code left-overs?

> +(make-obsolete-variable 'inhibit-changing-match-data nil "28.1")

Really? why obsolete it?





  reply	other threads:[~2021-09-05  9:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-17 13:30 bug#33414: 27.0.50; inhibit-changing-match-data can be t in syntax-propertize functions, breaking backtrace and looking-at Pip Cet
2018-11-17 13:46 ` Eli Zaretskii
2018-11-17 14:14   ` Pip Cet
2018-11-17 14:36     ` Eli Zaretskii
2021-08-12 13:11       ` Lars Ingebrigtsen
2021-09-04 18:39         ` Philipp
2021-09-04 19:33           ` bug#33414: [External] : " Drew Adams
2021-09-05  9:29           ` Lars Ingebrigtsen
2021-09-05  9:40             ` Eli Zaretskii [this message]
2021-09-05  9:45               ` Lars Ingebrigtsen
2021-09-05  9:55                 ` Eli Zaretskii
2021-10-07 18:49                   ` Lars Ingebrigtsen
2021-10-07 19:07                     ` bug#33414: [External] : " Drew Adams
2021-10-07 19:11                       ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83v93ftl6e.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=33414@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=p.stephani2@gmail.com \
    --cc=pipcet@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).