From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: Passing a list of symbols to function argument Date: Fri, 29 Nov 2024 17:34:01 +0000 Message-ID: Reply-To: Heime Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28931"; mail-complaints-to="usenet@ciao.gmane.io" To: Heime via Users list for the GNU Emacs text editor Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 29 18:36:44 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 1tH4v6-0007Op-8b for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 29 Nov 2024 18:36:44 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tH4sm-00011v-72; Fri, 29 Nov 2024 12:34:20 -0500 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 1tH4se-0000cE-KS for help-gnu-emacs@gnu.org; Fri, 29 Nov 2024 12:34:14 -0500 Original-Received: from mail-4325.protonmail.ch ([185.70.43.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tH4sc-000281-8l for help-gnu-emacs@gnu.org; Fri, 29 Nov 2024 12:34:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1732901645; x=1733160845; bh=kUe7/QhSHB+zqPBkPHf5u3Wn38er+T/8e2VCPPdjrec=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector: List-Unsubscribe:List-Unsubscribe-Post; b=ZTRfoUnxWQGtuKge6Q3mB/XQmGimb8ZghDYfc12Pv2gtYybuoCxEJaiq9MXPsPxnz MuFvKD3EPwA/xQyxr/eYovF72J4RqiHvhjW9D7LYcyTajLJiyirxi0DO/jgqSZzpt0 pZxMVfzuPFPzfO0aTbSdSf9QazR+vKqQiHUIVdLhFn4kWowbvzZ/RWY6p9dyX9a6Bc mb7K60HMHHCjm9MmMmzwkRT/I/al9GsOlKWS99NOVsKlLXRSNl429RIYQ+ASkKN3IK Au8wbSDmjiUPPSDYXl03APXd1/jsihXy6q29VN/M3wV42WjbMfSHvg9jVyu3UqXB6G SI9MCQnnDruiA== Feedback-ID: 57735886:user:proton X-Pm-Message-ID: fcf1f6d83f95de7f149bd2a959638255033971ca Received-SPF: pass client-ip=185.70.43.25; envelope-from=heimeborgia@protonmail.com; helo=mail-4325.protonmail.ch 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_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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:148442 Archived-At: Why do I get=20 Wrong type argument: stringp, tabtrail When using the call=20 (poalatuk '(72 tabtrail global)) to the function (defun poalatuk (actm-seqr) (interactive (let* ( (colw (read-number "Line Column: " 72)) (cseq '("extended" "disable" "tabtrail")) (rsel (completing-read "Selector: " cseq nil t "tabtrail")) (scope (completing-read "Scope: " '("global" "local") nil t "local")) ) ;; Pass a single list as argument (list (list colw rsel scope))) ) ;; ------------------------------------------------------------- (message "poalatuk: %S" actm-seqr) (let* ( (colw (nth 0 actm-seqr)) ;; Extract column width. (rsel (intern (nth 1 actm-seqr))) ;; Extract mode selector. (scope (intern (nth 2 actm-seqr))) ) ;; Extract scope. (require 'whitespace) (if (eq scope 'global) (global-whitespace-mode 0) (whitespace-mode 0)) (pcase rsel ('tabtrail (setq whitespace-line-column (or colw 72)) (setq whitespace-style '(face tabs tab-mark trailing lines-char)) (if (eq scope 'global) (global-whitespace-mode 1) (whitespace-mode 1))) ('extended (setq whitespace-line-column (or colw 72)) (setq whitespace-style '(face tabs tab-mark indentation trailing lines-char space-before-tab space-after-tab)) (if (eq scope 'global) (global-whitespace-mode 1) (whitespace-mode 1)) ) ('disable (if (eq scope 'global) (global-whitespace-mode 0) (whitespace-mode 0)) )) )) I want to pass alist as an argument to the function such as =20 (poalatuk '(72 tabtrail global)) And expecting that actm-seqr would be alist.