changeset: 4510:74caf140505b589959374ba69b7e5cfd5a38aadf
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sat Jul 19 15:19:59 2008 +0200
files: lisp/ChangeLog lisp/descr-text.el
description:
Wrap field descriptions, descr-text.el; name created buffer more uniquely.
2008-07-19 Aidan Kehoe <kehoea(a)parhasard.net>
* descr-text.el (describe-property-list): Move the (require
'hyper-apropos) call to top level, this isn't the only function
that uses the relevant face.
(describe-char): Wrap the Unihan field descriptions if they are
longer than the windows width minus 50.
Rename the created buffer to reflect the character's position as
well as its value.
diff -r 4cb7c59b5201ae584dfe081c131e5f20de3eab7e -r
74caf140505b589959374ba69b7e5cfd5a38aadf lisp/ChangeLog
--- a/lisp/ChangeLog Thu Jul 17 22:50:22 2008 +0200
+++ b/lisp/ChangeLog Sat Jul 19 15:19:59 2008 +0200
@@ -1,3 +1,13 @@ 2008-07-07 Aidan Kehoe <kehoea@parhasa
+2008-07-19 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * descr-text.el (describe-property-list): Move the (require
+ 'hyper-apropos) call to top level, this isn't the only function
+ that uses the relevant face.
+ (describe-char): Wrap the Unihan field descriptions if they are
+ longer than the windows width minus 50.
+ Rename the created buffer to reflect the character's position as
+ well as its value.
+
2008-07-07 Aidan Kehoe <kehoea(a)parhasard.net>
Patch to make it up to the device-specific code whether
diff -r 4cb7c59b5201ae584dfe081c131e5f20de3eab7e -r
74caf140505b589959374ba69b7e5cfd5a38aadf lisp/descr-text.el
--- a/lisp/descr-text.el Thu Jul 17 22:50:22 2008 +0200
+++ b/lisp/descr-text.el Sat Jul 19 15:19:59 2008 +0200
@@ -31,6 +31,8 @@
;;; Code:
(eval-when-compile (require 'wid-edit))
+
+(require 'hyper-apropos)
;;; Describe-Text Utilities.
@@ -82,7 +84,6 @@ into help buttons that call `describe-te
into help buttons that call `describe-text-category' or
`describe-face' when pushed."
;; Sort the properties by the size of their value.
- (require 'hyper-apropos)
(dolist (elt (sort (let (ret)
(while properties
(push (list (pop properties) (pop properties)) ret))
@@ -1029,7 +1030,8 @@ as well as widgets, buttons, overlays, a
(describe-text-properties pos tmp-buf)
(with-current-buffer tmp-buf (buffer-string)))
(kill-buffer tmp-buf))))
- item-list max-width unicode unicode-formatted unicode-error)
+ item-list max-width unicode unicode-formatted unicode-error
+ unicodedata (max-unicode-description-width (- (window-width) 50)))
(setq unicode-error
@@ -1185,13 +1187,29 @@ as well as widgets, buttons, overlays, a
`(insert-gui-button
(make-gui-button
,(symbol-name face)))))))
- ,@(let ((unicodedata (and unicode
- (describe-char-unicode-data unicode))))
+ ,@(progn
+ (setq unicodedata (and unicode
+ (describe-char-unicode-data unicode)))
(if unicodedata
(cons (list "Unicode data" " ") unicodedata)))))
(setq max-width (apply #'max (mapcar #'(lambda (x)
(if (cadr x) (length (car x)) 0))
item-list)))
+ (when (and unicodedata (> max-width max-unicode-description-width))
+ (setq max-width max-unicode-description-width)
+ (with-temp-buffer
+ (let ((fill-column max-unicode-description-width)
+ (indent-tabs-mode nil))
+ (dolist (unidata-line unicodedata)
+ (when (cadr unidata-line)
+ (setf (car unidata-line)
+ (progn (insert (car unidata-line))
+ (goto-char (point-min))
+ (fill-paragraph 'right)
+ (delete-region (1- (point-max))
+ (point-max))
+ (buffer-string)))
+ (delete-region (point-min) (point-max)))))))
; (help-setup-xref nil (interactive-p))
(with-displaying-help-buffer
(lambda ()
@@ -1274,7 +1292,7 @@ as well as widgets, buttons, overlays, a
; (setq help-xref-stack-item (list 'help-insert-string (buffer-string)))
(toggle-read-only 1)
(print-help-return-message)))
- (format "Describe %c" (char-after pos)))))
+ (format "Describe %c <%d>" (char-after pos) pos))))
(defalias 'describe-char-after 'describe-char)
(make-obsolete 'describe-char-after 'describe-char "22.1")
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches