From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin-kemp@brusseler.com Newsgroups: gmane.emacs.help Subject: Re: Using comment characters for specific major modes Date: Tue, 8 Jun 2021 11:14:59 +0200 (CEST) Message-ID: References: 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="12214"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?UTF-8?Q?Stefan=20M=C3=B6ding?= , help-gnu-emacs@gnu.org To: "Jean Louis" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 08 11:16:18 2021 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 1lqXqL-0002ui-HF for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 08 Jun 2021 11:16:17 +0200 Original-Received: from localhost ([::1]:59682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqXqJ-0005qj-1k for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 08 Jun 2021 05:16:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqXpj-0005qU-Tz for help-gnu-emacs@gnu.org; Tue, 08 Jun 2021 05:15:39 -0400 Original-Received: from msg-2.mailo.com ([213.182.54.12]:33968) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqXph-00035s-1C for help-gnu-emacs@gnu.org; Tue, 08 Jun 2021 05:15:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=brusseler.com; s=mailo; t=1623143699; bh=QXGXIi2S2RlaRbzSqromnCjAhX3TAUK9OvNQULL/h1g=; h=X-EA-Auth:From:To:Cc:Date:Subject:MIME-Version:X-Mailer: Message-ID:In-Reply-To:Content-Type; b=ti/ULYWLgZmdey8I1YbyfD4flGi+N2cXRFc+daBvotwGmfapY8LBmpv8x2LHreNc7 qJkzRA4QBk3dXUF1O7yvXMQhzf62YpdFbTjkCJFdvtLKQxBXaYkUEIeqV/2d2Cnn+p Lh3e9smQjdY1Lp4NDeA4bOxygUh1/URDp2cXhjUU= Original-Received: by www-8.mailo.com with http webmail; Tue, 8 Jun 2021 11:14:59 +0200 (CEST) X-EA-Auth: rd8PzXemxu+QTAo8byf1qxOd/PGb1A5Q2b9QmM/c6CL0yE/+qGPjNlI7HDVediIjsDUcoPFLO4EvPjaEeXClJkuCeNjyeAky X-Priority: 3 X-Mailer: COMS/EA21.01/r20210415 In-Reply-To: Received-SPF: pass client-ip=213.182.54.12; envelope-from=martin-kemp@brusseler.com; helo=msg-2.mailo.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, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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:130618 Archived-At: Might have found a problem when trying it in the scratch buffer. From: Jean Louis To: martin-kemp@brusseler.com Subject: Re: Using comment characters for specific major modes Date: 06/06/2021 22:50:39 Europe/Paris Cc: Stefan M=C3=B6ding ; =C2=A0=C2=A0=C2=A0help-gnu-emacs@gnu.org * martin-kemp@brusseler.com [2021-06-06 20:37]= : > I understand better now, you try to set "cs" in the "let" using cond. >=20 >=20 >=20 > Am still getting nil though.=C2=A0 Have changed the code somewhat. (defun my-cs () (let* ((m 62) (n 69) (lena (- m (current-column))) (cs (cond ((eq major-mode 'emacs-lisp-mode) ";;") ((eq major-mode 'texinfo-mode) "@c") ((eq major-mode 'f90-mode) "!!") ((eq major-mode 'fortran-mode)"cc")))) cs)) (my-cs) =E2=87=92 ";;" It works, as I turnedd on emacs-lisp mode. --=20 Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/