--synclines adds #line 4711 after #define xyz(abc) ...\

"Kadlec, Albrecht" <[email protected]>
Newsgroups gmane.comp.gnu.m4.bugs
Message-ID <PH0PR08MB66301C99119D8749A2B9C47389DB0@PH0PR08MB6630.namprd08.prod.outlook.com>
Hi,

We are using GNU m4 1.4.18:  are there any plans for extensions a'la a c-mode via
-synclines=c,'#line __line__ "__file__"'
(also defining the lead-in per file) to add line-continuation awareness and maybe even comment awareness ?
Or a function
syncline(`#line '__line__ "__file__")
to enable switching on/off/changing the syntax?
Do you accept up-streaming contributions? -> next deadline/release?


We could also need fewer #line directives (not in comments & macros that were inserted via m4), so switching -s on and off from the included m4 file would be nice.

e.g.: fileheader included via m4 include of a template file:
#line 1 ".../CanNm_Int.h.m4"
/**
#line 1
* \file
#line 1
*
#line 1
* \brief AUTOSAR CanNm
#line 1
*
#line 1
* This file contains the implementation of the AUTOSAR
#line 1
* module CanNm.
#line 1
*
#line 1
* \version 6.19.5
#line 1
*
#line 1
* \author Elektrobit Automotive GmbH, 91058 Erlangen, Germany
#line 1
*
#line 1
* Copyright 2005 - 2021 Elektrobit Automotive GmbH
#line 1
* All rights exclusively reserved for Elektrobit Automotive GmbH,
#line 1
* unless expressly agreed to otherwise.
#line 1
*/

Or later-on: who cares where the whitespace lines came from:
#line 93 "..../xyz.m4"

#line 285

#line 350

#line 30 ".../CanNm_Int.h.m4"

#line 30
/*------------------------[Defensive programming]----------------------------*/
#line 30

#line 30


And last but not last the gem that triggered this mail:

#line 30
/** \brief Report an assertion violation to Det
#line 30
**
#line 30

#line 30
** \param[in] Condition The condition which is verified
#line 30
** \param[in] ApiId The service ID of the API function */
#line 30
#define CANNM_PRECONDITION_ASSERT_NO_EVAL(Condition, ApiId) \
#line 30
  DET_PRECONDITION_ASSERT_NO_EVAL((Condition), CANNM_MODULE_ID, CANNM_INSTANCE_ID, (ApiId))
#line 30

Thank you for your time & best regards,
Albrecht Kadlec
(participated in emacs/gnus & fvwm2/FvwmAuto/FvwmEvent development a long time ago as well as a bit of llvm: ARM-BE support more recently)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.