X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/2b0c7330457b8ca42375c92ada7dc7cefb0fa9fb..d279e6680842b872ae3aab1fb429b1879db50f7f:/lisp/disp-table.el diff --git a/lisp/disp-table.el b/lisp/disp-table.el index 7a9043a6a0..84f9c89237 100644 --- a/lisp/disp-table.el +++ b/lisp/disp-table.el @@ -1,11 +1,11 @@ ;;; disp-table.el --- functions for dealing with char tables -;; Copyright (C) 1987, 1994-1995, 1999, 2001-2011 -;; Free Software Foundation, Inc. +;; Copyright (C) 1987, 1994-1995, 1999, 2001-2015 Free Software +;; Foundation, Inc. ;; Author: Erik Naggum ;; Based on a previous version by Howard Gayle -;; Maintainer: FSF +;; Maintainer: emacs-devel@gnu.org ;; Keywords: i18n ;; Package: emacs @@ -94,14 +94,32 @@ Valid symbols are `truncation', `wrap', `escape', `control', (while (< i 256) (aset vector i (aref dt i)) (setq i (1+ i))) - (describe-vector vector)) + (describe-vector + vector 'display-table-print-array)) (help-mode)))) +(defun display-table-print-array (desc) + (insert "[") + (let ((column (current-column)) + (width (window-width)) + string) + (dotimes (i (length desc)) + (setq string (format "%s" (aref desc i))) + (cond + ((>= (+ (current-column) (length string) 1) + width) + (insert "\n") + (insert (make-string column ? ))) + ((> i 0) + (insert " "))) + (insert string))) + (insert "]\n")) + ;;;###autoload (defun describe-current-display-table () "Describe the display table in use in the selected window and buffer." (interactive) - (let ((disptab (or (window-display-table (selected-window)) + (let ((disptab (or (window-display-table) buffer-display-table standard-display-table))) (if disptab