emacs-devel
[Top][All Lists]
Advanced

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

Re: [nongnu] elpa/idris-mode e7e2a6c3bc 3/8: Remove dependency on if-let


From: Philip Kaludercic
Subject: Re: [nongnu] elpa/idris-mode e7e2a6c3bc 3/8: Remove dependency on if-let* defined in subr-x
Date: Fri, 11 Nov 2022 16:00:51 +0000

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.



reply via email to

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