[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cc-mode: Make all parameters introduced in Emacs 26 optional

From: Jostein Kjønigsen
Subject: cc-mode: Make all parameters introduced in Emacs 26 optional
Date: Mon, 22 Jan 2018 09:09:21 +0100

Hey everyone.

While cc-mode seems to be a foundation for lots of the major-modes shipped with Emacs, it's also used by third-party packages.

For major-modes shipped with Emacs, changes to the core cc-mode functions is not that big of a problem, since they can be changed in tandem with the changes to cc-mode itself.

For third party modules (like csharp-mode, which I maintain), changes to cc-mode core-functions are more problematic due to Emacs lacking reliable introspection capabilities.

As an example in the Emacs 26 branch c-font-lock-declarators is now declared like this:

(defun c-font-lock-declarators (limit list types not-top &optional template-class)

While in Emacs 25.3 and earlier it's declared like this:

(defun c-font-lock-declarators (limit list types)

Basically the number of mandatory parameters has been bumped from 3 to 4, with another optional parameter added.

These kinds of changes makes it harder for third party modules to maintain compatibility across Emacs-versions.

Wouldn't it be better to make all the new parameters optional and thus maintain compatibility? Are there any good reasons not to do so?

Jostein Kjønigsen

address@hidden 🍵 address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]