emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/ps-mule.el


From: Kenichi Handa
Subject: [Emacs-diffs] Changes to emacs/lisp/ps-mule.el
Date: Sun, 03 Apr 2005 22:12:15 -0400

Index: emacs/lisp/ps-mule.el
diff -c emacs/lisp/ps-mule.el:1.39 emacs/lisp/ps-mule.el:1.40
*** emacs/lisp/ps-mule.el:1.39  Tue Mar 29 05:47:45 2005
--- emacs/lisp/ps-mule.el       Mon Apr  4 02:12:15 2005
***************
*** 1402,1407 ****
--- 1402,1408 ----
  (defun ps-mule-show-warning (charsets from to header-footer-list)
    (let ((table (make-category-table))
        (buf (current-buffer))
+       (max-unprintable-chars 15)
        char-pos-list)
      (define-category ?u "Unprintable charset" table)
      (dolist (cs charsets)
***************
*** 1409,1427 ****
      (with-category-table table
        (save-excursion
        (goto-char from)
!       (while (and (< (length char-pos-list) 20)
                    (re-search-forward "\\cu" to t))
!         (push (cons (preceding-char) (1- (point))) char-pos-list))
!       (setq char-pos-list (nreverse char-pos-list))))
      (with-output-to-temp-buffer "*Warning*"
        (with-current-buffer standard-output
        (when char-pos-list
          (let ((func #'(lambda (buf pos)
                          (when (buffer-live-p buf)
                            (pop-to-buffer buf)
!                           (goto-char pos)))))
            (insert "These characters in the buffer can't be printed:\n")
!           (dolist (elt char-pos-list)
              (insert " ")
              (insert-text-button (string (car elt))
                                  :type 'help-xref
--- 1410,1431 ----
      (with-category-table table
        (save-excursion
        (goto-char from)
!       (while (and (<= (length char-pos-list) max-unprintable-chars)
                    (re-search-forward "\\cu" to t))
!         (push (cons (preceding-char) (1- (point))) char-pos-list))))
      (with-output-to-temp-buffer "*Warning*"
        (with-current-buffer standard-output
        (when char-pos-list
          (let ((func #'(lambda (buf pos)
                          (when (buffer-live-p buf)
                            (pop-to-buffer buf)
!                           (goto-char pos))))
!               (more nil))
!           (if (>= (length char-pos-list) max-unprintable-chars)
!               (setq char-pos-list (cdr char-pos-list)
!                     more t))
            (insert "These characters in the buffer can't be printed:\n")
!           (dolist (elt (nreverse char-pos-list))
              (insert " ")
              (insert-text-button (string (car elt))
                                  :type 'help-xref
***************
*** 1430,1437 ****
                                  'help-function func
                                  'help-args (list buf (cdr elt)))
              (insert ","))
!           ;; Delete the last comma.
!           (delete-char -1)
            (insert "\nClick them to jump to the buffer position,\n"
                    (substitute-command-keys "\
  or \\[universal-argument] \\[what-cursor-position] will give information 
about them.\n"))))
--- 1434,1443 ----
                                  'help-function func
                                  'help-args (list buf (cdr elt)))
              (insert ","))
!           (if more
!               (insert " and more...")
!             ;; Delete the last comma.
!             (delete-char -1))
            (insert "\nClick them to jump to the buffer position,\n"
                    (substitute-command-keys "\
  or \\[universal-argument] \\[what-cursor-position] will give information 
about them.\n"))))




reply via email to

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