all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [nongnu] elpa/idris-mode e7e2a6c3bc 3/8: Remove dependency on if-let* defined in subr-x
       [not found] ` <20221111115858.91A0EC0E4CB@vcs2.savannah.gnu.org>
@ 2022-11-11 14:00   ` Stefan Monnier
  2022-11-11 16:00   ` Philip Kaludercic
  1 sibling, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2022-11-11 14:00 UTC (permalink / raw)
  To: Marek Labos; +Cc: emacs-devel

>     Remove dependency on if-let* defined in subr-x
>     
>     Why:
>     to test if this fixes issue `(seq-find .. ) is a malformed function`
>     https://github.com/idris-hackers/idris-mode/pull/558#issuecomment-1307149527

`if-let*` was indeed defined in `subr-x` and `idris-commands.el` fails
to (require 'subr-x), so ... yes I'd expect errors (tho probably more of
the form "(a-buf ...) is a malformed function").  You won't see them in
all Emacs versions, tho, because recent versions have moved that macro
to `subr.el`.


        Stefan




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [nongnu] elpa/idris-mode e7e2a6c3bc 3/8: Remove dependency on if-let* defined in subr-x
       [not found] ` <20221111115858.91A0EC0E4CB@vcs2.savannah.gnu.org>
  2022-11-11 14:00   ` [nongnu] elpa/idris-mode e7e2a6c3bc 3/8: Remove dependency on if-let* defined in subr-x Stefan Monnier
@ 2022-11-11 16:00   ` Philip Kaludercic
  1 sibling, 0 replies; 2+ messages in thread
From: Philip Kaludercic @ 2022-11-11 16:00 UTC (permalink / raw)
  To: emacs-devel; +Cc: Marek Labos

ELPA Syncer <elpasync@gnu.org> writes:

> branch: elpa/idris-mode
> commit e7e2a6c3bc56a72b3edb8dedef7f4b3c63bcd1f8
> Author: Marek Labos <marek@syftapp.com>
> Commit: Marek Labos <marek@syftapp.com>
>
>     Remove dependency on if-let* defined in subr-x
>     
>     Why:
>     to test if this fixes issue `(seq-find .. ) is a malformed function`
>     https://github.com/idris-hackers/idris-mode/pull/558#issuecomment-1307149527
> ---
>  idris-commands.el | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/idris-commands.el b/idris-commands.el
> index 9e77008042..a11bba322a 100644
> --- a/idris-commands.el
> +++ b/idris-commands.el
> @@ -960,11 +960,12 @@ Inspired by `cider-switch-to-last-clojure-buffer'
>  https://github.com/clojure-emacs/cider"
>    (interactive)
>    (if (derived-mode-p 'idris-repl-mode)
> -      (if-let* ((a-buf (seq-find
> -                        (lambda (b) (eq 'idris-mode (buffer-local-value 'major-mode b)))
> -                        (buffer-list))))
> -          (pop-to-buffer a-buf `(display-buffer-reuse-window))
> -        (user-error "No Idris buffer found"))
> +      (let ((idris-buffer (seq-find
> +                           (lambda (b) (eq 'idris-mode (buffer-local-value 'major-mode b)))
> +                           (buffer-list))))
> +        (if idris-buffer
> +            (pop-to-buffer idris-buffer `(display-buffer-reuse-window))
> +          (user-error "No Idris buffer found")))
>      (user-error "Not in a Idris REPL buffer")))
>  
>  (defun idris-quit ()

Are you sure that subr-x was loaded?  It is usually best to have a

    (eval-when-compile (require 'subr-x))

at the top of the file so that those macros get simplified away at
compile time.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-11 16:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <166816793805.30580.17048508686295430872@vcs2.savannah.gnu.org>
     [not found] ` <20221111115858.91A0EC0E4CB@vcs2.savannah.gnu.org>
2022-11-11 14:00   ` [nongnu] elpa/idris-mode e7e2a6c3bc 3/8: Remove dependency on if-let* defined in subr-x Stefan Monnier
2022-11-11 16:00   ` Philip Kaludercic

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.