From: Eduardo Ochs <eduardoochs@gmail.com>
To: Heime <heimeborgia@protonmail.com>
Cc: Heime via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org>
Subject: Re: Passing hash-table or alist to a function
Date: Sat, 14 Sep 2024 10:18:45 -0300 [thread overview]
Message-ID: <CADs++6hW+PC9wvJ0wEyA-+hpCV+gOS3fsbfmF936Lcjbv152oA@mail.gmail.com> (raw)
In-Reply-To: <78KvHREj_kseqGmp48qA0v56gl_f8lAftyZEaaAQfU_uy0ldB6u0Kuk9xbojMK5mtQDgr6BKK9-jUxbA_ET5ouvCpWSa0e8V2B5nrQbobFU=@protonmail.com>
On Sat, 14 Sept 2024 at 10:07, Heime <heimeborgia@protonmail.com> wrote:
>
> Have mode the following function
>
> (defvar xiakos-fpln (make-hash-table :test 'equal)
> "Hash table storing paths for different xiakos components.")
>
> Can one distinguish passing a hash-table or an alist to a
> function, how ?
Try:
(setq ht (make-hash-table))
(puthash :key1 :val1 ht)
(puthash :key2 :val2 ht)
ht
(setq al '((:key1 . :val1) (:key2 . :val2)))
al
(hash-table-p ht)
(hash-table-p al)
Cheers,
Eduardo
next prev parent reply other threads:[~2024-09-14 13:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-14 13:06 Passing hash-table or alist to a function Heime
2024-09-14 13:18 ` Eduardo Ochs [this message]
2024-09-14 16:06 ` tomas
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=CADs++6hW+PC9wvJ0wEyA-+hpCV+gOS3fsbfmF936Lcjbv152oA@mail.gmail.com \
--to=eduardoochs@gmail.com \
--cc=heimeborgia@protonmail.com \
--cc=help-gnu-emacs@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.