From 6416e6aaa29d5c0bf2e1298a44dabd183a919656 Mon Sep 17 00:00:00 2001
From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com>
Date: Wed, 27 Jun 2007 04:33:56 -0500
Subject: [PATCH] Upstream changes
---
moo/mooedit/gtksourceview/Makefile.am | 4 +-
.../gtksourceview/upstream/Makefile.am | 4 +-
.../upstream/gtksourcestylemanager.c | 45 +++++++++++++------
.../upstream/gtksourcestylemanager.h | 4 +-
moo/mooedit/language-specs/m4.lang | 15 ++++++-
5 files changed, 51 insertions(+), 21 deletions(-)
diff --git a/moo/mooedit/gtksourceview/Makefile.am b/moo/mooedit/gtksourceview/Makefile.am
index 61e23d28..c2feb41f 100644
--- a/moo/mooedit/gtksourceview/Makefile.am
+++ b/moo/mooedit/gtksourceview/Makefile.am
@@ -80,8 +80,8 @@ DISTCLEANFILES = $(xml_sources) $(no_xml_sources) $(gtksourceview_sources)
%-mangled.h: upstream/%.h upstream/mangle.sh
$(SHELL) $(srcdir)/upstream/mangle.sh $(srcdir)/upstream/$*.h > $@.tmp && mv $@.tmp $@
-upstream/%.o:
- $(MAKE) $*-mangled.o
+upstream/%.lo:
+ $(MAKE) $*-mangled.lo
libgtksourceview_la_SOURCES = \
$(gtksourceview_sources) \
diff --git a/moo/mooedit/gtksourceview/upstream/Makefile.am b/moo/mooedit/gtksourceview/upstream/Makefile.am
index 608effd3..9a3fe2f7 100644
--- a/moo/mooedit/gtksourceview/upstream/Makefile.am
+++ b/moo/mooedit/gtksourceview/upstream/Makefile.am
@@ -27,6 +27,6 @@ upstream_sources = \
EXTRA_DIST = $(upstream_sources) mangle.sh
%.lo:
- cd .. && make upstream/$*.o
-%.o:
cd .. && make upstream/$@
+%.o:
+ cd .. && make upstream/$*.lo
diff --git a/moo/mooedit/gtksourceview/upstream/gtksourcestylemanager.c b/moo/mooedit/gtksourceview/upstream/gtksourcestylemanager.c
index 5629d165..b942029d 100644
--- a/moo/mooedit/gtksourceview/upstream/gtksourcestylemanager.c
+++ b/moo/mooedit/gtksourceview/upstream/gtksourcestylemanager.c
@@ -370,33 +370,50 @@ reload_if_needed (GtkSourceStyleManager *mgr)
gtk_source_style_manager_reload (mgr);
}
-GSList *
-gtk_source_style_manager_list_schemes (GtkSourceStyleManager *mgr)
+/**
+ * gtk_source_style_manager_list_schemes:
+ * @manager: a #GtkSourceStyleManager
+ *
+ * Returns the list of style schemes.
+ *
+ * Returns: a list of #GtkSourceStyleScheme objects. Returned value
+ * is owned by @manager and must not be modified or freed. It may
+ * become invalid when style schemes are added or removed, so copy
+ * the list and reference its elements if you need to keep the list
+ * around.
+ **/
+const GSList *
+gtk_source_style_manager_list_schemes (GtkSourceStyleManager *manager)
{
- GSList *list;
+ g_return_val_if_fail (GTK_IS_SOURCE_STYLE_MANAGER (manager), NULL);
- g_return_val_if_fail (GTK_IS_SOURCE_STYLE_MANAGER (mgr), NULL);
+ reload_if_needed (manager);
- reload_if_needed (mgr);
-
- list = g_slist_copy (mgr->priv->schemes);
- g_slist_foreach (list, (GFunc) g_object_ref, NULL);
-
- return list;
+ return manager->priv->schemes;
}
+/**
+ * gtk_source_style_manager_get_scheme:
+ * @manager: a #GtkSourceStyleManager
+ * @scheme_id: style scheme id to find
+ *
+ * Looks up style scheme by id.
+ *
+ * Returns: a #GtkSourceStyleScheme object. Returned value is owned by
+ * @manager and must not be unref'ed.
+ **/
GtkSourceStyleScheme *
-gtk_source_style_manager_get_scheme (GtkSourceStyleManager *mgr,
+gtk_source_style_manager_get_scheme (GtkSourceStyleManager *manager,
const gchar *scheme_id)
{
GSList *l;
- g_return_val_if_fail (GTK_IS_SOURCE_STYLE_MANAGER (mgr), NULL);
+ g_return_val_if_fail (GTK_IS_SOURCE_STYLE_MANAGER (manager), NULL);
g_return_val_if_fail (scheme_id != NULL, NULL);
- reload_if_needed (mgr);
+ reload_if_needed (manager);
- for (l = mgr->priv->schemes; l != NULL; l = l->next)
+ for (l = manager->priv->schemes; l != NULL; l = l->next)
if (!strcmp (scheme_id, gtk_source_style_scheme_get_id (l->data)))
return l->data;
diff --git a/moo/mooedit/gtksourceview/upstream/gtksourcestylemanager.h b/moo/mooedit/gtksourceview/upstream/gtksourcestylemanager.h
index bf83f8f9..f98f33ab 100644
--- a/moo/mooedit/gtksourceview/upstream/gtksourcestylemanager.h
+++ b/moo/mooedit/gtksourceview/upstream/gtksourcestylemanager.h
@@ -71,8 +71,8 @@ gchar **gtk_source_style_manager_get_search_path (GtkSourceStyleManager
gboolean gtk_source_style_manager_add_scheme (GtkSourceStyleManager *manager,
const gchar *filename);
-/* Newly allocated list of schemes (to free: unref each one and call g_slist_free) */
-GSList *gtk_source_style_manager_list_schemes (GtkSourceStyleManager *manager);
+/* Pointer to internal list, do not modify */
+const GSList *gtk_source_style_manager_list_schemes (GtkSourceStyleManager *manager);
GtkSourceStyleScheme *gtk_source_style_manager_get_scheme (GtkSourceStyleManager *manager,
const gchar *scheme_id);
diff --git a/moo/mooedit/language-specs/m4.lang b/moo/mooedit/language-specs/m4.lang
index f972a69d..3b59e042 100644
--- a/moo/mooedit/language-specs/m4.lang
+++ b/moo/mooedit/language-specs/m4.lang
@@ -208,6 +208,17 @@
+
+ \b(AC_LANG)\s*(\()
+ \)
+
+
+
+
+
+
+
+
\b(AC_DEFUN(_ONCE)?|AM_CONDITIONAL)\s*(\()
\)
@@ -253,7 +264,7 @@
- \b(AC_CONFIG_COMMANDS|AC_ENABLE|AC_WITH|AC_TRY_CPP|AC_CHECK_HEADER)\s*(\()
+ \b(AC_CONFIG_COMMANDS|AC_ENABLE|AC_WITH|AC_TRY_CPP|AC_CHECK_HEADER|AC_LINK_IFELSE)\s*(\()
\)
@@ -266,6 +277,7 @@
+
@@ -619,6 +631,7 @@
LANG_C
LANG_CPLUSPLUS
LANG_FORTRAN77
+ LANG_OBJC
LANG_RESTORE
LANG_SAVE
LIBTOOL_DLOPEN