aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2014-11-03 19:14:50 +0200
committerEli Zaretskii2014-11-03 19:14:50 +0200
commit29a13e2afea61b379e8da8a7dcdee475b7f21a27 (patch)
treef86d9902f244095be555d33dedc413a9d7533277 /src
parent6c5a32ddbc3b3442918ea6ad1af53aced2b6f7f5 (diff)
downloademacs-29a13e2afea61b379e8da8a7dcdee475b7f21a27.tar.gz
emacs-29a13e2afea61b379e8da8a7dcdee475b7f21a27.zip
Fix minor issues with functions that dump glyph matrices.
src/xdisp.c (Fdump_glyph_matrix, Fdump_frame_glyph_matrix): Doc fix. (Fdump_frame_glyph_matrix): Don't segfault if invoked on a GUI frame; instead, print an error message.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/xdisp.c14
2 files changed, 17 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 006e5c4b4a0..f30cad15f02 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12014-11-03 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (Fdump_glyph_matrix, Fdump_frame_glyph_matrix): Doc fix.
4 (Fdump_frame_glyph_matrix): Don't segfault if invoked on a GUI
5 frame; instead, print an error message.
6
12014-11-03 Jan Djärv <jan.h.d@swipnet.se> 72014-11-03 Jan Djärv <jan.h.d@swipnet.se>
2 8
3 * nsfns.m (ns_set_doc_edited): Check for FRAME_NS (Bug#18925). 9 * nsfns.m (ns_set_doc_edited): Check for FRAME_NS (Bug#18925).
diff --git a/src/xdisp.c b/src/xdisp.c
index c12ef753a45..0558aa8099d 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -18755,7 +18755,10 @@ DEFUN ("dump-glyph-matrix", Fdump_glyph_matrix,
18755 doc: /* Dump the current matrix of the selected window to stderr. 18755 doc: /* Dump the current matrix of the selected window to stderr.
18756Shows contents of glyph row structures. With non-nil 18756Shows contents of glyph row structures. With non-nil
18757parameter GLYPHS, dump glyphs as well. If GLYPHS is 1 show 18757parameter GLYPHS, dump glyphs as well. If GLYPHS is 1 show
18758glyphs in short form, otherwise show glyphs in long form. */) 18758glyphs in short form, otherwise show glyphs in long form.
18759
18760Interactively, no argument means show glyphs in short form;
18761with numeric argument, its value is passed as the GLYPHS flag. */)
18759 (Lisp_Object glyphs) 18762 (Lisp_Object glyphs)
18760{ 18763{
18761 struct window *w = XWINDOW (selected_window); 18764 struct window *w = XWINDOW (selected_window);
@@ -18773,11 +18776,16 @@ glyphs in short form, otherwise show glyphs in long form. */)
18773 18776
18774 18777
18775DEFUN ("dump-frame-glyph-matrix", Fdump_frame_glyph_matrix, 18778DEFUN ("dump-frame-glyph-matrix", Fdump_frame_glyph_matrix,
18776 Sdump_frame_glyph_matrix, 0, 0, "", doc: /* */) 18779 Sdump_frame_glyph_matrix, 0, 0, "", doc: /* Dump the current glyph matrix of the selected frame to stderr.
18780Only text-mode frames have frame glyph matrices. */)
18777 (void) 18781 (void)
18778{ 18782{
18779 struct frame *f = XFRAME (selected_frame); 18783 struct frame *f = XFRAME (selected_frame);
18780 dump_glyph_matrix (f->current_matrix, 1); 18784
18785 if (f->current_matrix)
18786 dump_glyph_matrix (f->current_matrix, 1);
18787 else
18788 fprintf (stderr, "*** This frame doesn't have a frame glyph matrix ***\n");
18781 return Qnil; 18789 return Qnil;
18782} 18790}
18783 18791