From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Luca Ferrari Newsgroups: gmane.emacs.help Subject: c indent when a function has other attributes Date: Wed, 8 Jan 2025 15:47:09 +0100 Message-ID: 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="7278"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 08 15:48:24 2025 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 1tVXM7-0001n9-QP for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 08 Jan 2025 15:48:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVXLd-00062t-Gm; Wed, 08 Jan 2025 09:47:53 -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 1tVXLa-00062Y-Jz for help-gnu-emacs@gnu.org; Wed, 08 Jan 2025 09:47:50 -0500 Original-Received: from mail-oa1-x2a.google.com ([2001:4860:4864:20::2a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tVXLZ-0001sa-86 for help-gnu-emacs@gnu.org; Wed, 08 Jan 2025 09:47:50 -0500 Original-Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-29645a83b1bso8407261fac.1 for ; Wed, 08 Jan 2025 06:47:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736347667; x=1736952467; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=zXXDVTosWXAayYUVGlBMY34AMN+6prUE3ZoHZPMriSY=; b=UKDENuf5ZlVXnJKLKTDfJ9lzqfz0CXfEkmF0ATfSGY/fIhc2SRDJ5MMghb/ruTrSEp fXoV3SC75kxCz/v3T2wsPg16xXtLpJxjkqBgw3SpBN21KCZMwkL68ei7T1zTV1/ldJ7j m2ygKhGJd1tLCNdeXrISY29T+ouWUCpgOjTm2Hgt/HqzTZKAA+CDlUUB1t03u3Vwtfb7 GNw9mHOzsv3z9fZ/HHAKwgwQwVOoeB9TmI2CAo8P29cmLthKlGgQ+C6sxssUj2phv7XN +rMXp+I13Vmzc5ILAVdo4cdct2FiSHkQIqTgIncYVWNhgMAJcRDP1+f4bnGhxFrVfM/5 Ry1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736347667; x=1736952467; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=zXXDVTosWXAayYUVGlBMY34AMN+6prUE3ZoHZPMriSY=; b=vG2Z25AwI0DXyzdAMgZ9kwDoakg2M1nDNe4Bz5YWfHOOlEvCp3xr63XdezWZWqh+d+ J6Lt7hm7SJAK8GbZoiofx6qbjGH2CdrIb6wUiwpU6EQan0fKVKVusKNg9NKOrsMxRmE0 f9gjWOWFtBHpmN+mjSuz4mp4gbo/456asAH+1yE7ftFJrAmPP6riE9Rlsmag8Rs47MH4 FouaVIx6UnbgCXU/w0CWsGKlfaFkZrljIcKpJkbWWb2zpgPWn7jHiR7fR41BKFJft01A BhSOa7FHWH013Bpn/kaauKC5rDD6TI6ED5NZh9kbHJarb+0lh5AKjrKxY3JETZCGweWh Ys9g== X-Gm-Message-State: AOJu0Yxbf6LN32eVQF5HGFzG+halfulnREBiwzwmq3dXsL0rluX60v9x czSyMPTuz0lpNSJGwWasOh/k8W3NYy8MbfjrswNEQtNGrAtPM3QZVa9aS6YRbyj6hz2kcsDRACY YlL3UAjYc1p5X9Oim1445jWB/gJiofz57 X-Gm-Gg: ASbGncsYZIVV0oTCvlB92hxVTQwjsSM9AHOAARnEAS1S/er8JUZZG8+Nse1OaDa99vG rqs9OQlVJTXyYRk6H1UfiuiT1v1U4rgCUSR6zVA== X-Google-Smtp-Source: AGHT+IGZgO7tU48JUbw4Guc9WEp9KPsLkSu3u5n2futvSXmVB/lwnxNaX+35wpiDpgJB3rMN7z1bgaziKfIIP/sENAQ= X-Received: by 2002:a05:6871:4608:b0:29e:3bea:7e55 with SMTP id 586e51a60fabf-2aa068d64bemr1919807fac.26.1736347665992; Wed, 08 Jan 2025 06:47:45 -0800 (PST) X-Gm-Features: AbW1kvYQXExofb1eSEXAqBgpo8-2KdjgGJrkHaWk2zN5GkVC6mCIA21sol5djcc Received-SPF: pass client-ip=2001:4860:4864:20::2a; envelope-from=fluca1978@gmail.com; helo=mail-oa1-x2a.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, 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:149164 Archived-At: Hi al, I'm having this problem with c-mode and C-M-\ (withour any regard to the c-style): when a function declaration has an __alignment__ gcc macro Emacs seems to screw up all indentation. For example: static void foo(char *bar) __attribute__((noreturn)); static void bar(); when I indent the code I end up with something like: static void foo(char *bar) __attribute__((noreturn)); static void bar(); where the lines following the __attribute__ macro are all screwed up. Is there a way to instrument Emacs to "indent" by means of the semicolon? Thanks, Luca