poke-devel
[Top][All Lists]
Advanced

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

[COMMITTED] pk-cmd-set: emit hyperlink when dumping error-on-warning


From: Jose E. Marchesi
Subject: [COMMITTED] pk-cmd-set: emit hyperlink when dumping error-on-warning
Date: Mon, 17 Jan 2022 04:03:50 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

2022-01-17  Jose E. Marchesi  <jemarch@gnu.org>

        * poke/pk-cmd-set.c (pk_cmd_set_dump): Make an hyperlink for
        error-on-warning.
---
 ChangeLog         |  5 +++++
 poke/pk-cmd-set.c | 20 ++++++++++++++++++--
 2 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a482f7a6..25f40d59 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2022-01-17  Jose E. Marchesi  <jemarch@gnu.org>
 
+       * poke/pk-cmd-set.c (pk_cmd_set_dump): Make an hyperlink for
+       error-on-warning.
+
+2022-01-17  Jose E. Marchesi  <jemarch@gnu.org>
+
        * poke/pk-table.pk: New file.
        * poke/Makefile.am (dist_pkgdata_DATA): Add pk-table.pk.
        * poke/pk-settings.pk (pk_settings_dump): Use pk_table.
diff --git a/poke/pk-cmd-set.c b/poke/pk-cmd-set.c
index 71640b19..1605ee7a 100644
--- a/poke/pk-cmd-set.c
+++ b/poke/pk-cmd-set.c
@@ -25,6 +25,7 @@
 #include "poke.h"
 #include "pk-cmd.h"
 #include "pk-utils.h"
+#include "pk-hserver.h"
 
 static int
 pk_cmd_set_dump (int argc, struct pk_cmd_arg argv[], uint64_t uflags)
@@ -36,8 +37,23 @@ pk_cmd_set_dump (int argc, struct pk_cmd_arg argv[], 
uint64_t uflags)
 
   if (pk_call (poke_compiler, registry_printer, &retval, 0) == PK_ERROR)
     assert (0); /* This shouldn't happen.  */
-  pk_printf ("error-on-warning %s\n",
-             pk_error_on_warning (poke_compiler) ? "yes" : "no");
+
+#if HAVE_HSERVER
+  {
+    char *hyperlink;
+
+    hyperlink = pk_hserver_make_hyperlink ('e', ".help error-on-warning", 
PK_NULL);
+    pk_term_hyperlink (hyperlink, NULL);
+  }
+#endif
+
+  pk_puts ("error-on-warning");
+
+#if HAVE_HSERVER
+  pk_term_end_hyperlink ();
+#endif
+  pk_printf (" %s\n", pk_error_on_warning (poke_compiler) ? "yes" : "no");
+
   return 0;
 }
 
-- 
2.11.0




reply via email to

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