From: Emanuel Berg <incal@dataswamp.org>
To: emacs-devel@gnu.org
Subject: Re: [ELPA] New package: hcel
Date: Wed, 21 Sep 2022 09:44:11 +0200 [thread overview]
Message-ID: <87wn9xgoj8.fsf@dataswamp.org> (raw)
In-Reply-To: 87k05xb3ew.fsf@web.de
Michael Heerdegen wrote:
> Hmm - no, I think the problem is the reference in the
> interactive form - AFAIK, variables in interactive forms
> can't refer to the lexical environment. See Bug#51695.
> I don't recall a nice solution for this kind of problem
> (anyone?).
Yours was good (get the spec from a function) but it is still
a workaround.
;;; -*- lexical-binding: t -*-
;;
;; this file:
;; https://dataswamp.org/~incal/emacs-init/w3m/w3m-survivor.el
(require 'w3m-search)
(require 'cl-lib)
(let ((opts "torrent magnet 720p")
(show "Survivor")
(prompt "episode: ") )
(let ((next 1))
(defun australian-survivor-interactive ()
(list (read-number prompt next)) )
(declare-function australian-survivor-interactive nil)
(defun australian-survivor (ep)
(interactive (australian-survivor-interactive))
(w3m-search w3m-search-default-engine
(format "\"s10e%02d\" Australian %s %s" ep show opts) )
(setq next (1+ ep)) )
(declare-function australian-survivor nil) )
(defalias 'aus #'australian-survivor)
(let ((next 1))
(defun us-survivor-interactive ()
(list (read-number prompt next)) )
(declare-function us-survivor-interactive nil)
(defalias 'us #'us-survivor-interactive)
(defun us-survivor (ep)
(interactive (us-survivor-interactive))
(w3m-search w3m-search-default-engine
(format "\"s43e%02d\" %s %s" ep show opts) )
(setq next (1+ ep)) )
(declare-function us-survivor nil)
(defalias 'usa #'us-survivor) ))
--
underground experts united
https://dataswamp.org/~incal
prev parent reply other threads:[~2022-09-21 7:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-10 15:01 [ELPA] New package: hcel Yuchen Pei
2022-09-17 0:40 ` Yuchen Pei
2022-09-19 0:15 ` How Do I submit a package to ELPA? (was Re: [ELPA] New package: hcel) Yuchen Pei
2022-09-20 21:26 ` [ELPA] New package: hcel Stefan Monnier
2022-09-21 6:18 ` Yuchen Pei
2022-09-21 12:03 ` Stefan Monnier
2022-09-20 21:42 ` Stefan Monnier
2022-09-21 5:58 ` Yuchen Pei
2022-09-21 6:21 ` Stefan Kangas
2022-09-21 7:19 ` Michael Heerdegen
2022-09-21 7:44 ` Emanuel Berg [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wn9xgoj8.fsf@dataswamp.org \
--to=incal@dataswamp.org \
--cc=emacs-devel@gnu.org \
/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 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.