* bug#6424: [describe-char PATCH 0/2] Minor output beautifications
@ 2010-06-14 12:23 Gustav Hållberg
2010-06-14 12:23 ` bug#6422: [describe-char PATCH 1/2] describe-char: add missing space in Unicode "Decomposition" line Gustav Hållberg
2010-06-14 12:23 ` bug#6423: [describe-char PATCH 2/2] describe-char: remove superfluous space at end of "Unicode data" line Gustav Hållberg
0 siblings, 2 replies; 5+ messages in thread
From: Gustav Hållberg @ 2010-06-14 12:23 UTC (permalink / raw)
To: 6424
These two patches repair minor whitespace errors in describe-char
(C-u C-x =) when describe-char-unicodedata-file has been set.
The patches are against Emacs 23.2.
- Gustav
---
Gustav Hållberg (2):
describe-char: add missing space in Unicode "Decomposition" line
describe-char: remove superfluous space at end of "Unicode data" line
lisp/descr-text.el | 33 +++++++++++++++++----------------
1 files changed, 17 insertions(+), 16 deletions(-)
--
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#6422: [describe-char PATCH 1/2] describe-char: add missing space in Unicode "Decomposition" line
2010-06-14 12:23 bug#6424: [describe-char PATCH 0/2] Minor output beautifications Gustav Hållberg
@ 2010-06-14 12:23 ` Gustav Hållberg
2010-06-19 2:32 ` Glenn Morris
2010-06-14 12:23 ` bug#6423: [describe-char PATCH 2/2] describe-char: remove superfluous space at end of "Unicode data" line Gustav Hållberg
1 sibling, 1 reply; 5+ messages in thread
From: Gustav Hållberg @ 2010-06-14 12:23 UTC (permalink / raw)
To: 6422
If there is an "info" field, make sure to add a space after it.
---
lisp/descr-text.el | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 36ee08d..51f7a77 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -288,20 +288,20 @@ This function is semi-obsolete. Use `get-char-code-property'."
(or (char-code-property-description
'bidi-class (intern val))
val)))
- (list
- "Decomposition"
- (if (nth 4 fields)
- (let* ((parts (split-string (nth 4 fields)))
- (info (car parts)))
- (if (string-match "\\`<\\(.+\\)>\\'" info)
- (setq info (match-string 1 info))
- (setq info nil))
- (if info (setq parts (cdr parts)))
- (setq parts (mapconcat
- (lambda (arg)
- (string (string-to-number arg 16)))
- parts " "))
- (concat info parts))))
+ (list "Decomposition"
+ (let ((field (nth 4 fields)))
+ (when field
+ (let* ((parts (split-string field))
+ (info (car parts)))
+ (if (string-match "\\`<\\(.+\\)>\\'" info)
+ (setq info (match-string 1 info)
+ parts (cdr parts))
+ (setq info nil))
+ (concat info (when info " ")
+ (mapconcat
+ (lambda (arg)
+ (string (string-to-number arg 16)))
+ parts " "))))))
(list "Decimal digit value"
(nth 5 fields))
(list "Digit value"
^ permalink raw reply related [flat|nested] 5+ messages in thread
* bug#6422: [describe-char PATCH 1/2] describe-char: add missing space in Unicode "Decomposition" line
2010-06-14 12:23 ` bug#6422: [describe-char PATCH 1/2] describe-char: add missing space in Unicode "Decomposition" line Gustav Hållberg
@ 2010-06-19 2:32 ` Glenn Morris
0 siblings, 0 replies; 5+ messages in thread
From: Glenn Morris @ 2010-06-19 2:32 UTC (permalink / raw)
To: 6422-done
Gustav Hållberg wrote:
> If there is an "info" field, make sure to add a space after it.
I believe the minimum version of this change is just
--- lisp/descr-text.el 2010-06-03 15:34:35 +0000
+++ lisp/descr-text.el 2010-06-18 19:48:07 +0000
@@ -301,7 +301,7 @@
(lambda (arg)
(string (string-to-number arg 16)))
parts " "))
- (concat info parts))))
+ (concat info (if info " ") parts))))
(list "Decimal digit value"
(nth 5 fields))
(list "Digit value"
so that's what I installed.
I would have found an example very helpful, eg
emacs -Q --eval \
'(setq describe-char-unicodedata-file "admin/unidata/UnicodeData.txt")'
M-x ucs-insert RET 0132 RET
C-u C-x =
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#6423: [describe-char PATCH 2/2] describe-char: remove superfluous space at end of "Unicode data" line
2010-06-14 12:23 bug#6424: [describe-char PATCH 0/2] Minor output beautifications Gustav Hållberg
2010-06-14 12:23 ` bug#6422: [describe-char PATCH 1/2] describe-char: add missing space in Unicode "Decomposition" line Gustav Hållberg
@ 2010-06-14 12:23 ` Gustav Hållberg
2010-06-19 2:40 ` Glenn Morris
1 sibling, 1 reply; 5+ messages in thread
From: Gustav Hållberg @ 2010-06-14 12:23 UTC (permalink / raw)
To: 6423
This prevents annoying markup if the trailing-whitespace face is used.
---
lisp/descr-text.el | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 51f7a77..d66aa88 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -618,7 +618,7 @@ as well as widgets, buttons, overlays, and text properties."
,@(if (not eight-bit-p)
(let ((unicodedata (describe-char-unicode-data char)))
(if unicodedata
- (cons (list "Unicode data" " ") unicodedata))))))
+ (cons (list "Unicode data" "") unicodedata))))))
(setq max-width (apply 'max (mapcar (lambda (x)
(if (cadr x) (length (car x)) 0))
item-list)))
@@ -642,7 +642,8 @@ as well as widgets, buttons, overlays, and text properties."
(window-width))
(insert "\n")
(indent-to (1+ max-width)))
- (insert " " clm)))
+ (unless (zerop (length clm))
+ (insert " " clm))))
(insert "\n"))))
(when overlays
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-06-19 2:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-14 12:23 bug#6424: [describe-char PATCH 0/2] Minor output beautifications Gustav Hållberg
2010-06-14 12:23 ` bug#6422: [describe-char PATCH 1/2] describe-char: add missing space in Unicode "Decomposition" line Gustav Hållberg
2010-06-19 2:32 ` Glenn Morris
2010-06-14 12:23 ` bug#6423: [describe-char PATCH 2/2] describe-char: remove superfluous space at end of "Unicode data" line Gustav Hållberg
2010-06-19 2:40 ` Glenn Morris
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).