* bug#9622: 23.3; flet indentation
@ 2011-09-28 1:56 Diogo F. S. Ramos
2019-08-10 20:10 ` Stefan Kangas
2021-09-25 1:29 ` Lars Ingebrigtsen
0 siblings, 2 replies; 9+ messages in thread
From: Diogo F. S. Ramos @ 2011-09-28 1:56 UTC (permalink / raw)
To: 9622
Currently, when using `flet', the functions are indented with respect of
the arglist.
It would be nice if flet functions were indented like a `defun', for
example.
Current behavior:
(defun foo ()
(flet ((long-function-name ()
(misses-flet)))
(long-function-name)))
Wanted behavior:
(defun foo ()
(flet ((long-function-name ()
(hi-flet)))
(long-function-name)))
--
Diogo F. S. Ramos
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#9622: 23.3; flet indentation
2011-09-28 1:56 bug#9622: 23.3; flet indentation Diogo F. S. Ramos
@ 2019-08-10 20:10 ` Stefan Kangas
2021-09-25 1:29 ` Lars Ingebrigtsen
1 sibling, 0 replies; 9+ messages in thread
From: Stefan Kangas @ 2019-08-10 20:10 UTC (permalink / raw)
To: diogofsr; +Cc: 9622
diogofsr@gmail.com (Diogo F. S. Ramos) writes:
> Currently, when using `flet', the functions are indented with respect of
> the arglist.
>
> It would be nice if flet functions were indented like a `defun', for
> example.
>
> Current behavior:
>
> (defun foo ()
> (flet ((long-function-name ()
> (misses-flet)))
> (long-function-name)))
>
> Wanted behavior:
>
> (defun foo ()
> (flet ((long-function-name ()
> (hi-flet)))
> (long-function-name)))
I can confirm that this is still an issue on Emacs 26.2 and current
master.
Thanks,
Stefan Kangas
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#9622: 23.3; flet indentation
2011-09-28 1:56 bug#9622: 23.3; flet indentation Diogo F. S. Ramos
2019-08-10 20:10 ` Stefan Kangas
@ 2021-09-25 1:29 ` Lars Ingebrigtsen
1 sibling, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-25 1:29 UTC (permalink / raw)
To: Diogo F. S. Ramos; +Cc: 9622
diogofsr@gmail.com (Diogo F. S. Ramos) writes:
> Currently, when using `flet', the functions are indented with respect of
> the arglist.
>
> It would be nice if flet functions were indented like a `defun', for
> example.
This is now fixed in Emacs 28:
commit 57dcc26e4af4e4f7812f2e287f18d36c662bf6b1 (HEAD -> master)
Author: akater <nuclearspace@gmail.com>
AuthorDate: Sat Sep 25 03:27:29 2021 +0200
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#9622: 23.3; flet indentation
[not found] <504153FB-8633-4755-A91A-DF5DD64E6FAA@acm.org>
@ 2021-09-28 3:01 ` akater
2021-09-28 5:23 ` Lars Ingebrigtsen
2021-09-29 18:12 ` bug#9622: [PATCH] " akater
1 sibling, 1 reply; 9+ messages in thread
From: akater @ 2021-09-28 3:01 UTC (permalink / raw)
To: Mattias Engdegård; +Cc: Lars Ingebrigtsen, 9622
[-- Attachment #1: Type: text/plain, Size: 134 bytes --]
I'm not around Emacs 28 atm; could you check if it's still wrong when cl-flet's definition — square (x) — is not on a single line?
[-- Attachment #2: Type: text/html, Size: 175 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#9622: 23.3; flet indentation
2021-09-28 3:01 ` akater
@ 2021-09-28 5:23 ` Lars Ingebrigtsen
2021-09-28 10:11 ` Mattias Engdegård
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-28 5:23 UTC (permalink / raw)
To: akater; +Cc: Mattias Engdegård, 9622
akater <nuclearspace@gmail.com> writes:
> I'm not around Emacs 28 atm; could you check if it's still wrong when
> cl-flet's definition — square (x) — is not on a single line?
Yes, it's still wrongly indented:
(cl-flet ((square (x)
(* x x)))
(let* ((a 3)
(b (square a))) ; <-- malindented
b))
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#9622: 23.3; flet indentation
2021-09-28 5:23 ` Lars Ingebrigtsen
@ 2021-09-28 10:11 ` Mattias Engdegård
2021-09-28 10:35 ` Mattias Engdegård
2021-09-28 16:39 ` akater
2 siblings, 0 replies; 9+ messages in thread
From: Mattias Engdegård @ 2021-09-28 10:11 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 9622, akater
It affects other constructs too:
(cl-flet ((f () alpha))
(cond
(beta
gamma))) ; <- wrong
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#9622: 23.3; flet indentation
2021-09-28 5:23 ` Lars Ingebrigtsen
2021-09-28 10:11 ` Mattias Engdegård
@ 2021-09-28 10:35 ` Mattias Engdegård
2021-09-28 16:39 ` akater
2 siblings, 0 replies; 9+ messages in thread
From: Mattias Engdegård @ 2021-09-28 10:35 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 9622, akater
More examples:
(cl-flet ((f () alpha))
(let ((x y))
(if beta
gamma ; <- wrong
delta)))
(cl-flet ((f () alpha))
(gamma
(delta
epsilon))) ; <- wrong
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#9622: 23.3; flet indentation
2021-09-28 5:23 ` Lars Ingebrigtsen
2021-09-28 10:11 ` Mattias Engdegård
2021-09-28 10:35 ` Mattias Engdegård
@ 2021-09-28 16:39 ` akater
2 siblings, 0 replies; 9+ messages in thread
From: akater @ 2021-09-28 16:39 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Mattias Engdegård, 9622
[-- Attachment #1: Type: text/plain, Size: 126 bytes --]
OK I found the culprit; figuring out the least expensive way to
resolve. One way or another, I'll fix it in the coming days.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 865 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#9622: 23.3; flet indentation
2021-09-29 18:12 ` bug#9622: [PATCH] " akater
@ 2021-11-08 1:13 ` Michael Heerdegen
0 siblings, 0 replies; 9+ messages in thread
From: Michael Heerdegen @ 2021-11-08 1:13 UTC (permalink / raw)
To: 9622; +Cc: Mattias Engdegård, Lars Ingebrigtsen, akater,
Diogo F. S. Ramos
akater <nuclearspace@gmail.com> writes:
> Several fixes:
> [...]
Am I allowed to report a regression that might be caused by these
changes here?
I have code like this:
#+begin_src emacs-lisp
(cl-flet* ((cont-w/expr (f) (g-w/extended-expr cont f))
(cont-prepend (&rest exps)
(cont-w/expr (lambda (p) (apply #'g--and (append exps (list p)))))))
(pcase expr
((and (let transformed (g--trivial-transformation-p expr)) (guard transformed))
(cont-prepend transformed))))
#+end_src
and the last line gets indented wrongly (one space too less). When I
remove the wrapping `cl-flet*' indentation behavior gets back to the
expected.
Michael.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-11-08 1:13 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-28 1:56 bug#9622: 23.3; flet indentation Diogo F. S. Ramos
2019-08-10 20:10 ` Stefan Kangas
2021-09-25 1:29 ` Lars Ingebrigtsen
[not found] <504153FB-8633-4755-A91A-DF5DD64E6FAA@acm.org>
2021-09-28 3:01 ` akater
2021-09-28 5:23 ` Lars Ingebrigtsen
2021-09-28 10:11 ` Mattias Engdegård
2021-09-28 10:35 ` Mattias Engdegård
2021-09-28 16:39 ` akater
2021-09-29 18:12 ` bug#9622: [PATCH] " akater
2021-11-08 1:13 ` 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).