[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Improve detection of local function calls in methods
From: |
akater |
Subject: |
Re: [PATCH] Improve detection of local function calls in methods |
Date: |
Sun, 29 Aug 2021 11:25:07 +0000 |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> Hmm... IIUC this fails to account for the case where
> #'cl-call-next-method is passed to a function (the most common case (or
> more precisely, the only case I've seen so far) being when it's passed
> to `apply`).
Right. cl-flet should have reminded me that cl-call-next-method is a
local function, not a local macro.
> [ I'm not completely sure what you mean, but (defvar foo) has an effect
I was referring to hypothetical
#+begin_example elisp
(let* (...
cl-generic--uses-crm)
(declare (special cl-generic--uses-crm))
...)
#+end_example
But it doesn't matter anymore. See the new patches.
Notes:
- I splitted patches in two because the first diff looks significantly
better this way.
- Normally I'd put uses-cnm binding/declaration right before where it's
used. However, putting it earlier gives a cleaner diff; also,
uses-cnm means “parsed body uses cnm” so I think it's OK to put it
right on the same line as (parsed-body ..), and this also utilizes the
whitespace better.
I don't know if all this is appropriate style; I provide patches this
way in the hope it's acceptable.
0001-Improve-detection-of-local-function-calls-in-methods.patch
Description: cl--generic-lambda fix
0002-lisp-emacs-lisp-cl-generic.el-cl-generic-lambda-Clea.patch
Description: cl--generic-lambda cleanup