From 4ab088c087da03de9f6878e8548d46f754b968a6 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 18 Aug 2008 12:04:35 +0000 Subject: [PATCH] (font-show-log): Add optional arg N to control the limit of font listing. --- lisp/ChangeLog | 5 +++++ lisp/international/mule-diag.el | 13 +++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 517e6e71d10..e8285640541 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-08-18 Kenichi Handa + + * international/mule-diag.el (font-show-log): Add optional arg N + to control the limit of font listing. + 2008-08-18 Chong Yidong * window.el (recenter-top-bottom): Determine top and bottom diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el index 93571846345..720201b4f1b 100644 --- a/lisp/international/mule-diag.el +++ b/lisp/international/mule-diag.el @@ -1299,9 +1299,11 @@ character)") (nth 13 fields) 16))))))))))) ;;;###autoload -(defun font-show-log () - "Show log of font listing and opening." - (interactive) +(defun font-show-log (&optional n) + "Show log of font listing and opening. +Prefix arg N says how many fonts to show for each listing. +The default is 20. If N is negative, do not limit the listing." + (interactive "p") (if (eq font-log t) (message "Font logging is currently suppressed") (with-output-to-temp-buffer "*Help*" @@ -1310,12 +1312,11 @@ character)") (insert (format "%s: %s\n" (car elt) (cadr elt))) (setq elt (nth 2 elt)) (if (or (vectorp elt) (listp elt)) - (let ((limit 20) - (i 0)) + (let ((i 0)) (catch 'tag (mapc #'(lambda (x) (setq i (1+ i)) - (when (= i 20) + (when (= i n) (insert " ...\n") (throw 'tag nil)) (insert (format " %s\n" x))) -- 2.39.2