From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.help Subject: Re: How to check whether the current line is a comment-only one? Date: Thu, 18 Aug 2016 16:43:50 +0200 Message-ID: <8760qyf87t.fsf@zigzag.favinet> References: <87vayyppop.fsf@mbork.pl> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1471558176 28876 195.159.176.226 (18 Aug 2016 22:09:36 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 18 Aug 2016 22:09:36 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cc: Help Gnu Emacs mailing list To: Marcin Borkowski Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 19 00:09:32 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1baVVD-0007Dz-Sp for geh-help-gnu-emacs@m.gmane.org; Fri, 19 Aug 2016 00:09:32 +0200 Original-Received: from localhost ([::1]:54510 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1baVVB-0007P9-3F for geh-help-gnu-emacs@m.gmane.org; Thu, 18 Aug 2016 18:09:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1baURl-0002Gp-H5 for help-gnu-emacs@gnu.org; Thu, 18 Aug 2016 17:01:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1baURg-0001lc-Ih for help-gnu-emacs@gnu.org; Thu, 18 Aug 2016 17:01:52 -0400 Original-Received: from mail.agora-net.com ([67.59.132.6]:34513) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1baURg-0001lW-F0 for help-gnu-emacs@gnu.org; Thu, 18 Aug 2016 17:01:48 -0400 Original-Received: from ttn by mail.agora-net.com with local (Exim 4.82) (envelope-from ) id 1baURc-0003Hl-Sr; Thu, 18 Aug 2016 17:01:44 -0400 Original-Received: from ttn by zigzag.favinet with local (Exim 4.80) (envelope-from ) id 1baOY3-0000pQ-5x; Thu, 18 Aug 2016 16:43:59 +0200 In-Reply-To: <87vayyppop.fsf@mbork.pl> (Marcin Borkowski's message of "Thu, 18 Aug 2016 08:16:22 +0200") X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: ttn@gnuvola.org X-SA-Exim-Scanned: No (on mail.agora-net.com); SAEximRunCond expanded to false X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 67.59.132.6 X-Mailman-Approved-At: Thu, 18 Aug 2016 18:08:54 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:111179 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable () Marcin Borkowski () Thu, 18 Aug 2016 08:16:22 +0200 predicate function to determine whether the line the point is in is entirely a comment line? I'd prefer this function to work in various modes (for Elisp mode, it's trivial; for C, less so). Aside from the other suggestions, see also =E2=80=98hs-inside-comment-p=E2= =80=99 (from hideshow.el). =2D-=20 Thien-Thi Nguyen ----------------------------------------------- (defun responsep (type via) (case type (technical (eq 'mailing-list via)) ...)) 748E A0E8 1CB8 A748 9BFA =2D-------------------------------------- 6CE4 6703 2224 4C80 7502 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAle1yakACgkQZwMiJEyAdQJerACfQDwSKF5rbJTbIvtlsYS7eL+j TmQAn1RiVJE8XinIbIAzYx+uCss6++eQ =bt71 -----END PGP SIGNATURE----- --=-=-=--