Re: Tweaks to compile cc-mode on XEmacs 21.4

Alan Mackenzie <[email protected]> Sun, 27 Aug 2023 19:13:28 +0000
Newsgroups gmane.emacs.cc-mode.general
Message-ID <ZOugWGkxKxSjpt4g@ACM>
Hello, Richard.

Thanks for the feedback!

On Sat, Aug 26, 2023 at 10:34:28 +0100, Richard Hopkins wrote:
> Hi Alan,

> I've successfully compiled the latest cc-mode on XEmacs 21.4.24 which
> is also used to build packages, but it required a few minor tweaks.  I
> can prepare a patch for the XEmacs cc-mode package (although they will
> also work on GNU too) if you are interested but thought I'd describe
> the issues first

> 1) Remove :safe as part of the defcustom as it's not recognised on
>     21.4.24.

> 2) Explicitly specify the lower bound of {m,n} for (c-lang-defconst
> c-symbol-key).

> 3) A documentation tweak for building on older versions of makeinfo
> (e.g. CentOS 7.9)

>     Add "GNU Free Documentation License" to the main menu in 
> cc-mode.texi:250 to resolve
> cc-mode.texi:7673: warning: node next `Mailing Lists and Bug Reports' in 
> menu `Command and Function Index' and in sectioning `GNU Free 
> Documentation License' differ
> cc-mode.texi:7715: warning: unreferenced node `GNU Free Documentation 
> License'
> cc-mode.texi:7715: warning: node `Command and Function Index' is next 
> for `GNU Free Documentation License' in sectioning but not in menu
> cc-mode.texi:7715: warning: node `Mailing Lists and Bug Reports' is prev 
> for `GNU Free Documentation License' in sectioning but not in menu
> cc-mode.texi:7715: warning: node `Top' is up for `GNU Free Documentation 
> License' in sectioning but not in menu
> cc-mode.texi:250: node `Top' lacks menu item for `GNU Free Documentation 
> License' despite being its Up target
> cc-mode.texi:7722: warning: node prev `Command and Function Index' in 
> menu `Mailing Lists and Bug Reports' and in sectioning `GNU Free 
> Documentation License' differ
> make: *** [cc-mode.info] Error 1

> I've been using these changes on 21.4.24 and 21.5.35 so far without
> any issues.  Any thoughts?

CC Mode no longer supports older versions of XEmacs, such as 21.4.24.
As you are aware, :safe and "\{,n\}" work OK in XEmacs 21.5.35.

I took this decision to abandon support for older versions, I think,
after discovering (and fixing) a bug in src/syntax.c, where a scanning
function failed to check " and ' for syntax-table properties, leading to
errors in CC Mode's fontification of unterminated strings.  This commit
was:

Commit: d213373ceb01
Date: 2020-07-11
Author: Alan Mackenzie
FScan_sexps(), respect syntax-table properties on putative terminating quotes

The error in the main menu for cc-mode.texi is just a bug.  Thanks for
telling me about it!  I generated that main menu in GNU Emacs's
texinfo mode with C-c C-u m.  There appears to be a bug in that command;
it missed out the entry for the free documentation license.  I'll fix
this.

Thanks for the offer of a patch, but I think this would be more work for
you than it would save me.  ;-)  I think I want to find out first why
that C-c C-u m didn't work, and maybe fix it.

Just as a matter of interest, I'm currently moving CC Mode from
SourceForge to Savannah, after feeling unable to agree to the newest
edition of SF's terms and conditions.  That's the reason for including
the Free Documentation Licence in the CC Mode manual, it basically being
a requirement for GNU manuals in Savannah.  I got distracted from this
three weeks ago by a problem in Emacs, but hope to finish it "soon".

> Best,
> Richard

> p.s. Thanks for all the great work on cc-mode - for me the defaults
> Just Work whether I'm using GNU or XEmacs.

Thanks, that's appreciated!

-- 
Alan Mackenzie (Nuremberg, Germany).