From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eduardo Ochs Newsgroups: gmane.emacs.help Subject: Re: Passing hash-table or alist to a function Date: Sat, 14 Sep 2024 10:18:45 -0300 Message-ID: References: <78KvHREj_kseqGmp48qA0v56gl_f8lAftyZEaaAQfU_uy0ldB6u0Kuk9xbojMK5mtQDgr6BKK9-jUxbA_ET5ouvCpWSa0e8V2B5nrQbobFU=@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20324"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Heime via Users list for the GNU Emacs text editor To: Heime Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 14 15:19:36 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1spSgZ-00057x-GI for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 14 Sep 2024 15:19:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1spSg2-0001wQ-3a; Sat, 14 Sep 2024 09:19:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1spSg0-0001wA-CU for help-gnu-emacs@gnu.org; Sat, 14 Sep 2024 09:19:00 -0400 Original-Received: from mail-yw1-x1131.google.com ([2607:f8b0:4864:20::1131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1spSfz-0001uC-1b for help-gnu-emacs@gnu.org; Sat, 14 Sep 2024 09:19:00 -0400 Original-Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-6daf46ee332so14567537b3.0 for ; Sat, 14 Sep 2024 06:18:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726319937; x=1726924737; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=02mt9DoclbIF9aJ1DyEothcLDbvD20PPwvP0PF6r3Bc=; b=ItL+o8X0R7yeYve9lfsLEx4ugyHdUmkYmpp5IIXDG86DmtTXBwXgX9k/j1An+gYzqq FCYp427J65ep7vFhynsgEwRX0tJBUoMcCFbppL94fhXYJn4nVi7mn2xph9PG0UCRtfG3 l6tk3uDI7bvHDnLYZdHtMAggJmY+hFrbttycvUYRvRfYtmGcyDm+pRGjcPth/nk7BUDq JxxyLO79AIv4UbhKG5Sts7UpSdDRmIUcIHdFnM6plr8YqO6eyjIMdlDWUjQ5olFNehyY T8QevFb0YIx7lvw7HY2ey2dxcMXoIX9pBTCBStOcbqsEIAxAURF7iPBXQCUkZGF6XEmG 2ylA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726319937; x=1726924737; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=02mt9DoclbIF9aJ1DyEothcLDbvD20PPwvP0PF6r3Bc=; b=QUb/htGRqFJ9TTjbpeiEgnipHgUwVbs6z5tfVrDcmys3BnjIPvfRzDejA6X3wUbjQw 3NfvNkP6q65rmGjP2zHC+tEIP151/8fkDJBD9a+J7aCdHxOALAHrqoL6ypLrVDhM7gJi s8GPw8z0ks6SMHEU2MJqGLJ9X3K9nlh737XsP/HpKv4RYWfWxk/G8XrAG+kyKi4SRMcG 6CG41FqbIHhsVlfOk0UPJ+l63rZOTVzukjj/zI4fgIxpO2FrAmGorAQN4BH2J07V7Vy5 HQ9uBIG4uhrXFNjL7BiNyaL/m9TqRo/PjpZVyCjUwjSON0CUf4wBA33eNljAH+1bnXhQ pktw== X-Gm-Message-State: AOJu0YwBplVIFC+a2KwaJX7ijc7E3+tpe+arjS5eitHI/xIVpqhfHyVF 8fni4f0eagFXaXJdC2CZ/gADgJu/mA2beeaIIMkmAN83QB65CvRE/S3zz1ssUpAwLA0TMcHkoS6 xlFQvJulcB72RsUm34E2upHXT7tc= X-Google-Smtp-Source: AGHT+IFcxNcx8kkZg4cohoHfPChaYDuF8vdBKTXtohVEZFKbaRHFN6+kt7TevZ5kHClIHNHJ2XPtQPWZggM6r+wiKMM= X-Received: by 2002:a05:690c:2f0e:b0:6d1:f545:3d55 with SMTP id 00721157ae682-6dbcc2613f0mr45891537b3.12.1726319937470; Sat, 14 Sep 2024 06:18:57 -0700 (PDT) In-Reply-To: <78KvHREj_kseqGmp48qA0v56gl_f8lAftyZEaaAQfU_uy0ldB6u0Kuk9xbojMK5mtQDgr6BKK9-jUxbA_ET5ouvCpWSa0e8V2B5nrQbobFU=@protonmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::1131; envelope-from=eduardoochs@gmail.com; helo=mail-yw1-x1131.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147984 Archived-At: On Sat, 14 Sept 2024 at 10:07, Heime 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