unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* cc-mode: Make all parameters introduced in Emacs 26 optional
@ 2018-01-22  8:09 Jostein Kjønigsen
  2018-01-22 20:32 ` Alan Mackenzie
  0 siblings, 1 reply; 15+ messages in thread
From: Jostein Kjønigsen @ 2018-01-22  8:09 UTC (permalink / raw)
  To: emacs-devel; +Cc: Alan Mackenzie

[-- Attachment #1: Type: text/plain, Size: 1289 bytes --]

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?
--
Regards
Jostein Kjønigsen

jostein@kjonigsen.net 🍵 jostein@gmail.com
https://jostein.kjonigsen.net


[-- Attachment #2: Type: text/html, Size: 2291 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-03-30 21:53 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-22  8:09 cc-mode: Make all parameters introduced in Emacs 26 optional Jostein Kjønigsen
2018-01-22 20:32 ` Alan Mackenzie
2018-02-03  5:59   ` Matthew Carter
2018-02-03  6:13     ` Matthew Carter
2018-02-03 11:44       ` Alan Mackenzie
2019-03-30 13:51         ` Alan Mackenzie
2019-03-30 16:39           ` Stefan Monnier
2019-03-30 19:42             ` Alan Mackenzie
2019-03-30 20:17               ` Stefan Monnier
2019-03-30 21:53                 ` Ergus
2018-03-12 20:16   ` Jostein Kjønigsen
2018-03-12 22:40     ` Stefan Monnier
2018-03-12 23:29       ` Clément Pit-Claudel
2018-03-13  1:00         ` Stefan Monnier
2018-03-13 20:08       ` Jostein Kjønigsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).