From: Yuchen Pei <id@ypei.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Emacs Devel mailing list <emacs-devel@gnu.org>
Subject: Re: [ELPA] New package: hcel
Date: Wed, 21 Sep 2022 15:58:50 +1000 [thread overview]
Message-ID: <87r105s1yd.fsf@ypei.org> (raw)
In-Reply-To: <jwvpmfprafx.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 20 Sep 2022 17:42:43 -0400")
On Tue 2022-09-20 17:42:43 -0400, Stefan Monnier wrote:
> BTW, here's a patch with various cosmetic changes.
Thanks for the patch - it is very educational. I have applied it and
made many other changes in a similar fashion.
A few remaining questions:
> (defun hcel-results-next-page ()
> (interactive)
> + ;; FIXME: Using `major-mode' is a code smell.
> (unless (memq major-mode '(hcel-refs-mode hcel-ids-mode))
> (error "Not in hcel-refs or hcel-ids mode: %S" major-mode))
What do you mean, should I avoid using the variable `major-mode'? Why?
> In end of data:
> packages/hcel/hcel-client.el:142:8: Warning: the function
> ‘delete-http-header’ is not known to be defined.
> packages/hcel/hcel-client.el:59:19: Warning: the function
> ‘hcel-location-tag’ is not known to be defined.
> packages/hcel/hcel-client.el:47:43: Warning: the function
> ‘hcel-format-package-id’ is not known to be defined.
> Byte compiling packages/hcel/hcel-results.el
How do I get these "end of data" warnings? When I do M-x byte-compile
or byte-recompile-directory I don't get them.
>
> In hcel-module-selector:
> packages/hcel/hcel.el:55:43: Warning: reference to free variable
> ‘package-id’
I thought this was OK because of lexical-binding? For reference, here's
the defun:
(defun hcel-module-selector (package-id)
(lambda (module-path)
(interactive
(list
(completing-read "Select module: "
(hcel-list-modules package-id))))
(switch-to-buffer
(hcel-load-module-source package-id module-path))))
It seems to me to be similar to the problem described in
<https://lists.gnu.org/archive/html/help-gnu-emacs/2012-08/msg00296.html>.
Best,
Yuchen
--
PGP Key: 47F9 D050 1E11 8879 9040 4941 2126 7E93 EF86 DFD0
<https://ypei.org/assets/ypei-pubkey.txt>
next prev parent reply other threads:[~2022-09-21 5:58 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 [this message]
2022-09-21 6:21 ` Stefan Kangas
2022-09-21 7:19 ` Michael Heerdegen
2022-09-21 7:44 ` Emanuel Berg
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r105s1yd.fsf@ypei.org \
--to=id@ypei.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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 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).