From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.help Subject: Re: Passing character ch to make-string Date: Sun, 1 Nov 2020 20:55:13 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14647"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/+ (1036f0e) (2020-10-18) Cc: "help-gnu-emacs@gnu.org" To: jai-bholeki Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 01 18:56:00 2020 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 1kZHaC-0003hw-5s for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 01 Nov 2020 18:56:00 +0100 Original-Received: from localhost ([::1]:36630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZHaB-0005Jb-6C for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 01 Nov 2020 12:55:59 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54402) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZHZZ-0005Iw-V9 for help-gnu-emacs@gnu.org; Sun, 01 Nov 2020 12:55:21 -0500 Original-Received: from static.rcdrun.com ([95.85.24.50]:50081) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZHZY-0007PY-03 for help-gnu-emacs@gnu.org; Sun, 01 Nov 2020 12:55:21 -0500 Original-Received: from localhost ([::ffff:197.157.0.60]) (AUTH: PLAIN admin, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by static.rcdrun.com with ESMTPSA id 00000000002A0B3B.000000005F9EF685.00000A19; Sun, 01 Nov 2020 17:55:16 +0000 Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=95.85.24.50; envelope-from=bugs@gnu.support; helo=static.rcdrun.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/01 10:30:20 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_SORBS_WEB=1.5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.help:124878 Archived-At: * jai-bholeki via Users list for the GNU Emacs text editor [2020-11-01 20:48]: > How can I pass a character ch to make-string > > (make-string 8 ?ch) You would always read function documentation by using: C-h f C-h f make-string RET it would give: make-string is a built-in function in ‘C source code’. (make-string LENGTH INIT &optional MULTIBYTE) Other relevant functions are documented in the string group. Probably introduced at or before Emacs version 1.12. This function does not change global state, including the match data. Return a newly created string of length LENGTH, with INIT in each element. LENGTH must be an integer. INIT must be an integer that represents a character. If optional argument MULTIBYTE is non-nil, the result will be a multibyte string even if INIT is an ASCII character. So now we see that INIT is integer that represents a character. If character is = you may place cursor on character and do: M-x describe-char and you would see the integer for character like codepoint 61. Then you apply character in (make-string 8 61) to get string like ======== -- There are 50 messages yet in my incoming mailbox.