/[emacs]/emacs/lisp/ps-mule.el
ViewVC logotype

Diff of /emacs/lisp/ps-mule.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.39 by handa, Tue Mar 29 05:47:45 2005 UTC revision 1.40 by handa, Mon Apr 4 02:12:15 2005 UTC
# Line 1402  FONTTAG should be a string \"/h0\" or \" Line 1402  FONTTAG should be a string \"/h0\" or \"
1402  (defun ps-mule-show-warning (charsets from to header-footer-list)  (defun ps-mule-show-warning (charsets from to header-footer-list)
1403    (let ((table (make-category-table))    (let ((table (make-category-table))
1404          (buf (current-buffer))          (buf (current-buffer))
1405            (max-unprintable-chars 15)
1406          char-pos-list)          char-pos-list)
1407      (define-category ?u "Unprintable charset" table)      (define-category ?u "Unprintable charset" table)
1408      (dolist (cs charsets)      (dolist (cs charsets)
# Line 1409  FONTTAG should be a string \"/h0\" or \" Line 1410  FONTTAG should be a string \"/h0\" or \"
1410      (with-category-table table      (with-category-table table
1411        (save-excursion        (save-excursion
1412          (goto-char from)          (goto-char from)
1413          (while (and (< (length char-pos-list) 20)          (while (and (<= (length char-pos-list) max-unprintable-chars)
1414                      (re-search-forward "\\cu" to t))                      (re-search-forward "\\cu" to t))
1415            (push (cons (preceding-char) (1- (point))) char-pos-list))            (push (cons (preceding-char) (1- (point))) char-pos-list))))
         (setq char-pos-list (nreverse char-pos-list))))  
1416      (with-output-to-temp-buffer "*Warning*"      (with-output-to-temp-buffer "*Warning*"
1417        (with-current-buffer standard-output        (with-current-buffer standard-output
1418          (when char-pos-list          (when char-pos-list
1419            (let ((func #'(lambda (buf pos)            (let ((func #'(lambda (buf pos)
1420                            (when (buffer-live-p buf)                            (when (buffer-live-p buf)
1421                              (pop-to-buffer buf)                              (pop-to-buffer buf)
1422                              (goto-char pos)))))                              (goto-char pos))))
1423                    (more nil))
1424                (if (>= (length char-pos-list) max-unprintable-chars)
1425                    (setq char-pos-list (cdr char-pos-list)
1426                          more t))
1427              (insert "These characters in the buffer can't be printed:\n")              (insert "These characters in the buffer can't be printed:\n")
1428              (dolist (elt char-pos-list)              (dolist (elt (nreverse char-pos-list))
1429                (insert " ")                (insert " ")
1430                (insert-text-button (string (car elt))                (insert-text-button (string (car elt))
1431                                    :type 'help-xref                                    :type 'help-xref
# Line 1430  FONTTAG should be a string \"/h0\" or \" Line 1434  FONTTAG should be a string \"/h0\" or \"
1434                                    'help-function func                                    'help-function func
1435                                    'help-args (list buf (cdr elt)))                                    'help-args (list buf (cdr elt)))
1436                (insert ","))                (insert ","))
1437              ;; Delete the last comma.              (if more
1438              (delete-char -1)                  (insert " and more...")
1439                  ;; Delete the last comma.
1440                  (delete-char -1))
1441              (insert "\nClick them to jump to the buffer position,\n"              (insert "\nClick them to jump to the buffer position,\n"
1442                      (substitute-command-keys "\                      (substitute-command-keys "\
1443  or \\[universal-argument] \\[what-cursor-position] will give information about them.\n"))))  or \\[universal-argument] \\[what-cursor-position] will give information about them.\n"))))

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26